Wait for previous frame before recording next command buffer

This commit is contained in:
Patrick Nicolas
2024-09-08 09:59:25 +02:00
parent dbe6c21e6d
commit 62db6d0a2a
+1 -2
View File
@@ -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);