From e42bb25ee26987f3ca0af5be55cebaba320e1285 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 21 May 2021 16:45:41 -0400 Subject: [PATCH] zink: fix cached descriptor allocation clamping the number of allocated sets should be directly compared to the maximum Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_descriptors.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_descriptors.c b/src/gallium/drivers/zink/zink_descriptors.c index 7c312e5c126..c20c3325713 100644 --- a/src/gallium/drivers/zink/zink_descriptors.c +++ b/src/gallium/drivers/zink/zink_descriptors.c @@ -806,7 +806,7 @@ skip_hash_tables: } } - if (pool->num_sets_allocated + pool->key.layout->num_descriptors > ZINK_DEFAULT_MAX_DESCS) { + if (pool->num_sets_allocated == ZINK_DEFAULT_MAX_DESCS) { simple_mtx_unlock(&pool->mtx); zink_fence_wait(&ctx->base); zink_batch_reference_program(batch, pg);