From bfeed1f7c604cab9ee017474e5db4affdb9d75cb Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Sat, 28 Sep 2024 22:25:44 -0700 Subject: [PATCH] vulkan: Fix crash when resizing window. (#1142) --- src/video_core/renderer_vulkan/vk_swapchain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/renderer_vulkan/vk_swapchain.cpp b/src/video_core/renderer_vulkan/vk_swapchain.cpp index 13c0adb0b..8c268c9be 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.cpp +++ b/src/video_core/renderer_vulkan/vk_swapchain.cpp @@ -123,7 +123,7 @@ void Swapchain::Present() { }; auto result = instance.GetPresentQueue().presentKHR(present_info); - if (result == vk::Result::eErrorOutOfDateKHR) { + if (result == vk::Result::eErrorOutOfDateKHR || result == vk::Result::eSuboptimalKHR) { needs_recreation = true; } else { ASSERT_MSG(result == vk::Result::eSuccess, "Swapchain presentation failed: {}",