[Piglit] [PATCH 08/11] arb_shader_subroutine: Add simple negative linker tests
Chris Forbes
chrisf at ijw.co.nz
Sun Aug 10 04:06:59 PDT 2014
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
.../arb_shader_subroutine/linker/no-overloads.vert | 19 +++++++++++++++++++
.../linker/shared-namespace.vert | 16 ++++++++++++++++
2 files changed, 35 insertions(+)
create mode 100644 tests/spec/arb_shader_subroutine/linker/no-overloads.vert
create mode 100644 tests/spec/arb_shader_subroutine/linker/shared-namespace.vert
diff --git a/tests/spec/arb_shader_subroutine/linker/no-overloads.vert b/tests/spec/arb_shader_subroutine/linker/no-overloads.vert
new file mode 100644
index 0000000..5a95500
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/linker/no-overloads.vert
@@ -0,0 +1,19 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine
+// check_link: true
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+
+subroutine void func_type();
+
+/* A program will fail to link if any shader contains two or more
+ * functions with the same name, at least one of which is associated
+ * with a subroutine type.
+ */
+
+subroutine (func_type) void f() {}
+void f(int x) {}
diff --git a/tests/spec/arb_shader_subroutine/linker/shared-namespace.vert b/tests/spec/arb_shader_subroutine/linker/shared-namespace.vert
new file mode 100644
index 0000000..2e19fc0
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/linker/shared-namespace.vert
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine
+// check_link: true
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+
+subroutine void func_type();
+
+/* A normal function definition clashing with the subroutine
+ * type declaration
+ */
+void func_type(void);
--
2.0.4
More information about the Piglit
mailing list