[Piglit] [PATCH 07/11] arb_shader_subroutine: Test function signature mismatches

Chris Forbes chrisf at ijw.co.nz
Sun Aug 10 04:06:58 PDT 2014


Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
 .../compiler/subroutine-param-type-mismatch.vert            | 13 +++++++++++++
 .../compiler/subroutine-return-type-mismatch.vert           | 13 +++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 tests/spec/arb_shader_subroutine/compiler/subroutine-param-type-mismatch.vert
 create mode 100644 tests/spec/arb_shader_subroutine/compiler/subroutine-return-type-mismatch.vert

diff --git a/tests/spec/arb_shader_subroutine/compiler/subroutine-param-type-mismatch.vert b/tests/spec/arb_shader_subroutine/compiler/subroutine-param-type-mismatch.vert
new file mode 100644
index 0000000..08efdec
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/compiler/subroutine-param-type-mismatch.vert
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+
+subroutine void func_type();
+
+/* Param types don't match */
+subroutine (func_type) void f(int x) {}
diff --git a/tests/spec/arb_shader_subroutine/compiler/subroutine-return-type-mismatch.vert b/tests/spec/arb_shader_subroutine/compiler/subroutine-return-type-mismatch.vert
new file mode 100644
index 0000000..bfa4f87
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/compiler/subroutine-return-type-mismatch.vert
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+
+subroutine void func_type();
+
+/* Return types don't match */
+subroutine (func_type) int f() { return 1; }
-- 
2.0.4



More information about the Piglit mailing list