VideoBackends:Vulkan: Don't try to present if swapchain acquire failed

This commit is contained in:
TellowKrinkle
2024-09-30 18:29:38 -05:00
parent c7cbac538a
commit 7e1a9490c0
18 changed files with 64 additions and 31 deletions

View File

@ -497,6 +497,7 @@ VkResult SwapChain::AcquireNextImage()
VkResult res = vkAcquireNextImageKHR(g_vulkan_context->GetDevice(), m_swap_chain, UINT64_MAX,
g_command_buffer_mgr->GetCurrentCommandBufferSemaphore(),
VK_NULL_HANDLE, &m_current_swap_chain_image_index);
m_current_swap_chain_image_is_valid = res >= 0;
if (res != VK_SUCCESS && res != VK_ERROR_OUT_OF_DATE_KHR && res != VK_SUBOPTIMAL_KHR)
LOG_VULKAN_ERROR(res, "vkAcquireNextImageKHR failed: ");