Skip to content

Commit

Permalink
Only try 2 image swapchain for low latency FIFO.
Browse files Browse the repository at this point in the history
For mailbox/immediate we need triple buffer.
  • Loading branch information
Themaister committed Oct 28, 2023
1 parent 11b8e0b commit 01c460d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vulkan/wsi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,8 @@ WSI::SwapchainError WSI::init_swapchain(unsigned width, unsigned height)
swapchain_size.height =
std::max(std::min(height, caps.maxImageExtent.height), caps.minImageExtent.height);

uint32_t desired_swapchain_images = low_latency_mode_enable ? 2 : 3;
uint32_t desired_swapchain_images =
low_latency_mode_enable && current_present_mode == PresentMode::SyncToVBlank ? 2 : 3;
{
const char *num_images = getenv("GRANITE_VULKAN_SWAPCHAIN_IMAGES");
if (num_images)
Expand Down

0 comments on commit 01c460d

Please sign in to comment.