Recreate swap chain when suboptimal to avoid error spam
(cherry picked from commit c9d2bc91aa
)
This commit is contained in:
parent
cc6ce6977d
commit
99beeb3992
|
@ -2274,8 +2274,8 @@ Error VulkanContext::prepare_buffers() {
|
||||||
} else if (err == VK_SUBOPTIMAL_KHR) {
|
} else if (err == VK_SUBOPTIMAL_KHR) {
|
||||||
// Swapchain is not as optimal as it could be, but the platform's
|
// Swapchain is not as optimal as it could be, but the platform's
|
||||||
// presentation engine will still present the image correctly.
|
// presentation engine will still present the image correctly.
|
||||||
print_verbose("Vulkan: Early suboptimal swapchain.");
|
print_verbose("Vulkan: Early suboptimal swapchain, recreating.");
|
||||||
break;
|
_update_swap_chain(w);
|
||||||
} else if (err != VK_SUCCESS) {
|
} else if (err != VK_SUCCESS) {
|
||||||
ERR_BREAK_MSG(err != VK_SUCCESS, "Vulkan: Did not create swapchain successfully. Error code: " + String(string_VkResult(err)));
|
ERR_BREAK_MSG(err != VK_SUCCESS, "Vulkan: Did not create swapchain successfully. Error code: " + String(string_VkResult(err)));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue