summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/egl/x11/native_x11.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2013-06-04 03:20:55 +0200
committerRoland Scheidegger <sroland@vmware.com>2013-06-05 00:29:47 +0200
commit008fd036007a9e71f669ca49c87767fd19fd77e1 (patch)
treebcd95f1d8e15cacb9ba5d40d1b005b1b4cf36913 /src/gallium/state_trackers/egl/x11/native_x11.c
parentffe2a1ca3c097661dd3f6e3ca5cfd72be184426c (diff)
llvmpipe: improve alignment calculation for fetching/storing pixels
This was always doing per-pixel alignment which isn't necessary, except for the buffer case (due to the per-element offset). The disabled code for calculating it was incorrect because it assumed that always the full block would be fetched, which may not be the case, so fix this up. The original code failed for instance for r10g10b10a2 the alignment would have been calculated as 4 (block_width) * 4 (bytes) so 16, but the actual fetch may have only fetched 2 values at a time, hence only alignment 8 - it is unclear what exactly would happen in this case (alignment larger than size to fetch). So just use the (already calculated) fetch size instead and get alignment from that which should always work, no matter if fetching 1,2 or 4 pixels. Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/state_trackers/egl/x11/native_x11.c')
0 files changed, 0 insertions, 0 deletions