1 /* The ARB_shader_atomic_counters says:
3 * "It is legal for some shaders to provide a layout qualifier for
4 * a uniform variable of the same name, while another shader does
5 * not provide a layout qualifier for a uniform variable of the
6 * same name, but if provided, all provided layout qualifiers
7 * must be equal for a uniform variable of the same name, and if
8 * not provided, all implicitly provided layout qualifiers must
9 * be equal for a uniform variable of the same name."
11 * Verify that a link error happens when using different binding
12 * points for an atomic counter with the same name in different
19 GL_ARB_shader_atomic_counters
23 #extension GL_ARB_shader_atomic_counters: require
25 layout (binding = 0) uniform atomic_uint x;
27 in vec4 piglit_vertex;
32 vs_fs = vec4(atomicCounter(x));
33 gl_Position = piglit_vertex;
38 #extension GL_ARB_shader_atomic_counters: require
40 layout (binding = 1) uniform atomic_uint x;
47 fs_out = vs_fs * atomicCounter(x);