Mesa (main): zink: don't add mem allocation offset when copying buf2image
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jul 2 03:39:42 UTC 2021
Module: Mesa
Branch: main
Commit: 46695dd93816a335bdfc0097200fe99f5640f856
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=46695dd93816a335bdfc0097200fe99f5640f856
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Thu May 13 08:40:04 2021 -0400
zink: don't add mem allocation offset when copying buf2image
this doesn't apply to any image/buffer operations, it's solely for memory
allocation/binding/mapping
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11687>
---
src/gallium/drivers/zink/zink_resource.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index 79ab3542c7e..455954e98f6 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -782,10 +782,10 @@ zink_transfer_copy_bufimage(struct zink_context *ctx,
struct pipe_box box = trans->base.b.box;
int x = box.x;
if (buf2img)
- box.x = src->obj->offset + trans->offset;
+ box.x = trans->offset;
if (dst->obj->transfer_dst)
- zink_copy_image_buffer(ctx, NULL, dst, src, trans->base.b.level, buf2img ? x : dst->obj->offset,
+ zink_copy_image_buffer(ctx, NULL, dst, src, trans->base.b.level, buf2img ? x : 0,
box.y, box.z, trans->base.b.level, &box, trans->base.b.usage);
else
util_blitter_copy_texture(ctx->blitter, &dst->base.b, trans->base.b.level,
More information about the mesa-commit
mailing list