News for hackers. Stuff that matters.
Re:WebGPU and WSL in Safari by TazeTSchnitzel on Thursday September 12, 2019 @05:56PM (#20956897)
> A bigger question though that needs to be resolved is how to specialize SPIR-V shaders.

Is the OpSpecConstant family not enough? Those exist specifically for specialisation.

Re:WebGPU and WSL in Safari by kvark on Friday September 13, 2019 @09:22AM (#20961846)
My main problem with SPIR-V specialization today is that it doesn't affect the shader interface. For WebGPU, we don't want to validate presence of resources that the user doesn't need, we don't want to allocate registers for them in our pipeline layouts, etc. I think having this ability is critical.
Re:WebGPU and WSL in Safari by om2 on Thursday September 12, 2019 @09:48PM (#20958400)
Specialization constants don’t seem to cut it for all the use cases. There’s variation beyond plugging in constants. Also some frameworks and engines give their clients the ability to provide shader snippets at runtime.
Re:WebGPU and WSL in Safari by atq2119 on Thursday September 12, 2019 @11:45PM (#20959014)
The answer to shader snippets in the SPIR-V world would be linking. I don't think that's well developed in the ecosystem if at all, but it's a perfectly natural extension.