vulkan: Fix present mode fallback override

In overlay_CreateSwapchainKHR, if IsPresentModeSupported returns false (which it will when FIFO_RELAXED is not supported) it sets  HUDElements.cur_present_mode to VK_PRESENT_MODE_FIFO_KHR but it does not update createInfo.presentMode. This can cause swapchain creation to fail since it's trying to use an unsupported present mode.

This updates the createInfo's presentMode as well to prevent this.
pull/1423/head
Austin Shafer 2 weeks ago committed by flightlessmango
parent 4b45e2612f
commit 2e7e86feef

@ -1547,6 +1547,7 @@ static VkResult overlay_CreateSwapchainKHR(
else {
SPDLOG_DEBUG("Present mode is not supported: {}", HUDElements.presentModeMap[HUDElements.cur_present_mode]);
HUDElements.cur_present_mode = VK_PRESENT_MODE_FIFO_KHR;
createInfo.presentMode = VK_PRESENT_MODE_FIFO_KHR;
}
}
}

Loading…
Cancel
Save