Bug 110451

Summary: triangle strip clipping with GL_FIRST_VERTEX_CONVENTION causes wrong vertex's attribute to be broadcasted for flat interpolation
Product: Mesa Reporter: Zebediah Figura <z.figura12>
Component: Drivers/Gallium/llvmpipeAssignee: mesa-dev
Status: RESOLVED MOVED QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Zebediah Figura 2019-04-16 15:13:23 UTC
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.
Comment 1 GitLab Migration User 2019-09-18 18:33:38 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/250.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.