Skip to content

Commit

Permalink
request different number of swapchain images depending on present mode
Browse files Browse the repository at this point in the history
  • Loading branch information
goeiecool9999 committed Aug 16, 2024
1 parent 1e56ed4 commit 0f73502
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cafe/HW/Latte/Renderer/Vulkan/SwapchainInfoVk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void SwapchainInfoVk::Create()
m_actualExtent = ChooseSwapExtent(details.capabilities);

// use at least two swapchain images. fewer than that causes problems on some drivers
uint32_t image_count = std::max(2u, details.capabilities.minImageCount);
uint32_t image_count = std::max(m_vsyncState == VSync::MAILBOX ? 3u : 2u, details.capabilities.minImageCount);
if(details.capabilities.maxImageCount > 0)
image_count = std::min(image_count, details.capabilities.maxImageCount);
if(image_count < 2)
Expand Down

0 comments on commit 0f73502

Please sign in to comment.