[Piglit] [V3 3/4] ARB_explicit_uniform_location: test setting explicit location twice

Tapani Pälli tapani.palli at intel.com
Mon Mar 17 06:04:41 PDT 2014


This test sets different explicit location for same uniform from
different shader stage.

v2: fix style issues (Anuj)
v3: change to be a shader-runner test (Ian)

Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
 .../linker/set-explicit-location-twice.shader_test | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-twice.shader_test

diff --git a/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-twice.shader_test b/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-twice.shader_test
new file mode 100644
index 0000000..9978aac
--- /dev/null
+++ b/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-twice.shader_test
@@ -0,0 +1,26 @@
+#
+# Tests setting 2 different explicit locations to same uniform variable.
+
+[require]
+GLSL >= 1.10
+GL_ARB_explicit_uniform_location
+
+[vertex shader]
+#extension GL_ARB_explicit_uniform_location: require
+layout(location = 0) uniform vec4 foo;
+vec4 vertex;
+void main()
+{
+  gl_Position = vertex + foo;
+}
+
+[fragment shader]
+#extension GL_ARB_explicit_uniform_location: require
+layout(location = 1) uniform vec4 foo;
+void main()
+{
+  gl_FragColor = foo;
+}
+
+[test]
+link error
-- 
1.8.3.1



More information about the Piglit mailing list