Relaxed Memory Model Zoo

Memory model
← Back to the map

WebGPU / WGSL Memory Model

2023 · W3C GPU for the Web WG · language, gpu, scoped

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.

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.