[Piglit] [PATCH 2/2] glsl-1.40-compat: add basic compat test for built-in constants

Timothy Arceri tarceri at itsqueeze.com
Mon Apr 23 06:33:43 UTC 2018


This test is copied from the glsl-1.10 tests. We just want to be
sure that these built-in are still available in a compat profile.

This was broken when compat was enabled for OpenGL 3.1 in
radeonsi. This test will help us from regressing again in future.
---
 .../execution/built-in-constants.shader_test  | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 tests/spec/glsl-1.40-compat/execution/built-in-constants.shader_test

diff --git a/tests/spec/glsl-1.40-compat/execution/built-in-constants.shader_test b/tests/spec/glsl-1.40-compat/execution/built-in-constants.shader_test
new file mode 100644
index 000000000..f738551a4
--- /dev/null
+++ b/tests/spec/glsl-1.40-compat/execution/built-in-constants.shader_test
@@ -0,0 +1,24 @@
+[require]
+GL COMPAT >= 3.1
+GLSL >= 1.40
+
+[vertex shader]
+void main()
+{
+	gl_Position = gl_Vertex;
+	// front color values should all be >= 1.0
+	gl_FrontColor = vec4(gl_MaxLights, gl_MaxClipPlanes,
+		  		gl_MaxTextureUnits,
+		  		gl_MaxTextureCoords);
+}
+
+
+[fragment shader]
+void main()
+{
+	gl_FragColor = gl_Color;
+}
+
+[test]
+draw rect -1 -1 2 2
+relative probe rgba (0.5, 0.5) (1.0, 1.0, 1.0, 1.0)
-- 
2.17.0



More information about the Piglit mailing list