vulkan: Fix crash when resizing window. (#1142)

This commit is contained in:
squidbus 2024-09-28 22:25:44 -07:00 committed by GitHub
parent b13381bacd
commit bfeed1f7c6

View file

@ -123,7 +123,7 @@ void Swapchain::Present() {
}; };
auto result = instance.GetPresentQueue().presentKHR(present_info); auto result = instance.GetPresentQueue().presentKHR(present_info);
if (result == vk::Result::eErrorOutOfDateKHR) { if (result == vk::Result::eErrorOutOfDateKHR || result == vk::Result::eSuboptimalKHR) {
needs_recreation = true; needs_recreation = true;
} else { } else {
ASSERT_MSG(result == vk::Result::eSuccess, "Swapchain presentation failed: {}", ASSERT_MSG(result == vk::Result::eSuccess, "Swapchain presentation failed: {}",