[Piglit] [PATCH 04/11] arb_shader_subroutine: Add simple compiler tests for subroutines
Chris Forbes
chrisf at ijw.co.nz
Sun Aug 10 04:06:55 PDT 2014
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
.../arb_shader_subroutine/compiler/no-subroutine-var.vert | 14 ++++++++++++++
.../compiler/simple-subroutine-def.vert | 13 +++++++++++++
.../compiler/simple-subroutine-type-def.vert | 10 ++++++++++
.../compiler/simple-subroutine-uniform.vert | 13 +++++++++++++
4 files changed, 50 insertions(+)
create mode 100644 tests/spec/arb_shader_subroutine/compiler/no-subroutine-var.vert
create mode 100644 tests/spec/arb_shader_subroutine/compiler/simple-subroutine-def.vert
create mode 100644 tests/spec/arb_shader_subroutine/compiler/simple-subroutine-type-def.vert
create mode 100644 tests/spec/arb_shader_subroutine/compiler/simple-subroutine-uniform.vert
diff --git a/tests/spec/arb_shader_subroutine/compiler/no-subroutine-var.vert b/tests/spec/arb_shader_subroutine/compiler/no-subroutine-var.vert
new file mode 100644
index 0000000..f39d2b2
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/compiler/no-subroutine-var.vert
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+
+/* This is not any of the three allowed uses of
+ * `subroutine`:
+ */
+
+subroutine int x;
diff --git a/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-def.vert b/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-def.vert
new file mode 100644
index 0000000..a7c169a
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-def.vert
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+
+subroutine void func_type();
+
+/* A subroutine matching the above type */
+subroutine (func_type) void f() {}
diff --git a/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-type-def.vert b/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-type-def.vert
new file mode 100644
index 0000000..1a36fac
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-type-def.vert
@@ -0,0 +1,10 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+
+subroutine void func_type();
diff --git a/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-uniform.vert b/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-uniform.vert
new file mode 100644
index 0000000..1d01a68
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/compiler/simple-subroutine-uniform.vert
@@ -0,0 +1,13 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+
+subroutine void func_type();
+
+/* A subroutine uniform for the above type */
+subroutine uniform func_type f;
--
2.0.4
More information about the Piglit
mailing list