arb_program_interface_query: set vs_input2[1][0] as valid name
[piglit.git] / tests / spec / glsl-1.50 / uniform_buffer / gs-array-copy.shader_test
blob5c535047237655a01c81cf6d23d1706739220ce1
1 [require]
2 GLSL >= 1.50
4 [vertex shader]
5 #version 150
7 in vec4 vertex;
8 out vec4 vertex_to_gs;
10 void main()
12         vertex_to_gs = vertex;
15 [geometry shader]
16 #version 150
18 layout(triangles) in;
19 layout(triangle_strip, max_vertices = 3) out;
21 uniform int j;
22 uniform ubo1 {
23         vec4 colors[4];
26 in vec4 vertex_to_gs[3];
27 out vec4 v;
29 void main()
31         for (int i = 0; i < 3; i++) {
32                 gl_Position = vertex_to_gs[i];
33                 vec4 temp[4] = colors;
34                 temp[0] = vec4(1.0, 0.0, 0.0, 0.0);
35                 v = temp[j];
36                 EmitVertex();
37         }
40 [fragment shader]
41 #version 150
43 in vec4 v;
45 void main()
47         gl_FragColor = v;
50 [vertex data]
51 vertex/float/2
52 -1.0 -1.0
53  1.0 -1.0
54  1.0  1.0
55 -1.0  1.0
57 [test]
58 uniform int j 1
59 uniform vec4 colors[0] 0.0 0.0 0.0 0.0
60 uniform vec4 colors[1] 0.0 1.0 0.0 0.0
61 uniform vec4 colors[2] 0.0 1.0 1.0 0.0
62 uniform vec4 colors[3] 1.0 0.0 1.0 0.0
63 draw arrays GL_TRIANGLE_FAN 0 4
64 probe all rgba 0.0 1.0 0.0 0.0