VideoBackends:Vulkan: Wait until we've confirmed a successful AcquireNextImage before marking semaphores used

This commit is contained in:
TellowKrinkle
2024-09-30 22:00:41 -05:00
parent 7e1a9490c0
commit a267c56412
2 changed files with 12 additions and 3 deletions

View File

@ -498,6 +498,8 @@ VkResult SwapChain::AcquireNextImage()
g_command_buffer_mgr->GetCurrentCommandBufferSemaphore(),
VK_NULL_HANDLE, &m_current_swap_chain_image_index);
m_current_swap_chain_image_is_valid = res >= 0;
if (IsCurrentImageValid())
g_command_buffer_mgr->MarkCurrentCommandBufferSemaphoreUsed();
if (res != VK_SUCCESS && res != VK_ERROR_OUT_OF_DATE_KHR && res != VK_SUBOPTIMAL_KHR)
LOG_VULKAN_ERROR(res, "vkAcquireNextImageKHR failed: ");