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> (cherry picked from commit 16103b61e7dae3ac426fcc523a1a9b18a3c71e8e)
This commit is contained in:
parent
313a9e6b73
commit
2728e5f2cc
2 changed files with 3 additions and 3 deletions
|
|
@ -324,7 +324,7 @@
|
||||||
"description": "zink: only scan active batch states for free states if > 1 exist",
|
"description": "zink: only scan active batch states for free states if > 1 exist",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 0,
|
"nomination_type": 0,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": null,
|
"because_sha": null,
|
||||||
"notes": null
|
"notes": null
|
||||||
|
|
|
||||||
|
|
@ -458,8 +458,8 @@ get_batch_state(struct zink_context *ctx, struct zink_batch *batch)
|
||||||
}
|
}
|
||||||
simple_mtx_unlock(&screen->free_batch_states_lock);
|
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) ||
|
if (zink_screen_check_last_finished(screen, ctx->batch_states->fence.batch_id) ||
|
||||||
find_unused_state(ctx->batch_states)) {
|
find_unused_state(ctx->batch_states)) {
|
||||||
bs = ctx->batch_states;
|
bs = ctx->batch_states;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue