zink: fix cached descriptor allocation clamping

the number of allocated sets should be directly compared to the maximum

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11690>
This commit is contained in:
Mike Blumenkrantz 2021-05-21 16:45:41 -04:00
parent 8db2d53418
commit e42bb25ee2
1 changed files with 1 additions and 1 deletions

View File

@ -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);