mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 04:30:10 +01:00
zink: assume fence has already completed if a batch state isn't found
we're not going to be waiting on fences from the future, so if we can't find a fence then it must have completed Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9885>
This commit is contained in:
parent
03946bfcdd
commit
f9ee9c4539
1 changed files with 3 additions and 12 deletions
|
|
@ -1940,18 +1940,9 @@ zink_wait_on_batch(struct zink_context *ctx, uint32_t batch_id)
|
|||
else {
|
||||
struct hash_entry *he = _mesa_hash_table_search_pre_hashed(&ctx->batch_states, batch_id, (void*)(uintptr_t)batch_id);
|
||||
if (!he) {
|
||||
util_dynarray_foreach(&ctx->free_batch_states, struct zink_batch_state*, bs) {
|
||||
if ((*bs)->fence.batch_id == batch_id) {
|
||||
simple_mtx_unlock(&ctx->batch_mtx);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (ctx->last_fence && ctx->last_fence->batch_id > batch_id) {
|
||||
/* already completed */
|
||||
simple_mtx_unlock(&ctx->batch_mtx);
|
||||
return;
|
||||
}
|
||||
unreachable("should've found batch state");
|
||||
/* batch has already completed */
|
||||
simple_mtx_unlock(&ctx->batch_mtx);
|
||||
return;
|
||||
}
|
||||
fence = he->data;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue