]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/constant_expressions.glsl
Check that non-constant data is not accessed from constant expressions
[libs/gl.git] / tests / glsl / constant_expressions.glsl
1 uniform int n_lights;
2 uniform vec3 light_dir[n_lights];
3
4 #pragma MSP stage(vertex)
5 layout(location=0) in vec4 position;
6 const bool lower_half = position.y<0;
7 void main()
8 {
9         gl_Position = position;
10 }
11
12 /* Expected error:
13 <test>:2: Reference to non-constant variable 'n_lights' in a constant expression
14 <test>:6: Reference to non-constant variable 'position' in a constant expression
15 */