Vulkan: Only recreate swapchain if the frame is bigger than the swap image.

This commit is contained in:
Fernando Sahmkow 2023-12-31 21:00:23 +01:00
parent a81686eff8
commit d9b2778306
2 changed files with 3 additions and 2 deletions

View file

@ -329,7 +329,7 @@ void PresentManager::CopyToSwapchainImpl(Frame* frame) {
// to account for that.
const bool is_suboptimal = swapchain.NeedsRecreation();
const bool size_changed =
swapchain.GetWidth() != frame->width || swapchain.GetHeight() != frame->height;
swapchain.GetWidth() < frame->width || swapchain.GetHeight() < frame->height;
if (is_suboptimal || size_changed) {
RecreateSwapchain(frame);
}