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 40d00e3066
commit 5e98a3e1d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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