summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Vulkan/SwapChain.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2016-11-07 19:22:27 +1000
committerStenzek <stenzek@gmail.com>2016-11-07 19:22:27 +1000
commitc09ce029dfafebb539944e71b8949c6179213f8f (patch)
tree183415c0ff69a83a5fd8c093b5dea3bedfb26991 /Source/Core/VideoBackends/Vulkan/SwapChain.cpp
parent136a10482f099aec67cebd8673388f54b78458b6 (diff)
Vulkan: Don't use FIFO_RELAXED present mode for vsync.
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan/SwapChain.cpp')
-rw-r--r--Source/Core/VideoBackends/Vulkan/SwapChain.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/SwapChain.cpp b/Source/Core/VideoBackends/Vulkan/SwapChain.cpp
index 899f931c6d..1027099d21 100644
--- a/Source/Core/VideoBackends/Vulkan/SwapChain.cpp
+++ b/Source/Core/VideoBackends/Vulkan/SwapChain.cpp
@@ -198,25 +198,13 @@ bool SwapChain::SelectPresentMode()
return it != present_modes.end();
};
- // If vsync is enabled, prefer VK_PRESENT_MODE_FIFO_KHR.
- if (m_vsync_enabled)
+ // If vsync is enabled, use VK_PRESENT_MODE_FIFO_KHR.
+ // This check should not fail with conforming drivers, as the FIFO present mode is mandated by
+ // the specification (VK_KHR_swapchain). In case it isn't though, fall through to any other mode.
+ if (m_vsync_enabled && CheckForMode(VK_PRESENT_MODE_FIFO_KHR))
{
- // Try for relaxed vsync first, since it's likely the VI won't line up with
- // the refresh rate of the system exactly, so tearing once is better than
- // waiting for the next vblank.
- if (CheckForMode(VK_PRESENT_MODE_FIFO_RELAXED_KHR))
- {
- m_present_mode = VK_PRESENT_MODE_FIFO_RELAXED_KHR;
- return true;
- }
-
- // Fall back to strict vsync.
- if (CheckForMode(VK_PRESENT_MODE_FIFO_KHR))
- {
- WARN_LOG(VIDEO, "Vulkan: FIFO_RELAXED not available, falling back to FIFO.");
- m_present_mode = VK_PRESENT_MODE_FIFO_KHR;
- return true;
- }
+ m_present_mode = VK_PRESENT_MODE_FIFO_KHR;
+ return true;
}
// Prefer screen-tearing, if possible, for lowest latency.