1 # Simple test of atomicCounterIncrement, atomicCounterDecrement and
2 # atomicCounter being used in the VS.
7 INT GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS >= 2
12 layout(binding = 0) uniform atomic_uint a0;
13 layout(binding = 0) uniform atomic_uint a1;
15 in vec4 piglit_vertex;
23 /* Test that incrementing, followed by a read of an atomic
24 * counter results in a larger value.
26 * Note: atomicCounterIncrement return the old value
28 v0 = atomicCounterIncrement(a0);
29 v1 = atomicCounter(a0);
33 /* Skip one decrement since it may be the 0 => 0xffffffff
36 atomicCounterDecrement(a1);
38 /* Test that a read, followed by a decrement of an atomic
39 * counter results in a smaller value.
41 * Note: atomicCounterDecrement return the new value
43 v0 = atomicCounter(a1);
44 v1 = atomicCounterDecrement(a1);
49 vcolor = vec4(0.0, 1.0, 0.0, 1.0);
51 vcolor = vec4(1.0, 0.0, 0.0, 1.0);
53 gl_Position = piglit_vertex;
58 precision highp float;
72 probe all rgba 0.0 1.0 0.0 1.0