summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2014-04-25 15:14:47 -0700
committerEric Anholt <[email protected]>2014-05-01 15:12:27 -0700
commitb49982de6a52fdb7d0360d608badb103d15c04f1 (patch)
tree57bbb70b949ed3caae1391d8b71f6bd13c437a30 /src/mesa/drivers/dri
parente16c5c906316c58c0633e9bba02339ef981e5ef3 (diff)
i965: Fix intel_bufferobj_buffer range for blit drawpixels.
If the stride wasn't width*cpp, we wouldn't track how much of the src is busy, and allow a subdata into the end to proceed unsynchronized. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/intel_pixel_draw.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_draw.c b/src/mesa/drivers/dri/i965/intel_pixel_draw.c
index 96bbd3d0bb7..b46bf261682 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_draw.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_draw.c
@@ -103,9 +103,8 @@ do_blit_drawpixels(struct gl_context * ctx,
src_offset += _mesa_image_offset(2, unpack, width, height,
format, type, 0, 0, 0);
- src_buffer = intel_bufferobj_buffer(brw, src,
- src_offset, width * height *
- irb->mt->cpp);
+ src_buffer = intel_bufferobj_buffer(brw, src, src_offset,
+ height * src_stride);
struct intel_mipmap_tree *pbo_mt =
intel_miptree_create_for_bo(brw,