summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2013-12-23 01:56:26 -0800
committerEric Anholt <[email protected]>2014-01-09 15:30:32 +0800
commita4b222ac135c28a3bc95cc0d9fd29378540c8def (patch)
treeac704faffddb62b724e5f3d2d471a366625a33b6
parent66524daf175950bd7266fc3cbb4125c24984a482 (diff)
i965: Fix incorrect bounds tracking for blit readpixels's GPU access.
While incorrect, it probably wouldn't affect anyone ever: You'd have to do an appropriately-formatted readpixels into a PBO, then overwrite the tail end of the updated area of the PBO with glBufferSubData(), and you wouldn't get appropriate synchronization. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/intel_pixel_read.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_read.c b/src/mesa/drivers/dri/i965/intel_pixel_read.c
index 08cb7624bb1..0f6d2aaa387 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_read.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_read.c
@@ -127,8 +127,7 @@ do_blit_readpixels(struct gl_context * ctx,
brw->front_buffer_dirty = dirty;
dst_buffer = intel_bufferobj_buffer(brw, dst,
- dst_offset, width * height *
- irb->mt->cpp);
+ dst_offset, height * dst_stride);
struct intel_mipmap_tree *pbo_mt =
intel_miptree_create_for_bo(brw,