[Piglit] [PATCH] glsl-1.20: test declaring gl_Position with the invariant qualifier.

Brian Paul brianp at vmware.com
Tue Oct 18 23:28:36 UTC 2016


To exercise a Mesa GLSL regression.
---
 .../linker/invariant-position.shader_test          | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 tests/spec/glsl-1.20/linker/invariant-position.shader_test

diff --git a/tests/spec/glsl-1.20/linker/invariant-position.shader_test b/tests/spec/glsl-1.20/linker/invariant-position.shader_test
new file mode 100644
index 0000000..4bbed5b
--- /dev/null
+++ b/tests/spec/glsl-1.20/linker/invariant-position.shader_test
@@ -0,0 +1,26 @@
+[require]
+GLSL >= 1.20
+
+# This test exercises a Mesa GLSL regression where declaring a pre-defined
+# VS input as 'invariant' cause a linker failure.
+
+[vertex shader]
+#version 120
+invariant gl_Position;
+void main()
+{
+  gl_Position = ftransform();
+}
+
+
+[fragment shader]
+#version 120
+void main()
+{
+   gl_FragColor = vec4(1.0);
+}
+
+
+[test]
+draw rect -1 -1 2 2
+probe rgba 0 0  1 1 1 1
-- 
1.9.1



More information about the Piglit mailing list