You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
What's the status on supporting WebGPU and WGSL? #25
Currently only SPIR-V support is planned, Vulkan's open compiler target
Possible a future version could support DXIL (the target for DirectX) or WGSL (the WebGPU shading language that's bijective with SPIR-V)
Right now I'm working on Vello, a 2D graphics engine implemented on top of wgpu. We won't even consider an alternative which is Vulkan-only.
Is WebGPU support in the pipeline? Any idea if or when it will happen?
We support wgpu, both native (passed through to vulkan directly where possible) and on the web (using naga to translate). Some of the examples in the repo use it and we have run a few on multiple platforms including web and Android.
That being said, we have an experimental IR which may allow us to directly do the translation naga does internally in the future if it makes sense (https://github.com/Rust-GPU/spirt).
@eddyb can correct me if I am wrong as I am still new to the project.
My project renderling uses rust-gpu and wgpu and targets WebGPU on web. naga is pretty capable of translating SPIR-V into WGSL, and I've done some work to make it more capable. There is still work to be done in wgpu+naga but most shaders compile and validate easily. Let me know if you want to get into the specifics - I can tell you if I think your shaders will work.
Activity
LegNeato commentedon Oct 8, 2024
We support wgpu, both native (passed through to vulkan directly where possible) and on the web (using naga to translate). Some of the examples in the repo use it and we have run a few on multiple platforms including web and Android.
I don't believe there are any plans for the compiler backend to output anything other than spir-v, especially with MS switching to spir-v for directx (https://devblogs.microsoft.com/directx/directx-adopting-spir-v/) and naga existing.
That being said, we have an experimental IR which may allow us to directly do the translation naga does internally in the future if it makes sense (https://github.com/Rust-GPU/spirt).
@eddyb can correct me if I am wrong as I am still new to the project.
schell commentedon Oct 8, 2024
My project renderling uses
rust-gpuandwgpuand targets WebGPU on web.nagais pretty capable of translating SPIR-V into WGSL, and I've done some work to make it more capable. There is still work to be done inwgpu+nagabut most shaders compile and validate easily. Let me know if you want to get into the specifics - I can tell you if I think your shaders will work.