aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGPUCode <[email protected]>2023-11-17 22:03:42 +0200
committert895 <[email protected]>2023-11-25 00:46:15 -0500
commit15331c2a6007656171275fcbb41f912c1297c358 (patch)
tree4360bc9b25703cd97a8aca320e1adba8a61c356b
parentf2a840908380f876a1b5675e9cae281c8db77776 (diff)
downloadyuzu-android-15331c2a6007656171275fcbb41f912c1297c358.tar.gz
yuzu-android-15331c2a6007656171275fcbb41f912c1297c358.zip
settings: Add cpu backend setting
-rw-r--r--src/common/settings.cpp5
-rw-r--r--src/common/settings.h10
-rw-r--r--src/common/settings_enums.h2
3 files changed, 17 insertions, 0 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp
index a10131eb2..19dfe08da 100644
--- a/src/common/settings.cpp
+++ b/src/common/settings.cpp
@@ -41,6 +41,7 @@ SWITCHABLE(AspectRatio, true);
SWITCHABLE(AstcDecodeMode, true);
SWITCHABLE(AstcRecompression, true);
SWITCHABLE(AudioMode, true);
+SWITCHABLE(CpuBackend, true);
SWITCHABLE(CpuAccuracy, true);
SWITCHABLE(FullscreenMode, true);
SWITCHABLE(GpuAccuracy, true);
@@ -155,6 +156,10 @@ bool IsFastmemEnabled() {
return true;
}
+bool IsNceEnabled(bool is_64bit) {
+ return values.cpu_backend.GetValue() == CpuBackend::Nce && is_64bit;
+}
+
bool IsDockedMode() {
return values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked;
}
diff --git a/src/common/settings.h b/src/common/settings.h
index e75099b89..389c747cb 100644
--- a/src/common/settings.h
+++ b/src/common/settings.h
@@ -63,6 +63,7 @@ SWITCHABLE(AspectRatio, true);
SWITCHABLE(AstcDecodeMode, true);
SWITCHABLE(AstcRecompression, true);
SWITCHABLE(AudioMode, true);
+SWITCHABLE(CpuBackend, true);
SWITCHABLE(CpuAccuracy, true);
SWITCHABLE(FullscreenMode, true);
SWITCHABLE(GpuAccuracy, true);
@@ -179,6 +180,14 @@ struct Values {
&use_speed_limit};
// Cpu
+ SwitchableSetting<CpuBackend, true> cpu_backend{
+ linkage, CpuBackend::Dynarmic, CpuBackend::Dynarmic,
+#ifdef ARCHITECTURE_arm64
+ CpuBackend::Nce,
+#else
+ CpuBackend::Dynarmic,
+#endif
+ "cpu_backend", Category::Cpu};
SwitchableSetting<CpuAccuracy, true> cpu_accuracy{linkage, CpuAccuracy::Auto,
CpuAccuracy::Auto, CpuAccuracy::Paranoid,
"cpu_accuracy", Category::Cpu};
@@ -564,6 +573,7 @@ bool IsGPULevelExtreme();
bool IsGPULevelHigh();
bool IsFastmemEnabled();
+bool IsNceEnabled(bool is_64bit = true);
bool IsDockedMode();
diff --git a/src/common/settings_enums.h b/src/common/settings_enums.h
index 11429d7a8..d6351e57e 100644
--- a/src/common/settings_enums.h
+++ b/src/common/settings_enums.h
@@ -129,6 +129,8 @@ ENUM(ShaderBackend, Glsl, Glasm, SpirV);
ENUM(GpuAccuracy, Normal, High, Extreme);
+ENUM(CpuBackend, Dynarmic, Nce);
+
ENUM(CpuAccuracy, Auto, Accurate, Unsafe, Paranoid);
ENUM(MemoryLayout, Memory_4Gb, Memory_6Gb, Memory_8Gb);