summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorGravatar lat9nq2021-07-08 17:28:48 -0400
committerGravatar ameerj2021-07-22 21:51:39 -0400
commit1152d66ddd4e7b29b53e01990fef77e4cff20e24 (patch)
tree9530d5e2c00afd904d95e1a4066d5e4e7f3571c5 /src/common
parentglsl: Declare local memory in main (diff)
downloadyuzu-1152d66ddd4e7b29b53e01990fef77e4cff20e24.tar.gz
yuzu-1152d66ddd4e7b29b53e01990fef77e4cff20e24.tar.xz
yuzu-1152d66ddd4e7b29b53e01990fef77e4cff20e24.zip
general: Add setting shader_backend
GLASM is getting good enough that we can move it out of advanced graphics settings. This removes the setting `use_assembly_shaders`, opting for a enum class `shader_backend`. This comes with the benefits that it is extensible for additional shader backends besides GLSL and GLASM, and this will work better with a QComboBox. Qt removes the related assembly shader setting from the Advanced Graphics section and places it as a new QComboBox in the API Settings group. This will replace the Vulkan device selector when OpenGL is selected. Additionally, mark all of the custom anisotropic filtering settings as "WILL BREAK THINGS", as that is the case with a select few games.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/settings.cpp4
-rw-r--r--src/common/settings.h8
2 files changed, 9 insertions, 3 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp
index bf5514386..66268ea0f 100644
--- a/src/common/settings.cpp
+++ b/src/common/settings.cpp
@@ -57,7 +57,7 @@ void LogSettings() {
57 log_setting("Renderer_UseNvdecEmulation", values.use_nvdec_emulation.GetValue()); 57 log_setting("Renderer_UseNvdecEmulation", values.use_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_UseAssemblyShaders", values.use_assembly_shaders.GetValue()); 60 log_setting("Renderer_ShaderBackend", values.shader_backend.GetValue());
61 log_setting("Renderer_UseAsynchronousShaders", values.use_asynchronous_shaders.GetValue()); 61 log_setting("Renderer_UseAsynchronousShaders", values.use_asynchronous_shaders.GetValue());
62 log_setting("Renderer_UseGarbageCollection", values.use_caches_gc.GetValue()); 62 log_setting("Renderer_UseGarbageCollection", values.use_caches_gc.GetValue());
63 log_setting("Renderer_AnisotropicFilteringLevel", values.max_anisotropy.GetValue()); 63 log_setting("Renderer_AnisotropicFilteringLevel", values.max_anisotropy.GetValue());
@@ -140,7 +140,7 @@ void RestoreGlobalState(bool is_powered_on) {
140 values.use_nvdec_emulation.SetGlobal(true); 140 values.use_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.use_assembly_shaders.SetGlobal(true); 143 values.shader_backend.SetGlobal(true);
144 values.use_asynchronous_shaders.SetGlobal(true); 144 values.use_asynchronous_shaders.SetGlobal(true);
145 values.use_fast_gpu_time.SetGlobal(true); 145 values.use_fast_gpu_time.SetGlobal(true);
146 values.use_caches_gc.SetGlobal(true); 146 values.use_caches_gc.SetGlobal(true);
diff --git a/src/common/settings.h b/src/common/settings.h
index ac0590690..32dfb1d9f 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -24,6 +24,12 @@ enum class RendererBackend : u32 {
24 Vulkan = 1, 24 Vulkan = 1,
25}; 25};
26 26
27enum class ShaderBackend : u32 {
28 GLSL = 0,
29 GLASM = 1,
30 SPIRV = 2,
31};
32
27enum class GPUAccuracy : u32 { 33enum class GPUAccuracy : u32 {
28 Normal = 0, 34 Normal = 0,
29 High = 1, 35 High = 1,
@@ -334,7 +340,7 @@ struct Values {
334 Setting<bool> accelerate_astc{true, "accelerate_astc"}; 340 Setting<bool> accelerate_astc{true, "accelerate_astc"};
335 Setting<bool> use_vsync{true, "use_vsync"}; 341 Setting<bool> use_vsync{true, "use_vsync"};
336 BasicSetting<bool> disable_fps_limit{false, "disable_fps_limit"}; 342 BasicSetting<bool> disable_fps_limit{false, "disable_fps_limit"};
337 Setting<bool> use_assembly_shaders{false, "use_assembly_shaders"}; 343 Setting<ShaderBackend> shader_backend{ShaderBackend::GLASM, "shader_backend"};
338 Setting<bool> use_asynchronous_shaders{false, "use_asynchronous_shaders"}; 344 Setting<bool> use_asynchronous_shaders{false, "use_asynchronous_shaders"};
339 Setting<bool> use_fast_gpu_time{true, "use_fast_gpu_time"}; 345 Setting<bool> use_fast_gpu_time{true, "use_fast_gpu_time"};
340 Setting<bool> use_caches_gc{false, "use_caches_gc"}; 346 Setting<bool> use_caches_gc{false, "use_caches_gc"};