[Piglit] [PATCH 10/15] arb_tessellation_shader: Negative test without required layout qualifiers.
Fabian Bieler
fabianbieler at fastmail.fm
Mon Mar 24 15:02:49 PDT 2014
Tessellation control shaders require the vertices output layout qualifier.
Tessellation evaluation shaders require the primitive mode input layout
qualifier. Test that linnking fails without them.
Signed-off-by: Fabian Bieler <fabianbieler at fastmail.fm>
---
.../compiler/no-input-layout.tese | 17 +++++++++++++++++
.../compiler/no-output-layout.tesc | 21 +++++++++++++++++++++
2 files changed, 38 insertions(+)
create mode 100644 tests/spec/arb_tessellation_shader/compiler/no-input-layout.tese
create mode 100644 tests/spec/arb_tessellation_shader/compiler/no-output-layout.tesc
diff --git a/tests/spec/arb_tessellation_shader/compiler/no-input-layout.tese b/tests/spec/arb_tessellation_shader/compiler/no-input-layout.tese
new file mode 100644
index 0000000..2e34d5f
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/no-input-layout.tese
@@ -0,0 +1,17 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// check_link: true
+// [end config]
+//
+// From the ARB_tessellation_shader spec:
+//
+// At least one tessellation evaluation shader (compilation unit) in a
+// program must declare a primitive mode in its input layout;
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+//layout(triangles, equal_spacing, ccw) in;
+
+void main() { gl_Position = vec4(0.0);}
diff --git a/tests/spec/arb_tessellation_shader/compiler/no-output-layout.tesc b/tests/spec/arb_tessellation_shader/compiler/no-output-layout.tesc
new file mode 100644
index 0000000..6237e10
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/no-output-layout.tesc
@@ -0,0 +1,21 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// check_link: true
+// [end config]
+//
+// From the ARB_tessellation_shader spec:
+//
+// There must be at least one layout qualifier specifying an output patch
+// vertex count in any program containing tessellation control shaders;
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+//layout(vertices = 3) out;
+
+void main() {
+ gl_out[gl_InvocationID].gl_Position = vec4(0.0);
+ gl_TessLevelOuter = float[4](1.0, 1.0, 1.0, 1.0);
+ gl_TessLevelInner = float[2](1.0, 1.0);
+}
--
1.8.3.2
More information about the Piglit
mailing list