glsl-array-bounds: set out-of-bounds array index inside shader
[piglit.git] / tests / shaders / glsl-fs-vec4-indexing-8.shader_test
blob3ff99785dab1afd7c143b24c1725fd0ed175f3db
1 [require]
2 GLSL >= 1.10
4 [vertex shader passthrough]
6 [fragment shader]
7 uniform float id;
8 void main()
10         ivec4 test = ivec4(0, 1, 0, 0);
11         vec4 test2 = vec4(0.0, 1.0, 0.0, 0.0);
12         int index = int(id);
13         float col = test2[test[index]];
14         gl_FragColor = vec4(col);
17 [test]
18 uniform float id 1
19 draw rect -1 -1 2 2
20 probe rgb 1 1 1.0 1.0 1.0