Vulkan: Don't use mailbox for vsync case.

This commit is contained in:
BearOso 2024-06-11 18:04:09 -05:00
parent c02ee4373e
commit 99990af31e
1 changed files with 7 additions and 4 deletions

View File

@ -172,10 +172,13 @@ bool Swapchain::create(unsigned int desired_num_swapchain_images, int new_width,
vk::PresentModeKHR::eImmediate) != present_modes.end();
vk::PresentModeKHR present_mode = vk::PresentModeKHR::eFifo;
if (mailbox_supported)
present_mode = vk::PresentModeKHR::eMailbox;
if (!vsync && immediate_supported)
present_mode = vk::PresentModeKHR::eImmediate;
if (!vsync)
{
if (mailbox_supported)
present_mode = vk::PresentModeKHR::eMailbox;
if (immediate_supported)
present_mode = vk::PresentModeKHR::eImmediate;
}
if (present_mode == vk::PresentModeKHR::eMailbox)
num_swapchain_images++;