1 # From the GLSL 1.50 spec, section 4.3.7 (Interface Blocks):
3 # Matched block names within an interface (as defined above) must
4 # match in terms of having the same number of declarations with
5 # the same sequence of types and the same sequence of member
6 # names, as well as having the same member-wise layout
7 # qualification (see next section). Furthermore, if a matching
8 # block is declared as an array, then the array sizes must also
9 # match (or follow array matching rules for the interface between
10 # a vertex and a geometry shader).
12 # This test verifies that trying to link a VS output interface array
13 # to an unnamed FS input interface fails.
19 in vec4 piglit_vertex;
30 gl_Position = piglit_vertex;
31 ref = 10.0 * float(gl_VertexID);
32 inst[0].a = ref + vec4(0.0, 1.0, 2.0, 3.0);
33 inst[0].b = ref + vec4(4.0, 5.0, 6.0, 7.0);
34 inst[1].a = ref + vec4(0.0, 1.0, 2.0, 3.0);
35 inst[1].b = ref + vec4(4.0, 5.0, 6.0, 7.0);
49 if (distance(a, ref + vec4(0.0, 1.0, 2.0, 3.0)) > 1.0e-5)
51 if (distance(b, ref + vec4(4.0, 5.0, 6.0, 7.0)) > 1.0e-5)
53 gl_FragColor = ok ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);