Bug 46632

Summary: Make the alignment checks for the readpixel blit fastpath a bit more lenient
Product: Mesa Reporter: Neil Roberts <nroberts>
Component: Drivers/DRI/i965Assignee: Eric Anholt <eric>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: intel_read_pixel: Accept alignments that are equivalent to 1

Description Neil Roberts 2012-02-25 17:50:11 UTC
Created attachment 57647 [details] [review]
intel_read_pixel: Accept alignments that are equivalent to 1

When deciding whether to use the blitter to implement the read pixels,
it had a restriction that pack->Alignment must be 1. However it should
at least be possible to accept alignments that are equivalent to 1.
For example, if the rowLength is 4 for an image with 4 cpp then the
rowstride is a multiple of 8 so none of the alignment values will
affect the rowstride and they are all equivalent.
Comment 1 Eric Anholt 2013-02-14 02:38:47 UTC
commit b8906adb66294e629aba58668a1851ac3fdaa391
Author: Eric Anholt <eric@anholt.net>
Date:   Wed Feb 6 17:03:49 2013 -0800

    intel: Allow blit readpixels even when the pack alignment is set.
    
    The default alignment is 4, so this fast path was rarely hit.  Rather
    than introduce logic to handle alignment, just use the Mesa core
    function.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46632
    Cc: neil@linux.intel.com
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

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.