vulkan: Fix crash when resizing window.

This commit is contained in:
squidbus 2024-09-28 21:40:41 -07:00
parent a4168150ed
commit 6f120ad3ed

View file

@ -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: {}",