1#
2# Tests overlapping uniform location with array. Note that this test does
3# not include testing for overlaps with unused uniform locations.
4#
5# The GL_ARB_explicit_uniform_location spec says:
6#     "No two default-block uniform variables in the program can have the same
7#     location, even if they are unused, otherwise a compiler or linker error
8#     will be generated"
9
10[require]
11GLSL >= 1.30
12GL_ARB_explicit_attrib_location
13GL_ARB_explicit_uniform_location
14
15[vertex shader passthrough]
16
17[fragment shader]
18#version 130
19#extension GL_ARB_explicit_attrib_location: require
20#extension GL_ARB_explicit_uniform_location: require
21layout(location = 0) uniform float a[16];
22layout(location = 2) uniform float r;
23
24void main()
25{
26  gl_FragColor = vec4(r, 1.0, 1.0, a[a.length() - 1]);
27}
28
29[test]
30link error
31