iris: Handle resource offsets in buffer copies

Fixes: c5b22441f1c ("iris: Fix buffer -> buffer copy_region")
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15811>
(cherry picked from commit ea185aef032f99da21a1797f38d8f34b1816bba7)
This commit is contained in:
Jason Ekstrand 2022-04-07 17:51:04 -05:00 committed by Dylan Baker
parent 0320c2b137
commit c0e6fe20f9
2 changed files with 3 additions and 3 deletions

View File

@ -2065,7 +2065,7 @@
"description": "iris: Handle resource offsets in buffer copies",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "c5b22441f1c3a77027af4306f09ea6d1f20d00ab"
},

View File

@ -684,13 +684,13 @@ iris_copy_region(struct blorp_context *blorp,
if (dst->target == PIPE_BUFFER && src->target == PIPE_BUFFER) {
struct blorp_address src_addr = {
.buffer = src_res->bo, .offset = src_box->x,
.buffer = src_res->bo, .offset = src_res->offset + src_box->x,
.mocs = iris_mocs(src_res->bo, &screen->isl_dev,
ISL_SURF_USAGE_TEXTURE_BIT),
.local_hint = iris_bo_likely_local(src_res->bo),
};
struct blorp_address dst_addr = {
.buffer = dst_res->bo, .offset = dstx,
.buffer = dst_res->bo, .offset = dst_res->offset + dstx,
.reloc_flags = EXEC_OBJECT_WRITE,
.mocs = iris_mocs(dst_res->bo, &screen->isl_dev,
ISL_SURF_USAGE_RENDER_TARGET_BIT),