Bug 46632 - Make the alignment checks for the readpixel blit fastpath a bit more lenient
Make the alignment checks for the readpixel blit fastpath a bit more lenient
Status: RESOLVED FIXED
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965
git
Other All
: medium normal
Assigned To: Eric Anholt
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-25 17:50 UTC by Neil Roberts
Modified: 2013-02-14 02:38 UTC (History)
0 users

See Also:


Attachments
intel_read_pixel: Accept alignments that are equivalent to 1 (1.77 KB, patch)
2012-02-25 17:50 UTC, Neil Roberts
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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>