4 GL_ARB_shader_storage_buffer_object
5 GL_ARB_shader_atomic_counters
9 #extension GL_ARB_compute_shader: enable
10 #extension GL_ARB_shader_storage_buffer_object: require
11 #extension GL_ARB_shader_atomic_counters: require
15 layout(local_size_x = SIZE) in;
17 layout(binding = 0) uniform atomic_uint counter;
28 uint index = gl_LocalInvocationIndex;
39 atomicCounterIncrement(counter);
42 if (u[index] == index)
43 atomicCounterIncrement(counter);
54 probe atomic counter 0 == 0
58 probe atomic counter 0 == 0
62 probe atomic counter 0 == 256
66 probe atomic counter 0 == 256
70 probe atomic counter 0 == 256
74 probe atomic counter 0 == 512