vulkan: Fix present mode fallback override #1422
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have seen some reports of blank screens on games with Xwayland when vsync is disabled in MangoHud:
https://forums.developer.nvidia.com/t/blank-screens-on-games-with-adaptive-vsync-fifo-relaxed-khr-enabled-driver-550-regression-works-on-535/284442
It doesn't look like MangoHud correctly handles
FIFO_RELAXED_KHR
not being supported. Inoverlay_CreateSwapchainKHR
, ifIsPresentModeSupported
returns false (which it will forFIFO_RELAXED
on our driver with Xwayland at the moment) it setsHUDElements.cur_present_mode
toVK_PRESENT_MODE_FIFO_KHR
but it does not updatecreateInfo.presentMode
. This could cause swapchain creation to fail since it's trying to use an unsupported present mode.Does this analysis sound correct or am I misunderstanding how this should work?
Some additional context: earlier this summer we had stopped advertising
FIFO_RELAXED_KHR
with Xwayland in the NVIDIA driver since we weren't properly handling it and were treating it as regular FIFO, which was a bug. That seems to have triggered this issue. We will be implementingFIFO_RELAXED_KHR
properly as we do want to support it on Xwayland, but figured I would report this issue in the meantime.