Mesa (staging/22.1): zink: only update layout when doing mixed zs attachment renderpass check

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 15 16:22:55 UTC 2022


Module: Mesa
Branch: staging/22.1
Commit: 8a6da30e8990bd5729fa6ef417f0301bedb2629e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8a6da30e8990bd5729fa6ef417f0301bedb2629e

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Mon Jun  6 20:54:53 2022 -0400

zink: only update layout when doing mixed zs attachment renderpass check

avoid doing any sort of extra work here and avoid multi-context weirdness

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16900>

---

 .pick_status.json                       | 2 +-
 src/gallium/drivers/zink/zink_context.c | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index b82e0e401b6..c4fdafb6666 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -2461,7 +2461,7 @@
         "description": "zink: only update layout when doing mixed zs attachment renderpass check",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 3,
         "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 05445fd925f..3562f5f45d5 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -2266,7 +2266,9 @@ prep_fb_attachment(struct zink_context *ctx, struct zink_surface *surf, unsigned
        unsigned find = res->bind_count[0] - res->image_bind_count[0];
        for (unsigned i = 0; i < PIPE_SHADER_COMPUTE; i++) {
           u_foreach_bit(slot, res->sampler_binds[i]) {
-             update_descriptor_state_sampler(ctx, i, slot, res);
+            /* only set layout, skip rest of update */
+            if (ctx->di.descriptor_res[ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW][i][slot] == res)
+               ctx->di.textures[i][slot].imageLayout = zink_descriptor_util_image_layout_eval(ctx, res, false);
              find--;
              if (!find) break;
           }



More information about the mesa-commit mailing list