[Piglit] [PATCH 3/3] arb_shader_subroutine: Declare a subroutine function with an incorrect type
Ian Romanick
idr at freedesktop.org
Thu Jan 14 16:57:21 PST 2016
From: Ian Romanick <ian.d.romanick at intel.com>
This was accidentally discovered while trying to reproduce bug #93722.
NOTE: This test fails on Mesa.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
.../compiler/subroutine-type-mismatch.frag | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 tests/spec/arb_shader_subroutine/compiler/subroutine-type-mismatch.frag
diff --git a/tests/spec/arb_shader_subroutine/compiler/subroutine-type-mismatch.frag b/tests/spec/arb_shader_subroutine/compiler/subroutine-type-mismatch.frag
new file mode 100644
index 0000000..f248652
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/compiler/subroutine-type-mismatch.frag
@@ -0,0 +1,18 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+
+uniform vec2 u;
+subroutine vec4 func_type(vec2 p);
+
+
+// The type of f() does not match func_type. This should be an error.
+subroutine(func_type) float f()
+{
+ return u.r;
+}
--
2.5.0
More information about the Piglit
mailing list