From 9d34cab4a8412baded94d6baa1727302890f2ca9 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 27 May 2022 15:02:38 -0400 Subject: [PATCH] zink: fix change flagging for compact descriptor cache using pool existence alone is broken since the pools are compacted, so instead flag based on whether usage exists Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_descriptors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_descriptors.c b/src/gallium/drivers/zink/zink_descriptors.c index 917b8fdeeec..6e88f2bfb2e 100644 --- a/src/gallium/drivers/zink/zink_descriptors.c +++ b/src/gallium/drivers/zink/zink_descriptors.c @@ -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);