aboutsummaryrefslogtreecommitdiff
path: root/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxTextureImageUnits.shader_test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spec/glsl-es-1.00/execution/maximums/gl_MaxTextureImageUnits.shader_test')
-rw-r--r--tests/spec/glsl-es-1.00/execution/maximums/gl_MaxTextureImageUnits.shader_test29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxTextureImageUnits.shader_test b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxTextureImageUnits.shader_test
new file mode 100644
index 00000000..e1b0ed7b
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/execution/maximums/gl_MaxTextureImageUnits.shader_test
@@ -0,0 +1,29 @@
+# [description]
+# Tests for GLSL ES 1.00 minimum maximums for the builtin constants.
+#
+# See the GLSL ES 1.0.17 specification, section 7.4, page 61.
+
+[require]
+GLSL ES >= 1.00
+GL ES >= 2.0
+
+[vertex shader]
+attribute vec4 vertex;
+
+void main(void)
+{
+ gl_Position = vertex;
+}
+
+[fragment shader]
+void main(void)
+{
+ if (gl_MaxTextureImageUnits >= 8)
+ gl_FragColor = vec4(0, 1, 0, 0);
+ else
+ gl_FragColor = vec4(1, 0, 0, 0);
+}
+
+[test]
+draw rect -1 -1 2 2
+probe all rgba 0.0 1.0 0.0 0.0