Module: Mesa
Branch: master
Commit: a4b222ac135c28a3bc95cc0d9fd29378540c8def
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a4b222ac135c28a3bc95cc0d9fd29378540c8def

Author: Eric Anholt <e...@anholt.net>
Date:   Mon Dec 23 01:56:26 2013 -0800

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 <kenn...@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.roman...@intel.com>
Reviewed-by: Anuj Phogat <anuj.pho...@gmail.com>

---

 src/mesa/drivers/dri/i965/intel_pixel_read.c |    3 +--
 1 file changed, 1 insertion(+), 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 08cb762..0f6d2aa 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,

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to