arb_program_interface_query: set vs_input2[1][0] as valid name
[piglit.git] / tests / spec / glsl-1.30 / execution / vs-attrib-uvec4-implied.shader_test
blobaab6d78afff8905a37457a2fd68cf83a60e79e2f
1 # Check that unspecified components of vertex attributes are properly
2 # filled in when the type is uvec4.
4 # This test sends the vertex shader a pair of vertex attributes of
5 # type uvec4.  For the first attribute, it passes a size of 1,
6 # indidcating that the only specified value is the x component, and
7 # the y, z, and w components are implied to be 0, 0, and 1,
8 # respectively.  For the second attribute, it passes a size of 4, and
9 # specifies the values y=0, z=0, and w=1 explicitly.  The vertex
10 # shader verifies that the two vertex attributes are equal.  This
11 # verifies that the GL implementation properly filled in the values 0,
12 # 0, and 1 in the first attribute.
14 [require]
15 GLSL >= 1.30
17 [vertex shader]
18 #version 130
19 attribute vec4 vertex;
20 attribute uvec4 x;
21 attribute uvec4 y;
23 void main()
25         gl_Position = vertex;
26         if (x == y)
27                 gl_FrontColor = vec4(0.0, 1.0, 0.0, 1.0);
28         else
29                 gl_FrontColor = vec4(1.0, 0.0, 0.0, 1.0);
32 [fragment shader]
33 #version 130
34 void main()
36         gl_FragColor = gl_Color;
39 [vertex data]
40 vertex/float/2 x/uint/1    y/uint/4
41 -1.0 -1.0      0xa62b25d1  0xa62b25d1 0 0 1
42  1.0 -1.0      0x19eb64f2  0x19eb64f2 0 0 1
43  1.0  1.0      0x098b61e0  0x098b61e0 0 0 1
44 -1.0  1.0      0xb0741d16  0xb0741d16 0 0 1
46 [test]
47 draw arrays GL_QUADS 0 4
48 probe all rgba 0.0 1.0 0.0 1.0