mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
zink: defer more semaphore destruction
these have noticeable overhead, so handle them in the submit thread Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18664>
This commit is contained in:
parent
babf9474c4
commit
1896111d25
1 changed files with 3 additions and 2 deletions
|
|
@ -87,13 +87,14 @@ zink_reset_batch_state(struct zink_context *ctx, struct zink_batch_state *bs)
|
|||
|
||||
bs->resource_size = 0;
|
||||
bs->signal_semaphore = VK_NULL_HANDLE;
|
||||
while (util_dynarray_contains(&bs->wait_semaphores, VkSemaphore))
|
||||
VKSCR(DestroySemaphore)(screen->dev, util_dynarray_pop(&bs->wait_semaphores, VkSemaphore), NULL);
|
||||
util_dynarray_clear(&bs->wait_semaphore_stages);
|
||||
|
||||
bs->present = VK_NULL_HANDLE;
|
||||
memcpy(&bs->unref_semaphores, &bs->acquires, sizeof(struct util_dynarray));
|
||||
util_dynarray_init(&bs->acquires, NULL);
|
||||
while (util_dynarray_contains(&bs->wait_semaphores, VkSemaphore))
|
||||
util_dynarray_append(&bs->unref_semaphores, VkSemaphore, util_dynarray_pop(&bs->wait_semaphores, VkSemaphore));
|
||||
util_dynarray_init(&bs->wait_semaphores, NULL);
|
||||
bs->swapchain = NULL;
|
||||
|
||||
while (util_dynarray_contains(&bs->dead_swapchains, VkImageView))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue