Mesa (staging/21.3): zink: assert compute descriptor key is valid before hashing it

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Oct 22 07:05:00 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: 48c9110078f28f3806da976eb6374a1b51af51e3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=48c9110078f28f3806da976eb6374a1b51af51e3

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Tue Oct 12 15:16:14 2021 -0400

zink: assert compute descriptor key is valid before hashing it

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13350>
(cherry picked from commit 75e51138b1dadabf043708d4947d911705ccffc5)

---

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

diff --git a/.pick_status.json b/.pick_status.json
index 3ac2f454a42..1540a661c14 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1228,7 +1228,7 @@
         "description": "zink: assert compute descriptor key is valid before hashing it",
         "nominated": false,
         "nomination_type": null,
-        "resolution": 4,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/gallium/drivers/zink/zink_descriptors.c b/src/gallium/drivers/zink/zink_descriptors.c
index f1e1ac6306f..dc83c0a8313 100644
--- a/src/gallium/drivers/zink/zink_descriptors.c
+++ b/src/gallium/drivers/zink/zink_descriptors.c
@@ -723,8 +723,10 @@ populate_zds_key(struct zink_context *ctx, enum zink_descriptor_type type, bool
       key->exists[0] = true;
       if (type == ZINK_DESCRIPTOR_TYPES)
          key->state[0] = ctx->dd->push_state[is_compute];
-      else
+      else {
+         assert(ctx->dd->descriptor_states[is_compute].valid[type]);
          key->state[0] = ctx->dd->descriptor_states[is_compute].state[type];
+      }
    } else if (type == ZINK_DESCRIPTOR_TYPES) {
       /* gfx only */
       for (unsigned i = 0; i < ZINK_SHADER_COUNT; i++) {



More information about the mesa-commit mailing list