glsl-array-bounds: set out-of-bounds array index inside shader
[piglit.git] / tests / shaders / glsl-vs-vectorize-between-basic-blocks.shader_test
blob10f0502ba53b40f79490254c89c85abdaa320e17
1 # Tests that scalar operations in different basic blocks
2 # are not combined incorrectly into a vector operation.
4 # Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74113
6 [require]
7 GLSL >= 1.10
9 [vertex shader]
10 uniform float x, y;
11 uniform vec2 v;
13 attribute vec4 piglit_vertex;
14 varying vec2 color;
16 void main()
18     color = vec2(0.0);
20     if (x == y)
21         color.x += v.x;
22     else
23         color.y += v.y;
25     gl_Position = piglit_vertex;
28 [fragment shader]
29 varying vec2 color;
31 void main()
33   gl_FragColor = vec4(color, 0.0, 1.0);
36 [test]
37 uniform float x 3.0
38 uniform float y 3.0
39 uniform vec2 v 0.25 0.25
40 draw rect -1 -1 2 2
41 probe all rgba 0.25 0 0 1