1 # Simple test of atomicCounterIncrement, atomicCounterDecrement and
2 # atomicCounter being used in the FS
7 INT GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS >= 2
9 [vertex shader passthrough]
15 layout(binding = 0) uniform atomic_uint a0;
16 layout(binding = 0) uniform atomic_uint a1;
25 /* Test that incrementing, followed by a read of an atomic
26 * counter results in a larger value.
28 * Note: atomicCounterIncrement return the old value
30 v0 = atomicCounterIncrement(a0);
31 v1 = atomicCounter(a0);
35 /* Skip one decrement since it may be the 0 => 0xffffffff
38 atomicCounterDecrement(a1);
40 /* Test that a read, followed by a decrement of an atomic
41 * counter results in a smaller value.
43 * Note: atomicCounterDecrement return the new value
45 v0 = atomicCounter(a1);
46 v1 = atomicCounterDecrement(a1);
51 fcolor = vec4(0.0, 1.0, 0.0, 1.0);
53 fcolor = vec4(1.0, 0.0, 0.0, 1.0);
60 probe all rgba 0.0 1.0 0.0 1.0