Skip to content

Commit

Permalink
glsl-1.50: Test the minimum maximum of gl_MaxCombinedTextureImageUnits
Browse files Browse the repository at this point in the history
The new minimum maximum for gl_MaxCombinedTextureImageUnits is 48

Reviewed-by: Matt Turner <mattst88@gmail.com>
  • Loading branch information
nichmack committed Jul 31, 2013
1 parent b4e924b commit 5eaa07f
Showing 1 changed file with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5eaa07f

Please sign in to comment.