zink: ensure fences are released before reusing them
at this point it's guaranteed that the cmdbuf has completed since the timeline id has passed, but vulkan hasn't technically "released" the fence until it's been waited upon, so cut down on some validation spam by waiting here like in get_batch_state() Acked-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13144>
This commit is contained in:
parent
477855fce4
commit
9e3293bcd4
|
@ -579,6 +579,9 @@ zink_end_batch(struct zink_context *ctx, struct zink_batch *batch)
|
|||
struct zink_fence *fence = he->data;
|
||||
struct zink_batch_state *bs = he->data;
|
||||
if (zink_check_batch_completion(ctx, fence->batch_id, true)) {
|
||||
if (bs->fence.submitted && !bs->fence.completed)
|
||||
/* this fence is already done, so we need vulkan to release the cmdbuf */
|
||||
zink_vkfence_wait(screen, &bs->fence, PIPE_TIMEOUT_INFINITE);
|
||||
zink_reset_batch_state(ctx, he->data);
|
||||
_mesa_hash_table_remove(&ctx->batch_states, he);
|
||||
util_dynarray_append(&ctx->free_batch_states, struct zink_batch_state *, bs);
|
||||
|
|
Loading…
Reference in New Issue