WebGPU shaders are expressed in SPIR-V. SPIR-V is usable in several execution environments, and so its core definition describes a superset of functionality across all those environments. The "WebGPU Execution Environment Specification for SPIR-V" section describes restrictions on SPIR-V for use with WebGPU.… WebGPU is a client API for SPIR-V.
Spec: https://github.com/gpuweb/spirv-execution-env/blob/master/execution-env.md#webgpu-execution-environment Related documents: https://github.com/gpuweb/spirv-execution-env
This is an alternative to the WHLSL (Web High-level Shading Language) for WebGPU proposal, https://github.com/w3c/strategy/issues/153.
Note that SPIR-V is a binary format, while WHLSL is a text format.
See discussion at https://lists.w3.org/Archives/Public/public-gpu/2018Nov/thread.html#msg45
See related discussion at https://lists.w3.org/Archives/Public/public-gpu/2018Nov/0042.html and the entire thread at https://lists.w3.org/Archives/Public/public-gpu/2018Nov/thread.html#msg1
This is related to https://github.com/w3c/strategy/issues/68 but more concrete/specific.