[Piglit] [PATCH 1/2] glsl-1.50: Test the minimum maximum of gl_MaxCombinedTextureImageUnits

Nicholas Mack nichmack at gmail.com
Mon Jul 29 17:08:48 PDT 2013


---
 .../gl_MaxCombinedTextureImageUnits.shader_test    | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 tests/spec/glsl-1.50/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test

diff --git a/tests/spec/glsl-1.50/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test b/tests/spec/glsl-1.50/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
new file mode 100644
index 0000000..94dbbc9
--- /dev/null
+++ b/tests/spec/glsl-1.50/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
@@ -0,0 +1,39 @@
+# [description]
+# Tests for GLSL 1.50 minimum maximums for the builtin constant
+# gl_MaxCombinedTextureImageUnits.
+#
+# See the GLSL 1.50.09 specification, section 7.4, page 74.
+
+[require]
+GLSL >= 1.50
+
+[vertex shader]
+#version 150
+
+in vec4 vertex;
+
+void main(void)
+{
+	gl_Position = vertex;
+}
+
+[fragment shader]
+#version 150
+void main(void)
+{
+	if (gl_MaxCombinedTextureImageUnits >= 48)
+		gl_FragColor = vec4(0, 1, 0, 0);
+	else
+		gl_FragColor = vec4(1, 0, 0, 0);
+}
+
+[vertex data]
+vertex/float/2
+-1.0 -1.0
+ 1.0 -1.0
+ 1.0  1.0
+-1.0  1.0
+
+[test]
+draw arrays GL_TRIANGLE_FAN 0 4
+probe all rgba 0.0 1.0 0.0 0.0
-- 
1.8.3.1



More information about the Piglit mailing list