diff options
| author | 2021-08-08 16:56:40 -0400 | |
|---|---|---|
| committer | 2021-08-16 14:40:53 -0400 | |
| commit | cd016d3cb5191b9f4f2756e440a6aa67e577c414 (patch) | |
| tree | e96e08167a350f05feb9c081950be305612d9113 /src/common | |
| parent | codec: Improve libav memory alloc and cleanup (diff) | |
| download | yuzu-cd016d3cb5191b9f4f2756e440a6aa67e577c414.tar.gz yuzu-cd016d3cb5191b9f4f2756e440a6aa67e577c414.tar.xz yuzu-cd016d3cb5191b9f4f2756e440a6aa67e577c414.zip | |
configure_graphics: Add GPU nvdec decoding as an option
Some system configurations may see visual regressions or lower performance using GPU decoding compared to CPU decoding. This setting provides the option for users to specify their decoding preference.
Co-Authored-By: yzct12345 <87620833+yzct12345@users.noreply.github.com>
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/settings.cpp | 4 | ||||
| -rw-r--r-- | src/common/settings.h | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 996315999..33665eab8 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp | |||
| @@ -54,7 +54,7 @@ void LogSettings() { | |||
| 54 | log_setting("Renderer_GPUAccuracyLevel", values.gpu_accuracy.GetValue()); | 54 | log_setting("Renderer_GPUAccuracyLevel", values.gpu_accuracy.GetValue()); |
| 55 | log_setting("Renderer_UseAsynchronousGpuEmulation", | 55 | log_setting("Renderer_UseAsynchronousGpuEmulation", |
| 56 | values.use_asynchronous_gpu_emulation.GetValue()); | 56 | values.use_asynchronous_gpu_emulation.GetValue()); |
| 57 | log_setting("Renderer_UseNvdecEmulation", values.use_nvdec_emulation.GetValue()); | 57 | log_setting("Renderer_NvdecEmulation", values.nvdec_emulation.GetValue()); |
| 58 | log_setting("Renderer_AccelerateASTC", values.accelerate_astc.GetValue()); | 58 | log_setting("Renderer_AccelerateASTC", values.accelerate_astc.GetValue()); |
| 59 | log_setting("Renderer_UseVsync", values.use_vsync.GetValue()); | 59 | log_setting("Renderer_UseVsync", values.use_vsync.GetValue()); |
| 60 | log_setting("Renderer_ShaderBackend", values.shader_backend.GetValue()); | 60 | log_setting("Renderer_ShaderBackend", values.shader_backend.GetValue()); |
| @@ -137,7 +137,7 @@ void RestoreGlobalState(bool is_powered_on) { | |||
| 137 | values.use_disk_shader_cache.SetGlobal(true); | 137 | values.use_disk_shader_cache.SetGlobal(true); |
| 138 | values.gpu_accuracy.SetGlobal(true); | 138 | values.gpu_accuracy.SetGlobal(true); |
| 139 | values.use_asynchronous_gpu_emulation.SetGlobal(true); | 139 | values.use_asynchronous_gpu_emulation.SetGlobal(true); |
| 140 | values.use_nvdec_emulation.SetGlobal(true); | 140 | values.nvdec_emulation.SetGlobal(true); |
| 141 | values.accelerate_astc.SetGlobal(true); | 141 | values.accelerate_astc.SetGlobal(true); |
| 142 | values.use_vsync.SetGlobal(true); | 142 | values.use_vsync.SetGlobal(true); |
| 143 | values.shader_backend.SetGlobal(true); | 143 | values.shader_backend.SetGlobal(true); |
diff --git a/src/common/settings.h b/src/common/settings.h index 1ba9b606c..28074c1b9 100644 --- a/src/common/settings.h +++ b/src/common/settings.h | |||
| @@ -48,6 +48,12 @@ enum class FullscreenMode : u32 { | |||
| 48 | Exclusive = 1, | 48 | Exclusive = 1, |
| 49 | }; | 49 | }; |
| 50 | 50 | ||
| 51 | enum class NvdecEmulation : u32 { | ||
| 52 | Off = 0, | ||
| 53 | CPU = 1, | ||
| 54 | GPU = 2, | ||
| 55 | }; | ||
| 56 | |||
| 51 | /** The BasicSetting class is a simple resource manager. It defines a label and default value | 57 | /** The BasicSetting class is a simple resource manager. It defines a label and default value |
| 52 | * alongside the actual value of the setting for simpler and less-error prone use with frontend | 58 | * alongside the actual value of the setting for simpler and less-error prone use with frontend |
| 53 | * configurations. Setting a default value and label is required, though subclasses may deviate from | 59 | * configurations. Setting a default value and label is required, though subclasses may deviate from |
| @@ -466,7 +472,7 @@ struct Values { | |||
| 466 | RangedSetting<GPUAccuracy> gpu_accuracy{GPUAccuracy::High, GPUAccuracy::Normal, | 472 | RangedSetting<GPUAccuracy> gpu_accuracy{GPUAccuracy::High, GPUAccuracy::Normal, |
| 467 | GPUAccuracy::Extreme, "gpu_accuracy"}; | 473 | GPUAccuracy::Extreme, "gpu_accuracy"}; |
| 468 | Setting<bool> use_asynchronous_gpu_emulation{true, "use_asynchronous_gpu_emulation"}; | 474 | Setting<bool> use_asynchronous_gpu_emulation{true, "use_asynchronous_gpu_emulation"}; |
| 469 | Setting<bool> use_nvdec_emulation{true, "use_nvdec_emulation"}; | 475 | Setting<NvdecEmulation> nvdec_emulation{NvdecEmulation::GPU, "nvdec_emulation"}; |
| 470 | Setting<bool> accelerate_astc{true, "accelerate_astc"}; | 476 | Setting<bool> accelerate_astc{true, "accelerate_astc"}; |
| 471 | Setting<bool> use_vsync{true, "use_vsync"}; | 477 | Setting<bool> use_vsync{true, "use_vsync"}; |
| 472 | BasicRangedSetting<u16> fps_cap{1000, 1, 1000, "fps_cap"}; | 478 | BasicRangedSetting<u16> fps_cap{1000, 1, 1000, "fps_cap"}; |