From fb63c43fd1b7adb5cb4f34e7616e7d564ca178e5 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 31 Jul 2017 10:56:15 +0100 Subject: i965/blit: Remember to include miptree buffer offset in relocs Remember to add the offset to the start of the buffer in the relocation or else we write 0xff into random bytes elsewhere. Reviewed-by: Kenneth Graunke Cc: mesa-stable@lists.freedesktop.org --- src/mesa/drivers/dri/i965/intel_blit.c | 4 ++-- src/mesa/drivers/dri/i965/intel_pixel_bitmap.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c index b1db7aa2293..a9cdf489f15 100644 --- a/src/mesa/drivers/dri/i965/intel_blit.c +++ b/src/mesa/drivers/dri/i965/intel_blit.c @@ -830,11 +830,11 @@ intel_miptree_set_alpha_to_one(struct brw_context *brw, if (brw->gen >= 8) { OUT_RELOC64(mt->bo, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, - offset); + mt->offset + offset); } else { OUT_RELOC(mt->bo, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, - offset); + mt->offset + offset); } OUT_BATCH(0xffffffff); /* white, but only alpha gets written */ ADVANCE_BATCH_TILED(dst_y_tiled, false); diff --git a/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c b/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c index aeea3c8bd6a..8d467adc56e 100644 --- a/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c +++ b/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c @@ -294,7 +294,7 @@ do_blit_bitmap( struct gl_context *ctx, color, irb->mt->surf.row_pitch, irb->mt->bo, - 0, + irb->mt->offset, irb->mt->surf.tiling, dstx + px, dsty + py, -- cgit v1.2.3