WebGPU / WGSL Memory Model
A relaxed, scoped memory model for portable GPU compute in the browser, derived closely from Vulkan's. WGSL provides relaxed atomics, work-group barriers and storage/work-group address spaces; implementations lower it to Vulkan, Metal or Direct3D 12.
Properties
Property vector author-extrapolated — set only where the model’s definition pins the cell down (unknown cells are omitted); cells citing a specific source are marked.
- Reordering sound
- yes Store→Load
- yes Store→Store
- yes Load→Load
- yes Load→Store
- Reasoning guarantees
- yes Coherence
- yes No undefined behaviour
- no In-order execution
Ordering relationships
- Compiles correctly to
- Vulkan Memory Model — Browser WebGPU implementations lower WGSL to Vulkan (and to Metal/Direct3D 12); the WGSL model is derived from Vulkan's.
- Apple Metal Memory Model — On Apple platforms WebGPU implementations lower WGSL to Metal.
References
- W3C GPU for the Web Working Group. WebGPU Shading Language (WGSL) Specification — Memory Model. W3C, 2023. www.w3.org/TR/WGSL/