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 <kenneth@whitecape.org> Cc: mesa-stable@lists.freedesktop.org
This commit is contained in:

committed by
Kenneth Graunke

parent
858f554078
commit
fb63c43fd1
@@ -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);
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user