<div dir="ltr">**NAK this patch. These are duplicate tests and incorrect.**</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 1, 2013 at 1:57 PM, Steve Miller <span dir="ltr"><<a href="mailto:dervishx@gmail.com" target="_blank">dervishx@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Shader_runner tests for consistency of redeclaration rules for gl_FragCoord in GL 3.2. Tests fail because compiler does not support this feature at this time.<br>
<br>
v2 commit : corrected error not typecasting fragcoord info to fragcolor<br>
---<br>
...laration-consistent-qualifiers-fail.shader_test | 50 ++++++++++++++++++++++<br>
...-consistent-qualifiers-nothing-pass.shader_test | 50 ++++++++++++++++++++++<br>
...laration-consistent-qualifiers-pass.shader_test | 50 ++++++++++++++++++++++<br>
3 files changed, 150 insertions(+)<br>
create mode 100644 tests/spec/arb_fragment_coord_conventions/linker/redeclaration-consistent-qualifiers-fail.shader_test<br>
create mode 100644 tests/spec/arb_fragment_coord_conventions/linker/redeclaration-consistent-qualifiers-nothing-pass.shader_test<br>
create mode 100644 tests/spec/arb_fragment_coord_conventions/linker/redeclaration-consistent-qualifiers-pass.shader_test<br>
<br>
diff --git a/tests/spec/arb_fragment_coord_conventions/linker/redeclaration-consistent-qualifiers-fail.shader_test b/tests/spec/arb_fragment_coord_conventions/linker/redeclaration-consistent-qualifiers-fail.shader_test<br>
new file mode 100644<br>
index 0000000..c0caada<br>
--- /dev/null<br>
+++ b/tests/spec/arb_fragment_coord_conventions/linker/redeclaration-consistent-qualifiers-fail.shader_test<br>
@@ -0,0 +1,50 @@<br>
+/* Test case multiple FS in program:<br>
+* Test that gl_FragCoord redeclaration must be consistent across shaders<br>
+* in program.<br>
+*<br>
+* Section 4.3.8.1 (Input Layout Qualifiers) of GLSL 1.50 spec says:<br>
+* If gl_FragCoord is redeclared in any fragment shader in a program, it must<br>
+* be redeclared in all the fragment shaders in that program that have a static<br>
+* use gl_FragCoord. All redeclarations of gl_FragCoord in all fragment shaders<br>
+* in a single program must have the same set of qualifiers.<br>
+*<br>
+* This test is part of a series ensuring linker success/failure<br>
+* under various combinations of gl_FragCoord redeclaration.<br>
+*/<br>
+<br>
+[require]<br>
+GLSL >= 1.50<br>
+<br>
+[fragment shader]<br>
+#version 150<br>
+<br>
+layout(origin_upper_left) in vec4 gl_FragCoord;<br>
+<br>
+void main() {<br>
+ gl_FragColor = vec4 (gl_FragCoord.x, gl_FragCoord.y,<br>
+ gl_FragCoord.z, gl_FragCoord.w);<br>
+}<br>
+<br>
+[fragment shader]<br>
+#version 150<br>
+<br>
+layout(pixel_center_integer) in vec4 gl_FragCoord;<br>
+<br>
+void main() {<br>
+ gl_FragColor = vec4 (gl_FragCoord.x, gl_FragCoord.y,<br>
+ gl_FragCoord.z, gl_FragCoord.w);<br>
+}<br>
+<br>
+[fragment shader]<br>
+#version 150<br>
+<br>
+layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;<br>
+<br>
+void main() {<br>
+ gl_FragColor = vec4 (gl_FragCoord.x, gl_FragCoord.y,<br>
+ gl_FragCoord.z, gl_FragCoord.w);<br>
+}<br>
+<br>
+<br>
+[test]<br>
+link error<br>
\ No newline at end of file<br>
diff --git a/tests/spec/arb_fragment_coord_conventions/linker/redeclaration-consistent-qualifiers-nothing-pass.shader_test b/tests/spec/arb_fragment_coord_conventions/linker/redeclaration-consistent-qualifiers-nothing-pass.shader_test<br>
new file mode 100644<br>
index 0000000..6130aeb<br>
--- /dev/null<br>
+++ b/tests/spec/arb_fragment_coord_conventions/linker/redeclaration-consistent-qualifiers-nothing-pass.shader_test<br>
@@ -0,0 +1,50 @@<br>
+/* Test case multiple FS in program:<br>
+* Test that gl_FragCoord redeclaration must be consistent across shaders<br>
+* in program.<br>
+*<br>
+* Section 4.3.8.1 (Input Layout Qualifiers) of GLSL 1.50 spec says:<br>
+* If gl_FragCoord is redeclared in any fragment shader in a program, it must<br>
+* be redeclared in all the fragment shaders in that program that have a static<br>
+* use gl_FragCoord. All redeclarations of gl_FragCoord in all fragment shaders<br>
+* in a single program must have the same set of qualifiers.<br>
+*<br>
+* This test is part of a series ensuring linker success/failure<br>
+* under various combinations of gl_FragCoord redeclaration.<br>
+*/<br>
+<br>
+[require]<br>
+GLSL >= 1.50<br>
+<br>
+[fragment shader]<br>
+#version 150<br>
+<br>
+in vec4 gl_FragCoord;<br>
+<br>
+void main() {<br>
+ gl_FragColor = vec4 (gl_FragCoord.x, gl_FragCoord.y,<br>
+ gl_FragCoord.z, gl_FragCoord.w);<br>
+}<br>
+<br>
+[fragment shader]<br>
+#version 150<br>
+<br>
+in vec4 gl_FragCoord;<br>
+<br>
+void main() {<br>
+ gl_FragColor = vec4 (gl_FragCoord.x, gl_FragCoord.y,<br>
+ gl_FragCoord.z, gl_FragCoord.w);<br>
+}<br>
+<br>
+[fragment shader]<br>
+#version 150<br>
+<br>
+in vec4 gl_FragCoord;<br>
+<br>
+void main() {<br>
+ gl_FragColor = vec4 (gl_FragCoord.x, gl_FragCoord.y,<br>
+ gl_FragCoord.z, gl_FragCoord.w);<br>
+}<br>
+<br>
+<br>
+[test]<br>
+link error<br>
\ No newline at end of file<br>
diff --git a/tests/spec/arb_fragment_coord_conventions/linker/redeclaration-consistent-qualifiers-pass.shader_test b/tests/spec/arb_fragment_coord_conventions/linker/redeclaration-consistent-qualifiers-pass.shader_test<br>
new file mode 100644<br>
index 0000000..8a5aeea<br>
--- /dev/null<br>
+++ b/tests/spec/arb_fragment_coord_conventions/linker/redeclaration-consistent-qualifiers-pass.shader_test<br>
@@ -0,0 +1,50 @@<br>
+/* Test case multiple FS in program:<br>
+* Test that gl_FragCoord redeclaration must be consistent across shaders<br>
+* in program.<br>
+*<br>
+* Section 4.3.8.1 (Input Layout Qualifiers) of GLSL 1.50 spec says:<br>
+* If gl_FragCoord is redeclared in any fragment shader in a program, it must<br>
+* be redeclared in all the fragment shaders in that program that have a static<br>
+* use gl_FragCoord. All redeclarations of gl_FragCoord in all fragment shaders<br>
+* in a single program must have the same set of qualifiers.<br>
+*<br>
+* This test is part of a series ensuring linker success/failure<br>
+* under various combinations of gl_FragCoord redeclaration.<br>
+*/<br>
+<br>
+[require]<br>
+GLSL >= 1.50<br>
+<br>
+[fragment shader]<br>
+#version 150<br>
+<br>
+layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;<br>
+<br>
+void main() {<br>
+ gl_FragColor = vec4 (gl_FragCoord.x, gl_FragCoord.y,<br>
+ gl_FragCoord.z, gl_FragCoord.w);<br>
+}<br>
+<br>
+[fragment shader]<br>
+#version 150<br>
+<br>
+layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;<br>
+<br>
+void main() {<br>
+ gl_FragColor =vec4 (gl_FragCoord.x, gl_FragCoord.y,<br>
+ gl_FragCoord.z, gl_FragCoord.w);<br>
+}<br>
+<br>
+[fragment shader]<br>
+#version 150<br>
+<br>
+layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;<br>
+<br>
+void main() {<br>
+ gl_FragColor = vec4 (gl_FragCoord.x, gl_FragCoord.y,<br>
+ gl_FragCoord.z, gl_FragCoord.w);<br>
+}<br>
+<br>
+<br>
+[test]<br>
+link error<br>
\ No newline at end of file<br>
--<br>
1.8.3.1<br>
<br>
</div></div></blockquote></div><br></div>