VulkanRenderer: Wait for device idle before recreating the swapchain

This commit is contained in:
Jérôme Leclercq 2021-06-04 19:35:59 +02:00
parent 4b3b595a99
commit 52490e0cf5
1 changed files with 3 additions and 0 deletions

View File

@ -486,6 +486,9 @@ namespace Nz
swapchainPresentMode = VK_PRESENT_MODE_IMMEDIATE_KHR;
}
// Ensure all operations on the device have been finished before recreating the swapchain (this can be avoided but is more complicated)
m_device->WaitForIdle();
VkSwapchainCreateInfoKHR swapchainInfo = {
VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR,
nullptr,