triangle strip clipping with GL_FIRST_VERTEX_CONVENTION causes wrong vertex's attribute to be broadcasted for flat interpolation
Submitted by Zebediah Figura
Assigned to mes..@..op.org
This is superficially similar to bug 98846, but not identical.
It affects softpipe and llvmpipe at least. When drawing clipped triangle strips (and, I believe, only triangle strips), and using GL_FIRST_VERTEX_CONVENTION, the wrong vertex of every other clipped triangle is broadcasted for flat interpolation. This seems to be because do_clip_tri() in src/gallium/auxiliary/draw/draw_pipe_clip.c gets passed the vertices in winding order, but assumes the first vertex will be the provoking vertex (when in reality it may be the second).
This causes failures in Wine's conformance test suite, since we use GL_FIRST_VERTEX_CONVENTION universally, and test flat shading with GL_TRIANGLESTRIP and some vertices slightly clipped outside of the viewport. Since our test suite is run in a virtual machine, it uses llvmpipe, and so is affected by this bug.
I'm not familiar with Mesa, but I'd like to at least take a shot at fixing this. I guess the first step is to add a new test to piglit.