1
0
Fork 0
forked from suyu/suyu

renderer_vulkan: recreate swapchain when frame size changes

This commit is contained in:
Liam 2024-01-16 16:09:39 -05:00
parent 2c29c2b8dd
commit e9eb017aac

View file

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