GitLab will be down for maintenance this Sunday 13th June, from approx 7-11am UTC. This is for a PostgreSQL migration. See the tracker issue for more informations.

Commit 48c991d2 authored by Emma Anholt's avatar Emma Anholt
Browse files

glsl-fs-texture2d-masked-[34]: New tests for 965 driver codepaths.

Turns out it got these right, so now I get to go think about other
possible failure modes.
parent 24e4952b
......@@ -430,6 +430,8 @@ add_shader_generic(shaders, 'glsl-fs-texture2d')
add_shader_generic(shaders, 'glsl-fs-texture2d-bias')
add_shader_generic(shaders, 'glsl-fs-texture2d-masked')
add_shader_generic(shaders, 'glsl-fs-texture2d-masked-2')
add_shader_generic(shaders, 'glsl-fs-texture2d-masked-3')
add_shader_generic(shaders, 'glsl-fs-texture2d-masked-4')
add_shader_generic(shaders, 'glsl-fs-texture2dproj')
add_shader_generic(shaders, 'glsl-fs-texture2dproj-2')
add_shader_generic(shaders, 'glsl-fs-texture2dproj-bias')
......
[require]
GLSL >= 1.10
[vertex shader]
varying vec4 texcoords;
void main()
{
gl_Position = gl_Vertex;
texcoords = (gl_Vertex + 1.0) / 2.0;
}
[fragment shader]
varying vec4 texcoords;
uniform sampler2D tex;
void main()
{
gl_FragColor.r = texture2D(tex, texcoords.xy).r;
gl_FragColor.g = texture2D(tex, texcoords.xy).g;
gl_FragColor.b = texture2D(tex, texcoords.xy).b;
gl_FragColor.a = texture2D(tex, texcoords.xy).a;
}
[test]
uniform int tex 0
texture rgbw 0 (8, 8)
draw rect -1 -1 2 2
relative probe rgb (0.25, 0.25) (1.0, 0.0, 0.0)
relative probe rgb (0.75, 0.25) (0.0, 1.0, 0.0)
relative probe rgb (0.25, 0.75) (0.0, 0.0, 1.0)
relative probe rgb (0.75, 0.75) (1.0, 1.0, 1.0)
[require]
GLSL >= 1.10
[vertex shader]
varying vec4 texcoords;
void main()
{
gl_Position = gl_Vertex;
texcoords = (gl_Vertex + 1.0) / 2.0;
}
[fragment shader]
varying vec4 texcoords;
uniform sampler2D tex;
void main()
{
gl_FragColor.r = texture2D(tex, texcoords.xy).r;
gl_FragColor.g = texture2D(tex, 1.0 - texcoords.xy).g;
gl_FragColor.b = texture2D(tex, texcoords.xy).b;
gl_FragColor.a = texture2D(tex, texcoords.xy).a;
}
[test]
uniform int tex 0
texture rgbw 0 (8, 8)
draw rect -1 -1 2 2
relative probe rgb (0.25, 0.25) (1.0, 1.0, 0.0)
relative probe rgb (0.75, 0.25) (0.0, 0.0, 0.0)
relative probe rgb (0.25, 0.75) (0.0, 1.0, 1.0)
relative probe rgb (0.75, 0.75) (1.0, 0.0, 1.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