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 24e4952b authored by Emma Anholt's avatar Emma Anholt
Browse files

glsl-link-varyings: More tests for mapping of varyings between VS and FS.

It turns out that, like gl_PointSize, 965 has issues with gl_BackColor
trashing user-defined varyings.
parent 493e7d32
......@@ -696,6 +696,9 @@ add_plain_test(shaders, 'glsl-link-initializer-06')
add_plain_test(shaders, 'glsl-link-invariant-01')
add_plain_test(shaders, 'glsl-link-centroid-01')
add_plain_test(shaders, 'glsl-link-struct-array')
add_shader_generic(shaders, 'glsl-link-varyings-1')
add_shader_generic(shaders, 'glsl-link-varyings-2')
add_shader_generic(shaders, 'glsl-link-varyings-3')
add_shader_generic(shaders, 'glsl-link-varying-TexCoord')
add_shader_generic(shaders, 'glsl-override-builtin')
add_shader_generic(shaders, 'glsl-override-builtin-2')
......
[require]
GLSL >= 1.10
[vertex shader]
varying vec4 gl_TexCoord[3];
void main()
{
gl_TexCoord[0] = vec4(0.0, 1.0, 0.0, 1.0);
gl_TexCoord[1] = vec4(1.0, 0.0, 0.0, 1.0);
gl_TexCoord[2] = vec4(0.0, 0.0, 1.0, 1.0);
gl_Position = ftransform();
}
[fragment shader]
varying vec4 gl_TexCoord[3];
void main()
{
gl_FragColor = gl_TexCoord[0] + gl_TexCoord[2];
}
[test]
draw rect -1 -1 2 2
probe all rgba 0.0 1.0 1.0 1.0
[require]
GLSL >= 1.10
[vertex shader]
varying vec4 gl_TexCoord[2];
varying vec4 color;
void main()
{
gl_TexCoord[0] = vec4(0.0, 1.0, 0.0, 1.0);
gl_TexCoord[1] = vec4(1.0, 0.0, 0.0, 1.0);
color = vec4(0.0, 0.0, 1.0, 1.0);
gl_Position = ftransform();
}
[fragment shader]
varying vec4 gl_TexCoord[3];
varying vec4 color;
void main()
{
gl_FragColor = gl_TexCoord[0] + color;
}
[test]
draw rect -1 -1 2 2
probe all rgba 0.0 1.0 1.0 1.0
[require]
GLSL >= 1.10
[vertex shader]
varying vec4 color;
void main()
{
gl_FrontColor = vec4(0.0, 0.5, 0.0, 1.0);
gl_BackColor = vec4(0.0, 0.0, 0.5, 1.0);
color = vec4(0.0, 0.0, 1.0, 1.0);
gl_Position = ftransform();
}
[fragment shader]
varying vec4 gl_TexCoord[1];
varying vec4 color;
void main()
{
gl_FragColor = gl_Color + color;
}
[test]
draw rect -1 -1 2 2
probe all rgba 0.0 0.5 1.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