triangle clipping causes wrong vertex's attribute to be broadcasted for flat interpolation
@imirkin
Submitted by Ilia Mirkin Assigned to mes..@..op.org
Description
See example at generated_tests/spec/glsl-1.10/execution/interpolation/interpolation-none-gl_FrontColor-flat-fixed.shader_test
This sets a position s.t. the clipping at +/-1 takes effect. And it works just fine - the clipped result is correct. However the color output is green instead of blue - the first vertex's color is broadcast to the new triangles rather than the last vertex's color.
I traced through the code a bit, and it seems to want to do the right thing, but for some reason doesn't. Smooth shading works fine in this clipping scenario.
With user-provided clip planes (or distances), i.e. in where the clipping stage does nothing, the color is picked correctly.
Version: git