5 GL_ARB_shader_atomic_counters
9 #extension GL_ARB_compute_shader: enable
10 #extension GL_ARB_shader_atomic_counters: require
12 layout(binding = 0) uniform atomic_uint a0;
13 layout(binding = 0) uniform atomic_uint a1;
14 layout(binding = 0) uniform atomic_uint a2;
15 layout(binding = 0) uniform atomic_uint a3;
16 layout(binding = 0) uniform atomic_uint a4;
17 layout(binding = 0) uniform atomic_uint a5;
18 layout(binding = 0) uniform atomic_uint a6;
19 layout(binding = 0) uniform atomic_uint a7;
21 layout(local_size_x = 1) in;
25 int n = int(gl_WorkGroupID.x);
28 atomicCounterIncrement(a0);
30 atomicCounterIncrement(a1);
32 atomicCounterIncrement(a2);
34 atomicCounterIncrement(a3);
36 atomicCounterIncrement(a4);
38 atomicCounterIncrement(a5);
40 atomicCounterIncrement(a6);
42 atomicCounterIncrement(a7);
49 probe atomic counter 0 == 1
50 probe atomic counter 1 == 1
51 probe atomic counter 2 == 1
52 probe atomic counter 3 == 1
53 probe atomic counter 4 == 1
54 probe atomic counter 5 == 1
55 probe atomic counter 6 == 1
56 probe atomic counter 7 == 1