Commit 1c4bf417 authored by Marcin Ślusarz's avatar Marcin Ślusarz Committed by Marge Bot

arb_derivative_control: verify interaction with flat inputs

See mesa!6564Signed-off-by: Marcin Ślusarz's avatarMarcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
Part-of: <!377>
parent 4ac05e80
Pipeline #257669 passed with stages
in 9 minutes and 33 seconds
# Check that the driver doesn't mess up derivatives for flat input.
# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6564
[require]
GLSL >= 1.50
GL_ARB_derivative_control
[vertex shader]
in vec4 piglit_vertex;
flat out vec4 test;
void main()
{
gl_Position = piglit_vertex;
test = piglit_vertex;
}
[fragment shader]
#extension GL_ARB_derivative_control: require
flat in vec4 test;
void main()
{
float dxc = dFdxCoarse(test.x);
float dyc = dFdyCoarse(test.x);
float dxf = dFdxFine(test.x);
float dyf = dFdyFine(test.x);
if (dxc == 0 && dyc == 0 && dxf == 0 && dyf == 0)
gl_FragColor = vec4(0, 1, 0, 1);
else
gl_FragColor = vec4(1, 0, 0, 1);
}
[test]
draw rect -1 -1 2 2
probe all rgba 0.0 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