Mesa (staging/22.1): zink: rename a variable
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 17 16:05:10 UTC 2022
Module: Mesa
Branch: staging/22.1
Commit: 689cad731dd648aa59e08af517167b45b09e7cd2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=689cad731dd648aa59e08af517167b45b09e7cd2
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Thu Jun 16 13:46:56 2022 -0400
zink: rename a variable
make this a little clearer to read
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17095>
(cherry picked from commit dd5d215c62e9a7127cea81b092d0d6b3b8986d02)
---
.pick_status.json | 2 +-
src/gallium/drivers/zink/zink_resource.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 2f336d2715a..9598c371698 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -121,7 +121,7 @@
"description": "zink: rename a variable",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/zink/zink_resource.c b/src/gallium/drivers/zink/zink_resource.c
index 20207c1f41c..963fd4cbef9 100644
--- a/src/gallium/drivers/zink/zink_resource.c
+++ b/src/gallium/drivers/zink/zink_resource.c
@@ -1824,17 +1824,17 @@ zink_transfer_flush_region(struct pipe_context *pctx,
struct zink_screen *screen = zink_screen(pctx->screen);
struct zink_resource *m = trans->staging_res ? zink_resource(trans->staging_res) :
res;
- ASSERTED VkDeviceSize size, offset;
+ ASSERTED VkDeviceSize size, src_offset;
if (m->obj->is_buffer) {
size = box->width;
- offset = trans->offset;
+ src_offset = trans->offset;
} else {
size = (VkDeviceSize)box->width * box->height * util_format_get_blocksize(m->base.b.format);
- offset = trans->offset +
+ src_offset = trans->offset +
box->z * trans->depthPitch +
util_format_get_2d_size(m->base.b.format, trans->base.b.stride, box->y) +
util_format_get_stride(m->base.b.format, box->x);
- assert(offset + size <= res->obj->size);
+ assert(src_offset + size <= res->obj->size);
}
if (!m->obj->coherent) {
VkMappedMemoryRange range = zink_resource_init_mem_range(screen, m->obj, m->obj->offset, m->obj->size);
@@ -1846,7 +1846,7 @@ zink_transfer_flush_region(struct pipe_context *pctx,
struct zink_resource *staging_res = zink_resource(trans->staging_res);
if (ptrans->resource->target == PIPE_BUFFER)
- zink_copy_buffer(ctx, res, staging_res, box->x, offset, box->width);
+ zink_copy_buffer(ctx, res, staging_res, box->x, src_offset, box->width);
else
zink_transfer_copy_bufimage(ctx, res, staging_res, trans);
}
More information about the mesa-commit
mailing list