i965: Fix intel_bufferobj_buffer range for blit drawpixels.
authorEric Anholt <eric@anholt.net>
Fri, 25 Apr 2014 22:14:47 +0000 (15:14 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 1 May 2014 22:12:27 +0000 (15:12 -0700)
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 <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
src/mesa/drivers/dri/i965/intel_pixel_draw.c

index 96bbd3d0bb76e9b0cc19d39eb225defa8157c3e6..b46bf2616824abde6dac9c34591441a70c9b7ffd 100644 (file)
@@ -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,