From 62db6d0a2af8c45f45043731ec4e1acf57f3a207 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sun, 8 Sep 2024 09:57:00 +0200 Subject: [PATCH] Wait for previous frame before recording next command buffer --- server/driver/wivrn_comp_target.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/driver/wivrn_comp_target.cpp b/server/driver/wivrn_comp_target.cpp index fcd9d790..1caf910c 100644 --- a/server/driver/wivrn_comp_target.cpp +++ b/server/driver/wivrn_comp_target.cpp @@ -418,6 +418,7 @@ static VkResult comp_wivrn_present(struct comp_target * ct, assert(cn->psc.images[index].status == pseudo_swapchain::status_t::acquired); struct vk_bundle * vk = get_vk(cn); + auto res = cn->wivrn_bundle->device.waitForFences(*cn->psc.fence, true, UINT64_MAX); auto & command_buffer = cn->psc.command_buffer; command_buffer.reset(); @@ -459,8 +460,6 @@ static VkResult comp_wivrn_present(struct comp_target * ct, } command_buffer.end(); - auto res = cn->wivrn_bundle->device.waitForFences(*cn->psc.fence, true, UINT64_MAX); - cn->wivrn_bundle->device.resetFences(*cn->psc.fence); { scoped_lock lock(vk->queue_mutex);