[Piglit] [PATCH 1/2] arb_explicit_uniform_location: compile tests of index qualifier for subroutines

Timothy Arceri timothy.arceri at collabora.com
Sun Nov 1 16:02:19 PST 2015


Test results:
Nvidia GeForce 840M - NVIDIA 352.41: pass
---
 .../compiler/layout-subroutine-index.vert                | 14 ++++++++++++++
 .../compiler/layout-qualifier-index-invalid.vert         | 16 ++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-index.vert
 create mode 100644 tests/spec/arb_shader_subroutine/compiler/layout-qualifier-index-invalid.vert

diff --git a/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-index.vert b/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-index.vert
new file mode 100644
index 0000000..1a9a7c5
--- /dev/null
+++ b/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-index.vert
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine GL_ARB_explicit_uniform_location
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+#extension GL_ARB_explicit_uniform_location: require
+
+subroutine void func_type();
+
+/* A subroutine matching the above type */
+layout(index = 2) subroutine (func_type) void f() {}
diff --git a/tests/spec/arb_shader_subroutine/compiler/layout-qualifier-index-invalid.vert b/tests/spec/arb_shader_subroutine/compiler/layout-qualifier-index-invalid.vert
new file mode 100644
index 0000000..dd8ce7a
--- /dev/null
+++ b/tests/spec/arb_shader_subroutine/compiler/layout-qualifier-index-invalid.vert
@@ -0,0 +1,16 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine
+// [end config]
+//
+// ARB_explicit_uniform_location spec allows a layout qualifier for
+// subroutines, test for compile error when this is not available.
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+
+subroutine void func_type();
+
+/* A subroutine matching the above type */
+layout(index = 2) subroutine (func_type) void f() {}
-- 
2.4.3



More information about the Piglit mailing list