summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2023-04-07 17:44:37 +0200
committerYuri Sizov <yuris@humnom.net>2023-04-07 17:44:37 +0200
commit99beeb3992956232cd93ebf38e50daa6c5e8bb51 (patch)
treeb79e540332f255ab61f209fca149f119f132ca2c /drivers
parentcc6ce6977d7d09442301b0f59893045b9bd0a8ee (diff)
Recreate swap chain when suboptimal to avoid error spam
(cherry picked from commit c9d2bc91aace984b0c5fc1fcfa5b68e0a33e2ef6)
Diffstat (limited to 'drivers')
-rw-r--r--drivers/vulkan/vulkan_context.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp
index f185a5cb88..f65056951d 100644
--- a/drivers/vulkan/vulkan_context.cpp
+++ b/drivers/vulkan/vulkan_context.cpp
@@ -2274,8 +2274,8 @@ Error VulkanContext::prepare_buffers() {
} else if (err == VK_SUBOPTIMAL_KHR) {
// Swapchain is not as optimal as it could be, but the platform's
// presentation engine will still present the image correctly.
- print_verbose("Vulkan: Early suboptimal swapchain.");
- break;
+ print_verbose("Vulkan: Early suboptimal swapchain, recreating.");
+ _update_swap_chain(w);
} else if (err != VK_SUCCESS) {
ERR_BREAK_MSG(err != VK_SUCCESS, "Vulkan: Did not create swapchain successfully. Error code: " + String(string_VkResult(err)));
} else {