-
-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bindings for Tint #1842
Comments
I dont feel Tint bindings are necessary. Both Dawn and wgpu-native are able to intake SPIRV directly without a conversion since Tint and Naga are builtin to the libraries. This doesnt cover the manually translating WGSL -> SPIRV case, however i dont believe that case would be very common, or has many uses. With shaderc + wpgu-native/dawn, you can already compile GLSL to SPIRV, then pass that SPIRV into the respective implementation directly. |
What about WASM? |
Both google and mozilla have shown interest in providing this to JS as well through an extension. I believe it already works with chromium behind the "unsafe webgpu support" flag (webgpu itself is also still behind said flag on some platforms on chromium, so thats doesnt mean much) In either case, you probably dont want to be packing many-megabyte shader compilation and translation libraries into your game's WASM build, and should do any shader translations offline as a build step |
What about WebKit? |
Not sure about webkit, however it is extremely unlikely they will provide SPIRV support In that case it would make sense to provide Tint/Naga bindings, but we should try to steer users away from doing this at runtime in their WASM builds as much as possible, given the huge inefficiencies at play here in a web environment |
Yeah absolutely agree. |
Summary of feature
Tint is Google's compiler for the WebGPU shader language and is used by libraries such as Babylon.js and Naga. It allows compilation of SPIR-V code to and from WGSL. Used in conjunction with Shaderc and SPIRV-Cross, it will enable a full compilation chain between GLSL/HLSL to and from SPIR-V then to and from WGSL.
Comments
Tint is available via Google Git: https://dawn.googlesource.com/tint
The text was updated successfully, but these errors were encountered: