ARB_ubo/referenced-by-shader: pass if shader compiler moves UBOs between shaders
[piglit.git] / tests / spec / arb_shader_atomic_counters / compiler / expression-allowed.frag
blobcfe40340eb2faf11b9fa972bc14d9fc96481bb6f
1 /* [config]
2  * expect_result: pass
3  * glsl_version: 1.40
4  * require_extensions: GL_ARB_shader_atomic_counters
5  * [end config]
6  *
7  * "Except for array indexing, structure field selection, and
8  *  parenthesis, counters are not allowed to be operands in
9  *  expressions."
10  */
11 #version 140
12 #extension GL_ARB_shader_atomic_counters: require
14 layout(binding=0) uniform atomic_uint xs[4];
15 uniform uint y;
17 out ivec4 fcolor;
19 void main()
21         fcolor.x = int(y + atomicCounter((xs[1])));