On Thu, Nov 12, 2015 at 5:28 PM, Ilia Mirkin <[email protected]> wrote: > On Thu, Nov 12, 2015 at 5:22 PM, Glenn Kennard <[email protected]> > wrote: >> Tested on r600g implementation >> >> Signed-off-by: Glenn Kennard <[email protected]> >> --- >> Ported to desktop GL 4.5 from Ilia's GLES test case, needed since r600g uses >> coarse derivatives by default, and shader control over that requires >> GL_ARB_derivative_control. >> >> .../execution/helper-invocation.shader_test | 30 >> ++++++++++++++++++++++ >> 1 file changed, 30 insertions(+) >> create mode 100644 >> tests/spec/glsl-4.50/execution/helper-invocation.shader_test >> >> diff --git a/tests/spec/glsl-4.50/execution/helper-invocation.shader_test >> b/tests/spec/glsl-4.50/execution/helper-invocation.shader_test >> new file mode 100644 >> index 0000000..d72d490 >> --- /dev/null >> +++ b/tests/spec/glsl-4.50/execution/helper-invocation.shader_test >> @@ -0,0 +1,30 @@ >> +[require] >> +GL >= 4.5 >> +GLSL >= 4.50 >> +GL_ARB_derivative_control >> + >> +[vertex shader passthrough] >> + >> +[fragment shader] >> +#version 450 >> +#extension GL_ARB_derivative_control : require > > This shouldn't be necessary -- mesa should be fixed rather than adding > this here. [Also remove from requirements above.] > >> +precision highp float; > > This was just for ES, not needed here. > > With the above 2 fixed, > > Reviewed-by: Ilia Mirkin <[email protected]> > >> +out vec4 color; >> +void main() { >> + float helper = float(gl_HelperInvocation); >> + color = vec4(abs(dFdxFine(helper)), abs(dFdyFine(helper)), 0, 1);
Actually since we're doing abs and derivatives... maybe stick helper into blue? Otherwise an inverted implementation would also pass (i.e. having frag helper = 0 for the lit pixels) >> +} >> + >> +[test] >> +clear color 0.2 0.2 0.2 0.2 >> +clear >> + >> +# A single pixel being drawn, guaranteed that both the X and Y >> +# derivatives will be 1. >> +draw rect ortho 0 0 1 1 >> +probe rect rgba (0, 0, 1, 1) (1, 1, 0, 1) >> + >> +# A larger rect being drawn, check that the first 2x2 quad, all of >> +# which is definitely going to be covered, actually ended up as all 0's >> +draw rect ortho 2 2 10 10 >> +probe rect rgba (2, 2, 2, 2) (0, 0, 0, 1) >> -- >> 1.9.1 >> >> _______________________________________________ >> Piglit mailing list >> [email protected] >> http://lists.freedesktop.org/mailman/listinfo/piglit _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
