[Piglit] [V3 4/4] ARB_explicit_uniform_location: set location once but decl twice

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


This test sets explicit location in vertex shader but does not set it
for same uniform in the fragment shader.

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>
---
 ...t-explicit-location-once-decl-twice.shader_test | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-once-decl-twice.shader_test

diff --git a/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-once-decl-twice.shader_test b/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-once-decl-twice.shader_test
new file mode 100644
index 0000000..e044d7a
--- /dev/null
+++ b/tests/spec/arb_explicit_uniform_location/linker/set-explicit-location-once-decl-twice.shader_test
@@ -0,0 +1,27 @@
+#
+# Tests setting explicit location to uniform in vertex stage and declaring
+# same uniform without explicit location in fragment stage.
+
+[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
+uniform vec4 foo;
+void main()
+{
+  gl_FragColor = foo;
+}
+
+[test]
+link success
-- 
1.8.3.1



More information about the Piglit mailing list