2 ms·
> 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
by TazeTSchnitzel 7y ago
> 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.
- om2 7y agoSpecialization 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.
- atq2119 7y agoThe 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.
- kvark 7y agoMy 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.