diff --git a/src/gallium/drivers/zink/zink_batch.c b/src/gallium/drivers/zink/zink_batch.c index 21cae9677588bf636ebe4190239c792cb7f2be65..5354bc0f032bcb26897bf595f5d259d9a50f6c2e 100644 --- a/src/gallium/drivers/zink/zink_batch.c +++ b/src/gallium/drivers/zink/zink_batch.c @@ -447,18 +447,7 @@ get_batch_state(struct zink_context *ctx) if (bs == ctx->last_free_batch_state) ctx->last_free_batch_state = NULL; } - /* try from the ones that are given back to the screen next */ - if (!bs) { - simple_mtx_lock(&screen->free_batch_states_lock); - if (screen->free_batch_states) { - bs = screen->free_batch_states; - bs->ctx = ctx; - screen->free_batch_states = bs->next; - if (bs == screen->last_free_batch_state) - screen->last_free_batch_state = NULL; - } - simple_mtx_unlock(&screen->free_batch_states_lock); - } + /* states are stored sequentially, so if the first one doesn't work, none of them will */ if (!bs && ctx->batch_states && ctx->batch_states->next) { /* only a submitted state can be reused */