From 5eaa07f46639c57ae2a0b87f6239f3102c9b9712 Mon Sep 17 00:00:00 2001 From: Nicholas Mack Date: Mon, 29 Jul 2013 17:04:22 -0700 Subject: [PATCH] glsl-1.50: Test the minimum maximum of gl_MaxCombinedTextureImageUnits The new minimum maximum for gl_MaxCombinedTextureImageUnits is 48 Reviewed-by: Matt Turner --- ...l_MaxCombinedTextureImageUnits.shader_test | 40 +++++++++++++++++++ 1 file changed, 40 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 000000000..11326c62f --- /dev/null +++ b/tests/spec/glsl-1.50/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test @@ -0,0 +1,40 @@ +# [description] +# Tests for GLSL 1.50 minimum maximums for the builtin constant +# gl_MaxCombinedTextureImageUnits. +# +# The new minimum maximum for gl_MaxCombinedTextureImageUnits is 48; +# 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