zink: only scan active batch states for free states if > 1 exist
trying to recycle the current active batch state is never going to be productive cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27729>
This commit is contained in:
committed by
Marge Bot
parent
2179a7f4d7
commit
16103b61e7
@@ -458,8 +458,8 @@ get_batch_state(struct zink_context *ctx, struct zink_batch *batch)
|
||||
}
|
||||
simple_mtx_unlock(&screen->free_batch_states_lock);
|
||||
}
|
||||
if (!bs && ctx->batch_states) {
|
||||
/* states are stored sequentially, so if the first one doesn't work, none of them will */
|
||||
/* 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) {
|
||||
if (zink_screen_check_last_finished(screen, ctx->batch_states->fence.batch_id) ||
|
||||
find_unused_state(ctx->batch_states)) {
|
||||
bs = ctx->batch_states;
|
||||
|
||||
Reference in New Issue
Block a user