Mesa (staging/22.1): zink: copy incoming shader image struct after doing updates
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon May 16 17:21:02 UTC 2022
Module: Mesa
Branch: staging/22.1
Commit: 16a9904e6355c2cffcb79a394bc93774ad84847e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=16a9904e6355c2cffcb79a394bc93774ad84847e
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Fri May 13 11:28:08 2022 -0400
zink: copy incoming shader image struct after doing updates
no functional changes
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16508>
(cherry picked from commit 2df1c061688c14d51ad3eeaab886bb7ae4a6172a)
---
.pick_status.json | 2 +-
src/gallium/drivers/zink/zink_context.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index a2b953aaf7f..900ce1328c9 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -544,7 +544,7 @@
"description": "zink: copy incoming shader image struct after doing updates",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index d5a8a43026d..51fc7021046 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -1473,7 +1473,6 @@ zink_set_shader_images(struct pipe_context *pctx,
update_res_bind_count(ctx, res, p_stage == PIPE_SHADER_COMPUTE, false);
}
/* no refs */
- memcpy(&image_view->base, images + i, sizeof(struct pipe_image_view));
VkAccessFlags access = 0;
if (images[i].access & PIPE_IMAGE_ACCESS_WRITE) {
res->write_bind_count[p_stage == PIPE_SHADER_COMPUTE]++;
@@ -1495,6 +1494,7 @@ zink_set_shader_images(struct pipe_context *pctx,
finalize_image_bind(ctx, res, p_stage == PIPE_SHADER_COMPUTE);
zink_batch_usage_set(&image_view->surface->batch_uses, ctx->batch.state);
}
+ memcpy(&image_view->base, images + i, sizeof(struct pipe_image_view));
zink_batch_resource_usage_set(&ctx->batch, res,
zink_resource_access_is_write(access));
update = true;
More information about the mesa-commit
mailing list