[Piglit] [PATCH] arb_explicit_uniform_location: add test for negative layout qualifier

Timothy Arceri timothy.arceri at collabora.com
Wed Oct 21 22:10:51 PDT 2015


---
 .../compiler/layout-negative.vert                  | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 tests/spec/arb_explicit_uniform_location/compiler/layout-negative.vert

diff --git a/tests/spec/arb_explicit_uniform_location/compiler/layout-negative.vert b/tests/spec/arb_explicit_uniform_location/compiler/layout-negative.vert
new file mode 100644
index 0000000..dac099f
--- /dev/null
+++ b/tests/spec/arb_explicit_uniform_location/compiler/layout-negative.vert
@@ -0,0 +1,22 @@
+// [config]
+// expect_result: fail
+// glsl_version: 1.30
+// require_extensions: GL_ARB_explicit_attrib_location GL_ARB_explicit_uniform_location
+// [end config]
+//
+// From the ARB_explicit_uniform_location spec:
+//
+// "Valid locations for default-block uniform variable locations are in the
+// range of 0 to the implementation-defined maximum number of uniform
+// locations."
+
+#version 130
+#extension GL_ARB_explicit_attrib_location: require
+#extension GL_ARB_explicit_uniform_location: require
+vec4 vertex;
+layout(location = -1) uniform float foo;
+
+void main()
+{
+	gl_Position = vertex;
+}
-- 
2.4.3



More information about the Piglit mailing list