4 ms·
I agree with you about Web Shading Language not needing to exist. But I also don't think it's the end of the world, either. Google's Tint can translate between
by slimsag 5y ago
I agree with you about Web Shading Language not needing to exist.
But I also don't think it's the end of the world, either. Google's Tint can translate between SPIR-V/GLSL/etc -> WGSL and vice-versa pretty well.
If that's what it takes for Apple to be on board with WebGPU and we get an extension later to load SPIR-V (or some other WGSL binary form) later for optimization I'm cool with that.
- pcwalton 5y agoYeah, the silver lining is that the amount of effort folks have gone to in order to ensure some level of interoperability has been amazing. Khronos developers working on SPIRV-Cross, wgpu-rs folks like kvark, MoltenVK people, Wine devs, etc. are unsung heroes of the graphics industry and deserve tons of support.
- kvark 5y agoEven if SPIRV input becomes available as an extension at some point, don’t expect it to be any kind of optimization. Both Tint and Naga’s IRs are close to WGSL, so parsing it is really easy and fast. Processing SPIRV’s control flow graph, images/samplers, atomics, is quite painful in comparison.
- slimsag 5y agoFrom kvark himself, big fan of your work :) Very interesting, thanks for saying this, I wouldn't have thought SPIRV->Target could be faster than or near the same speed as WGSL->Target. I guess with compression probably being quite good, as well, there isn't much point of a SPIRV extension for download times or processing times?