zink: fix change flagging for compact descriptor cache
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 27 May 2022 19:02:38 +0000 (15:02 -0400)
committerMarge Bot <emma+marge@anholt.net>
Wed, 1 Jun 2022 02:02:31 +0000 (02:02 +0000)
using pool existence alone is broken since the pools are compacted,
so instead flag based on whether usage exists

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

src/gallium/drivers/zink/zink_descriptors.c

index 917b8fd..6e88f2b 100644 (file)
@@ -1472,8 +1472,8 @@ zink_descriptors_update(struct zink_context *ctx, bool is_compute)
 
    if (ctx->dd->pg[is_compute] != pg) {
       for (int h = 0; h < ZINK_DESCRIPTOR_TYPES; h++) {
-            bool has_usage = !!pg->dsl[h + 1];
-            ctx->dd->changed[is_compute][h] |= has_usage;
+         if (pg->dd->real_binding_usage & BITFIELD_BIT(h))
+            ctx->dd->changed[is_compute][h] = true;
       }
    }
    zink_context_update_descriptor_states(ctx, pg);