Commit f5bf1906 authored by Ouping Zhang's avatar Ouping Zhang Committed by Kenneth Graunke
Browse files

Add additional tests for the GLSL 1.30 textureSize() function.

(Imported from Bugzilla; unnecessary precision qualifiers removed.)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44339

Signed-off-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
parent 84db9e92
[require]
GLSL >= 1.30
[vertex shader]
#version 130
void main() { gl_Position = gl_Vertex; }
[fragment shader]
#version 130
uniform sampler2D tex;
void main()
{
gl_FragColor = vec4(0,(textureSize(tex, 0)==ivec2(1024, 1024)),0,1);
}
[test]
texture checkerboard 0 0 (1024, 1024) (0.0, 0.0, 0.0, 0.0) (0.0, 0.0, 0.0, 0.0)
uniform int tex 0
draw rect -1 -1 2 2
relative probe rgb (0.75, 0.75) (0.0, 1.0, 0.0)
[require]
GLSL >= 1.30
[fragment shader]
#version 130
void main() { gl_FragColor = gl_Color; }
[vertex shader]
#version 130
uniform sampler2D tex;
void main()
{
gl_Position = gl_Vertex;
gl_FrontColor = vec4(0,(textureSize(tex, 0)==ivec2(1024, 1024)),0,1);
}
[test]
texture checkerboard 0 0 (1024, 1024) (0.0, 0.0, 0.0, 0.0) (0.0, 0.0, 0.0, 0.0)
uniform int tex 0
draw rect -1 -1 2 2
relative probe rgb (0.75, 0.75) (0.0, 1.0, 0.0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment