<div dir="ltr">Can you remove the explicit #version lines in these? It will be inserted by shader_runner based on the GLSL >= 1.50.<div><br></div><div>Reviewed-by: Stuart Abercrombie <<a href="mailto:sabercrombie@chromium.org">sabercrombie@chromium.org</a>></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 12, 2013 at 1:28 PM, Jordan Justen <span dir="ltr"><<a href="mailto:jordan.l.justen@intel.com" target="_blank">jordan.l.justen@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A few tests to make sure that interface blocks are defined<br>
the same during intrastage and interstage linking.<br>
<br>
Signed-off-by: Jordan Justen <<a href="mailto:jordan.l.justen@intel.com">jordan.l.justen@intel.com</a>><br>
---<br>
...s-multiple-vs-member-count-mismatch.shader_test | 41 ++++++++++++++++++++<br>
...-blocks-vs-fs-member-count-mismatch.shader_test | 38 ++++++++++++++++++<br>
...-blocks-vs-fs-member-order-mismatch.shader_test | 39 +++++++++++++++++++<br>
3 files changed, 118 insertions(+)<br>
create mode 100644 tests/spec/glsl-1.50/linker/interface-blocks-multiple-vs-member-count-mismatch.shader_test<br>
create mode 100644 tests/spec/glsl-1.50/linker/interface-blocks-vs-fs-member-count-mismatch.shader_test<br>
create mode 100644 tests/spec/glsl-1.50/linker/interface-blocks-vs-fs-member-order-mismatch.shader_test<br>
<br>
diff --git a/tests/spec/glsl-1.50/linker/interface-blocks-multiple-vs-member-count-mismatch.shader_test b/tests/spec/glsl-1.50/linker/interface-blocks-multiple-vs-member-count-mismatch.shader_test<br>
new file mode 100644<br>
index 0000000..6e05e2f<br>
--- /dev/null<br>
+++ b/tests/spec/glsl-1.50/linker/interface-blocks-multiple-vs-member-count-mismatch.shader_test<br>
@@ -0,0 +1,41 @@<br>
+# Tests that a link error occurs when an interface block member's type<br>
+# differs between the vertex and fragment shaders.<br>
+#<br>
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:<br>
+# "Matched block names within an interface (as defined above) must match<br>
+# in terms of having the same number of declarations with the same<br>
+# sequence of types and the same sequence of member names, as well as<br>
+# having the same member-wise layout qualification (see next section)."<br>
+[require]<br>
+GLSL >= 1.50<br>
+<br>
+[vertex shader]<br>
+#version 150<br>
+<br>
+out block {<br>
+ vec4 a;<br>
+} vs1_block;<br>
+<br>
+void main()<br>
+{<br>
+ gl_Position = vec4(0.0);<br>
+}<br>
+<br>
+[vertex shader]<br>
+#version 150<br>
+<br>
+out block {<br>
+ vec4 a;<br>
+ vec4 b; // b is not present in VS #1 interface block<br>
+} vs_block;<br>
+<br>
+[fragment shader]<br>
+#version 150<br>
+<br>
+void main()<br>
+{<br>
+}<br>
+<br>
+[test]<br>
+link error<br>
+<br>
diff --git a/tests/spec/glsl-1.50/linker/interface-blocks-vs-fs-member-count-mismatch.shader_test b/tests/spec/glsl-1.50/linker/interface-blocks-vs-fs-member-count-mismatch.shader_test<br>
new file mode 100644<br>
index 0000000..7702d3b<br>
--- /dev/null<br>
+++ b/tests/spec/glsl-1.50/linker/interface-blocks-vs-fs-member-count-mismatch.shader_test<br>
@@ -0,0 +1,38 @@<br>
+# Tests that a link error occurs when an interface block member's type<br>
+# differs between the vertex and fragment shaders.<br>
+#<br>
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:<br>
+# "Matched block names within an interface (as defined above) must match<br>
+# in terms of having the same number of declarations with the same<br>
+# sequence of types and the same sequence of member names, as well as<br>
+# having the same member-wise layout qualification (see next section)."<br>
+[require]<br>
+GLSL >= 1.50<br>
+<br>
+[vertex shader]<br>
+#version 150<br>
+<br>
+out block {<br>
+ vec4 a;<br>
+} vs_block;<br>
+<br>
+void main()<br>
+{<br>
+ gl_Position = vec4(0.0);<br>
+}<br>
+<br>
+[fragment shader]<br>
+#version 150<br>
+<br>
+in block {<br>
+ vec4 a;<br>
+ vec4 b; // b is not present in VS interface block<br>
+} fs_block;<br>
+<br>
+void main()<br>
+{<br>
+}<br>
+<br>
+[test]<br>
+link error<br>
+<br>
diff --git a/tests/spec/glsl-1.50/linker/interface-blocks-vs-fs-member-order-mismatch.shader_test b/tests/spec/glsl-1.50/linker/interface-blocks-vs-fs-member-order-mismatch.shader_test<br>
new file mode 100644<br>
index 0000000..2a3c5ec<br>
--- /dev/null<br>
+++ b/tests/spec/glsl-1.50/linker/interface-blocks-vs-fs-member-order-mismatch.shader_test<br>
@@ -0,0 +1,39 @@<br>
+# Tests that a link error occurs when an interface block member's type<br>
+# differs between the vertex and fragment shaders.<br>
+#<br>
+# GLSLangSpec.1.50.11, 4.3.7 Interface Blocks:<br>
+# "Matched block names within an interface (as defined above) must match<br>
+# in terms of having the same number of declarations with the same<br>
+# sequence of types and the same sequence of member names, as well as<br>
+# having the same member-wise layout qualification (see next section)."<br>
+[require]<br>
+GLSL >= 1.50<br>
+<br>
+[vertex shader]<br>
+#version 150<br>
+<br>
+out block {<br>
+ vec4 a;<br>
+ vec4 b;<br>
+} vs_block;<br>
+<br>
+void main()<br>
+{<br>
+ gl_Position = vec4(0.0);<br>
+}<br>
+<br>
+[fragment shader]<br>
+#version 150<br>
+<br>
+in block {<br>
+ vec4 b; // b is the second member in the VS interface block<br>
+ vec4 a;<br>
+} fs_block;<br>
+<br>
+void main()<br>
+{<br>
+}<br>
+<br>
+[test]<br>
+link error<br>
+<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.10.4<br>
<br>
_______________________________________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</font></span></blockquote></div><br></div>