Bug 26623 - Fix left side clipping in swrast
Summary: Fix left side clipping in swrast
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/X11 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-18 02:41 UTC by Mathias Fröhlich
Modified: 2010-02-18 08:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
test program (3.05 KB, text/x-c)
2010-02-18 02:41 UTC, Mathias Fröhlich
Details
Proposed fix (2.84 KB, patch)
2010-02-18 02:41 UTC, Mathias Fröhlich
Details | Splinter Review

Description Mathias Fröhlich 2010-02-18 02:41:12 UTC
Created attachment 33382 [details]
test program

The swrast module does incorrect clipping of scan lines when they need to be clipped from the left side.

Attached is a small test program which shows one part of the problem, that is the color attribute not being correctly clipped.
But other attributes are not correctly clipped as well.
For example the fixed function texture 0 coordinate which was the original problem in a huger application.

Also attached is a patch originally against Mesa-7.5.2, but still valid for all versions in between up to mesa git of today.
This patch fixes all those problems that I could reproduce in our application as well as the attached example.
The patch just includes a 'monkey see - monkey do' change to correct all arrays in and attributes a SWspan by the leftClip amount of pixels.

Please apply or fix in a different way.

Thanks!

Mathias
Comment 1 Mathias Fröhlich 2010-02-18 02:41:49 UTC
Created attachment 33383 [details] [review]
Proposed fix
Comment 2 Brian Paul 2010-02-18 08:39:42 UTC
Thanks.  I modified your patch a bit and committed it to the 7.7 branch (7c34c237a2f6732b2c013543523617e375c1f534).


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.