Bug 110451 - triangle strip clipping with GL_FIRST_VERTEX_CONVENTION causes wrong vertex's attribute to be broadcasted for flat interpolation
Summary: triangle strip clipping with GL_FIRST_VERTEX_CONVENTION causes wrong vertex's...
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/llvmpipe (show other bugs)
Version: git
Hardware: All All
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-16 15:13 UTC by Zebediah Figura
Modified: 2019-09-18 18:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

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.