wgpu/naga/tests/in/overrides-atomicCompareExchangeWeak.wgsl
Jim Blandy 8a2bc07f11 [naga] Handle comparison operands in pipeline constant evaluation.
Properly adjust `AtomicFunction::Exchange::compare` after pipeline
constant evaluation.
2024-04-05 18:07:41 +02:00

8 lines
133 B
WebGPU Shading Language

override o: i32;
var<workgroup> a: atomic<u32>;
@compute @workgroup_size(1)
fn f() {
atomicCompareExchangeWeak(&a, u32(o), 1u);
}