[Mesa-dev] [PATCH] i965/blit: Remember to include miptree buffer offset in relocs
Kenneth Graunke
kenneth at whitecape.org
Thu Aug 3 01:07:57 UTC 2017
On Monday, July 31, 2017 2:56:15 AM PDT Chris Wilson wrote:
> Remember to add the offset to the start of the buffer in the relocation
> or else we write 0xff into random bytes elsewhere.
> ---
> 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(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
> index eca8736804..85170640d2 100644
> --- a/src/mesa/drivers/dri/i965/intel_blit.c
> +++ b/src/mesa/drivers/dri/i965/intel_blit.c
> @@ -831,11 +831,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 aeea3c8bd6..8d467adc56 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,
>
R-b and pushed with Cc: stable added:
To ssh://git.freedesktop.org/git/mesa/mesa
858f5540786..fb63c43fd1b master -> master
Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170802/8d8f70f7/attachment.sig>
More information about the mesa-dev
mailing list