WGSL has some support for specialization constants but the WebGPU API doesn't allow setting them at all so they are unusable. We should have an investigation of how specialization constants work in D3D12, Metal and Vulkan and a proposal for what it should be in WebGPU.