[RFC] vulkan on webgpu native
bring webgpu native for webassembly, reuse vulkan code as much as possible
to be investigated
webassembly vulkan build system integration
build tint library
runtime comp➡️preprocess➡️spirv➡️wgsl
push constant to uniform binding
thin vulkan adaptor on webgpu native
webgpu native ci
resources
webgpu native implementation https://github.com/gfx-rs/wgpu-native https://github.com/google/dawn https://github.com/emscripten-core/emscripten/tree/main/system/include/webgpu
spir-v to wgsl https://dawn.googlesource.com/dawn/+/refs/heads/chromium/6530/docs/tint/spirv-reader-overview.md https://github.com/BabylonJS/twgsl
compatibility https://caniuse.com/webgpu
push constant changes for
error: unknown SPIR-V storage class: 9
layout (push_constant) uniform parameter
{
int dims;
int w;
int h;
int c;
int cstep;
} p;
struct parameter
{
int dims;
int w;
int h;
int c;
int cstep;
};
layout (binding = 1) uniform parameter_blob { parameter p; };
psc macro changes for
error: unhandled expression for ID 33
%33 = OpSpecConstantOp %32 IEqual %30 %31
#define psc(x) (x==0?p.x:x)
#define psc(x) (float(x)==0?p.x:x)
Finally, this will be huge improvement for web.