[Piglit] [PATCH 14/15] arb_tessellation_shader: Negative test output-layout size mismatch.

Fabian Bieler fabianbieler at fastmail.fm
Mon Mar 24 15:02:53 PDT 2014


>From the ARB_tessellation_shader spec (Section 4.3.8.2):

  "It is a compile-time error if the output patch vertex count specified in
  an output layout qualifier does not match the array size specified in any
  output variable declaration in the same shader."

Signed-off-by: Fabian Bieler <fabianbieler at fastmail.fm>
---
 .../compiler/output-size-mismatch.tesc             | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 tests/spec/arb_tessellation_shader/compiler/output-size-mismatch.tesc

diff --git a/tests/spec/arb_tessellation_shader/compiler/output-size-mismatch.tesc b/tests/spec/arb_tessellation_shader/compiler/output-size-mismatch.tesc
new file mode 100644
index 0000000..34b4e8b
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/output-size-mismatch.tesc
@@ -0,0 +1,24 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// [end config]
+//
+// From the ARB_tessellation_shader spec (Section 4.3.8.2):
+//
+//  "It is a compile-time error if the output patch vertex count specified in
+//  an output layout qualifier does not match the array size specified in any
+//  output variable declaration in the same shader."
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+
+layout(vertices = 3) out;
+
+out vec4 four_not_equal_three[4];
+
+/* Some compilers generate spurious errors if a shader does not contain
+ * any code or declarations.
+ */
+int foo(void) { return 1; }
+
-- 
1.8.3.2



More information about the Piglit mailing list