From 6f0929df82be77f116988cf16cde4ebbc5f978dc Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sun, 30 Apr 2023 15:39:00 -0400 Subject: configuration: Expose separate swap present modes Previously, yuzu would try and guess which vsync mode to use given different scenarios, but apparently we didn't always get it right. This exposes the separate modes in a drop-down the user can select. If a mode isn't available in Vulkan, it defaults to FIFO. --- src/common/settings.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/common/settings.h') diff --git a/src/common/settings.h b/src/common/settings.h index 5379d0dd5..2371495e4 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -16,6 +16,12 @@ namespace Settings { +enum class VSyncMode : u32 { + Immediate, + FIFO, + Mailbox, +}; + enum class RendererBackend : u32 { OpenGL = 0, Vulkan = 1, @@ -455,7 +461,8 @@ struct Values { SwitchableSetting nvdec_emulation{NvdecEmulation::GPU, "nvdec_emulation"}; SwitchableSetting accelerate_astc{true, "accelerate_astc"}; SwitchableSetting async_astc{false, "async_astc"}; - SwitchableSetting use_vsync{true, "use_vsync"}; + Setting vsync_mode{VSyncMode::FIFO, VSyncMode::Immediate, VSyncMode::Mailbox, + "use_vsync"}; SwitchableSetting shader_backend{ShaderBackend::GLSL, ShaderBackend::GLSL, ShaderBackend::SPIRV, "shader_backend"}; SwitchableSetting use_asynchronous_shaders{false, "use_asynchronous_shaders"}; -- cgit v1.2.3 From 2528cf7c5416573fc8bf2e9316a3acc5a2395b79 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Mon, 1 May 2023 20:22:37 -0400 Subject: settings: Enable FIFO relaxed Not entirely sure if we need this, but there's also no reason not to support it. settings: Give VSyncMode values --- src/common/settings.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/common/settings.h') diff --git a/src/common/settings.h b/src/common/settings.h index 2371495e4..c0faa7406 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -17,9 +17,10 @@ namespace Settings { enum class VSyncMode : u32 { - Immediate, - FIFO, - Mailbox, + Immediate = 0, + Mailbox = 1, + FIFO = 2, + FIFORelaxed = 3, }; enum class RendererBackend : u32 { @@ -461,8 +462,8 @@ struct Values { SwitchableSetting nvdec_emulation{NvdecEmulation::GPU, "nvdec_emulation"}; SwitchableSetting accelerate_astc{true, "accelerate_astc"}; SwitchableSetting async_astc{false, "async_astc"}; - Setting vsync_mode{VSyncMode::FIFO, VSyncMode::Immediate, VSyncMode::Mailbox, - "use_vsync"}; + Setting vsync_mode{VSyncMode::FIFO, VSyncMode::Immediate, + VSyncMode::FIFORelaxed, "use_vsync"}; SwitchableSetting shader_backend{ShaderBackend::GLSL, ShaderBackend::GLSL, ShaderBackend::SPIRV, "shader_backend"}; SwitchableSetting use_asynchronous_shaders{false, "use_asynchronous_shaders"}; -- cgit v1.2.3