[Piglit] [PATCH V2] arb_explicit_uniform_location: add more qualifier tests for subroutines

Timothy Arceri t_arceri at yahoo.com.au
Thu Nov 5 18:32:31 PST 2015


Test results:

layout-subroutine-index-uniform.vert:
Nvidia GeForce 840M - NVIDIA 346.47: pass
Mesa 11.1-dev - pass

layout-subroutine-location-function.vert:
Nvidia GeForce 840M - NVIDIA 346.47: pass
Mesa 11.1-dev - segfault

layout-subroutine-location.vert:
Nvidia GeForce 840M - NVIDIA 346.47: pass
Mesa 11.1-dev - pass

V2: It turns out there is what seems an artifical limitation where
either GL_ARB_explicit_attrib_location or GLSL 330 is required for
this extension. As Mesa implements this restriction for uniforms
this is now added to the uniform tests.
---
 .../compiler/layout-subroutine-index-uniform.vert         | 15 +++++++++++++++
 .../compiler/layout-subroutine-location-function.vert     | 14 ++++++++++++++
 .../compiler/layout-subroutine-location.vert              | 15 +++++++++++++++
 3 files changed, 44 insertions(+)
 create mode 100644 tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-index-uniform.vert
 create mode 100644 tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location-function.vert
 create mode 100644 tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location.vert

diff --git a/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-index-uniform.vert b/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-index-uniform.vert
new file mode 100644
index 0000000..36a27b3
--- /dev/null
+++ b/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-index-uniform.vert
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine GL_ARB_explicit_uniform_location GL_ARB_explicit_attrib_location
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+#extension GL_ARB_explicit_uniform_location: require
+#extension GL_ARB_explicit_attrib_location: require
+
+subroutine void func_type();
+
+/* A subroutine uniform for the above type */
+layout(index = 2) subroutine uniform func_type f;
diff --git a/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location-function.vert b/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location-function.vert
new file mode 100644
index 0000000..c63f3c5
--- /dev/null
+++ b/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location-function.vert
@@ -0,0 +1,14 @@
+// [config]
+// expect_result: fail
+// 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(location = 2) subroutine (func_type) void f() {}
diff --git a/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location.vert b/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location.vert
new file mode 100644
index 0000000..47b6700
--- /dev/null
+++ b/tests/spec/arb_explicit_uniform_location/compiler/layout-subroutine-location.vert
@@ -0,0 +1,15 @@
+// [config]
+// expect_result: pass
+// glsl_version: 1.50
+// require_extensions: GL_ARB_shader_subroutine GL_ARB_explicit_uniform_location GL_ARB_explicit_attrib_location
+// [end config]
+
+#version 150
+#extension GL_ARB_shader_subroutine: require
+#extension GL_ARB_explicit_uniform_location: require
+#extension GL_ARB_explicit_attrib_location: require
+
+subroutine void func_type();
+
+/* A subroutine uniform for the above type */
+layout(location = 2) subroutine uniform func_type f;
-- 
2.4.3



More information about the Piglit mailing list