-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
glsl-1.50: Test the minimum maximum of gl_MaxCombinedTextureImageUnits
The new minimum maximum for gl_MaxCombinedTextureImageUnits is 48 Reviewed-by: Matt Turner <mattst88@gmail.com>
- Loading branch information
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
tests/spec/glsl-1.50/execution/maximums/gl_MaxCombinedTextureImageUnits.shader_test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |