triangle clipping causes wrong interpolation of non-perspective corrected attributes
Submitted by Ilia Mirkin
Assigned to mes..@..op.org
Sorry for the non-descript subject. I'm just not sure what's wrong. The following test fails:
as do many of its friends. Note that the color is meant to be non-perspective-interpolated. Also note that the flat-none.shader_test variant of this works as expected. As does the flat-vertex.shader_test variant after my perspective-interpolation for clip distances fix is applied. So it's something wrong with the clipper.
Comparing to generated_tests/spec/glsl-1.30/execution/interpolation/interpolation-smooth-gl_FrontColor-flat-fixed.shader_test, it looks different (which smoothly-interpolates the color). And there's no reason to think that color is being perspective-interpolated, as that is decided in the user frag shader. However I'm not sure what's going on - 1/w is getting messed up perhaps? Not sure.
Furthermore, note that generated_tests/spec/glsl-1.30/execution/interpolation/interpolation-smooth-gl_FrontColor-flat-fixed.shader_test does pass with swr, and the only difference is that the color is perspective-interpolated vs no-perspective-interpolated.