mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
zink: once there are many outstanding submits, check for timeline updates
this should ensure that there are never too many cmdbufs pending Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37068>
This commit is contained in:
parent
86d0fc7b38
commit
a3630c865f
1 changed files with 3 additions and 0 deletions
|
|
@ -600,6 +600,9 @@ post_submit(void *data, void *gdata, int thread_index)
|
|||
} else if (bs->ctx->batch_states_count > 5000) {
|
||||
/* throttle in case something crazy is happening */
|
||||
zink_screen_timeline_wait(screen, bs->fence.batch_id - 2500, OS_TIMEOUT_INFINITE);
|
||||
} else if (screen->curr_batch - screen->last_finished > 5) {
|
||||
/* try to avoid ooming by regularly checking for batch completion */
|
||||
zink_screen_timeline_wait(screen, screen->last_finished + 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue