fix the spelling in whole piglit
[piglit.git] / tests / spec / glsl-1.50 / execution / fragcoord-layout-qualifiers-conflicting-case-6.shader_test
blob24884d5d5835e1d8b829cdaea12bd071f1b5ad8e
1 /* Section 4.3.8.1 (Input Layout Qualifiers) of the GLSL 1.50 spec says:
2  *
3  *     "Fragment shaders can have an input layout only for redeclaring the
4  *     built-in variable gl_FragCoord (see section 7.2 Fragment Shader
5  *     Special Variables). The layout qualifier identifiers for
6  *     gl_FragCoord are
7  *
8  *     layout-qualifier-id:
9  *         origin_upper_left
10  *         pixel_center_integer"
11  *
12  *
13  *     "If gl_FragCoord is redeclared in any fragment shader in a program,
14  *      it must be redeclared in all the fragment shaders in that program
15  *      that have a static use gl_FragCoord. All redeclarations of
16  *      gl_FragCoord in all fragment shaders in a single program must have
17  *      the same set of qualifiers."
18  *
19  * Tests the case when only the fragment shaders which don't use gl_FragCoord,
20  * redeclare it with conflicting layout qualifiers. GLSL 1.50 expects the
21  * redeclarations in all the fragment shaders to match.
22  */
23 [require]
24 GLSL >= 1.50
27 [vertex shader passthrough]
29 [fragment shader]
31 layout(pixel_center_integer) in vec4 gl_FragCoord;
32 out vec4 fragcolor;
33 void alpha();
34 void blue();
35 void main()
37      fragcolor = vec4(gl_FragCoord.xy, 0.0, 1.0);
38      blue();
39      alpha();
42 [fragment shader]
44 layout(pixel_center_integer) in vec4 gl_FragCoord;
45 out vec4 fragcolor;
46 void alpha()
48      fragcolor.a = gl_FragCoord.z;
51 [fragment shader]
53 layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;
54 out vec4 fragcolor;
55 void blue()
57      fragcolor.b = 1.0;
60 [test]
61 link error