Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion nvvkhl/app_swapchain_vk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ VkExtent2D nvvkhl::AppSwapchain::initResources(bool vSync /*= true*/)
// Set the window size according to the surface's current extent
outWindowSize = capabilities2.surfaceCapabilities.currentExtent;
// Set the number of images in flight, respecting GPU limitations
m_maxFramesInFlight = std::min(m_maxFramesInFlight, capabilities2.surfaceCapabilities.maxImageCount);
if (capabilities2.surfaceCapabilities.maxImageCount > 0)
{
m_maxFramesInFlight = std::min(m_maxFramesInFlight, capabilities2.surfaceCapabilities.maxImageCount);
}
// Store the chosen image format
m_imageFormat = surfaceFormat2.surfaceFormat.format;

Expand Down