framework/replay: disable AA accounting when comparing with no tolerance
[piglit.git] / tests / spec / glsl-1.50 / linker / interface-vs-named-to-fs-array.shader_test
blob214534e8747e480236e8c2de00568f4788f811a1
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 named VS output interface
13 # to an FS input interface array fails.
15 [require]
16 GLSL >= 1.50
18 [vertex shader]
19 in vec4 piglit_vertex;
21 out block {
22   vec4 a;
23   vec4 b;
24 } inst;
26 out float ref;
28 void main()
30   gl_Position = piglit_vertex;
31   ref = 10.0 * float(gl_VertexID);
32   inst.a = ref + vec4(0.0, 1.0, 2.0, 3.0);
33   inst.b = ref + vec4(4.0, 5.0, 6.0, 7.0);
36 [fragment shader]
37 in block {
38   vec4 a;
39   vec4 b;
40 } inst[2];
42 in float ref;
44 void main()
46   bool ok = true;
47   if (distance(inst[0].a, ref + vec4(0.0, 1.0, 2.0, 3.0)) > 1.0e-5)
48     ok = false;
49   if (distance(inst[1].b, ref + vec4(4.0, 5.0, 6.0, 7.0)) > 1.0e-5)
50     ok = false;
51   gl_FragColor = ok ? vec4(0.0, 1.0, 0.0, 1.0) : vec4(1.0, 0.0, 0.0, 1.0);
54 [test]
55 link error