w3c / strategy

team-strat, on GitHub, working in public. Current state: DRAFT
158 stars 47 forks source link

SPIR-V for WebGPU (binary shader language) #154

Closed sideshowbarker closed 4 years ago

sideshowbarker commented 6 years ago

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

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.

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.

sideshowbarker commented 4 years ago

The GPU for Web CG formally agreed on a new shader language that they’re calling it WGSL:

https://gpuweb.github.io/gpuweb/wgsl.html