[Piglit] [PATCH] glsl-1.20: test that 'invariant' qualifier does not propagate on uniforms

Danylo Piliaiev danylo.piliaiev at gmail.com
Wed Aug 22 13:12:25 UTC 2018


Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100316

Signed-off-by: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
---
 .../linker/invariant-propagation.shader_test  | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 tests/spec/glsl-1.20/linker/invariant-propagation.shader_test

diff --git a/tests/spec/glsl-1.20/linker/invariant-propagation.shader_test b/tests/spec/glsl-1.20/linker/invariant-propagation.shader_test
new file mode 100644
index 000000000..fc4096833
--- /dev/null
+++ b/tests/spec/glsl-1.20/linker/invariant-propagation.shader_test
@@ -0,0 +1,25 @@
+[require]
+GLSL >= 1.20
+
+# This test exercises a Mesa GLSL bug where 'invariant' qualifier
+# propagated on uniforms causing a linker failure due to mismatch
+# of uniforms declaration between stages.
+
+[vertex shader]
+#version 120
+uniform float t;
+invariant gl_Position;
+void main()
+{
+  gl_Position = vec4(t);
+}
+
+[fragment shader]
+#version 120
+uniform float t;
+void main()
+{
+}
+
+[test]
+link success
-- 
2.18.0



More information about the Piglit mailing list