Bug 26623

Summary: Fix left side clipping in swrast
Product: Mesa Reporter: Mathias Fröhlich <M.Froehlich>
Component: Drivers/X11Assignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: test program
Proposed fix

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.