[Piglit] [PATCH 2/9] arb_tessellation_shader: Add tests for TCS output size redeclaration
Andres Gomez
agomez at igalia.com
Wed Oct 26 16:14:09 UTC 2016
>From the ARB_tessellation_shader spec:
"All tessellation control shader layout declarations in a program must
specify the same output patch vertex count."
Reviewed-by: Timothy Arceri <timothy.arceri at collabora.com>
Signed-off-by: Andres Gomez <agomez at igalia.com>
---
...e-qualifier-declarations-vertices-mismatch.tesc | 23 ++++++++++++++++++++++
...t-multiple-qualifier-declarations-vertices.tesc | 23 ++++++++++++++++++++++
2 files changed, 46 insertions(+)
create mode 100644 tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices-mismatch.tesc
create mode 100644 tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices.tesc
diff --git a/tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices-mismatch.tesc b/tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices-mismatch.tesc
new file mode 100644
index 0000000..62e369e
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices-mismatch.tesc
@@ -0,0 +1,23 @@
+// [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:
+//
+// "All tessellation control shader layout declarations in a program must
+// specify the same output patch vertex count."
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+
+layout(vertices = 3) out;
+layout(vertices = 4) 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);
+}
diff --git a/tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices.tesc b/tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices.tesc
new file mode 100644
index 0000000..62a2fba
--- /dev/null
+++ b/tests/spec/arb_tessellation_shader/compiler/layout-multiple-qualifier-declarations-vertices.tesc
@@ -0,0 +1,23 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_tessellation_shader
+// check_link: true
+// [end config]
+//
+// From the ARB_tessellation_shader spec:
+//
+// "All tessellation control shader layout declarations in a program must
+// specify the same output patch vertex count."
+
+#version 150
+#extension GL_ARB_tessellation_shader: require
+
+layout(vertices = 3) out;
+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);
+}
--
2.9.3
More information about the Piglit
mailing list