atomic-vec2u-min-max
Specification: WebGPU § atomic-vec2u-min-max · WGSL § atomic_vec2u_min_max
With the feature requested on the device and enable atomic_vec2u_min_max; in WGSL, a storage buffer can hold atomic<vec2<u32>> values. Each one is treated as an unsigned 64-bit integer, with the low 32 bits in component 0 and the high 32 bits in component 1, and atomicStoreMin or atomicStoreMax updates it atomically using a full 64-bit comparison.
The classic use is packing a sort key, such as depth or distance, into the high word and an identifier into the low word, so one atomic operation keeps the smallest or largest key together with its payload. Compute-based software rasterizers and visibility buffers resolve the front-most triangle per pixel this way; compute culling and ray tracing passes use the same pattern.
Unlike atomicMin and atomicMax, these functions return nothing, so read the results in a later pass. The type is only allowed in the storage address space, not in workgroup memory. Without the feature, pack a reduced-precision key and payload into a single u32 for the ordinary 32-bit atomics, or resolve in two passes.
Availability by month
| Month | With feature | Eligible reports | Availability |
|---|---|---|---|
| 2026-08 | 0 | 238 | 0.0% |
| 2026-09 | 0 | 175 | 0.0% |
| 2026-10 | 0 | 22 | 0.0% |
By browser (last 30 days)
| Browser | Availability | n |
|---|---|---|
| chrome | 0.0% | 113 |
| edge | 0.0% | 13 |
| firefox | 0.0% | 12 |
| safari | 0.0% | 14 |
Availability = share of first-party, non-quarantined reports with WebGPU on a hardware (non-fallback) adapter that expose this feature. Developer-leaning sample. Full methodology.