Mesa (staging/22.0): zink: copy incoming shader image struct after doing updates

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 16 19:33:38 UTC 2022


Module: Mesa
Branch: staging/22.0
Commit: a87a630efbd365458e2f5c6280c3e848b50619a9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a87a630efbd365458e2f5c6280c3e848b50619a9

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 11c1094de8b..c68f3aa4b91 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -484,7 +484,7 @@
         "description": "zink: copy incoming shader image struct after doing updates",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "because_sha": null
     },
     {
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 99f2433d9a4..753024e53eb 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -1391,7 +1391,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]++;
@@ -1413,6 +1412,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