diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 80d388fe88..ffa2f61b7f 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -151,10 +151,7 @@ bool IsGPULevelHigh() { } bool IsFastmemEnabled() { - if (values.cpu_debug_mode) { - return static_cast(values.cpuopt_fastmem); - } - return true; + return static_cast(values.cpuopt_fastmem); } static bool is_nce_enabled = false; diff --git a/src/common/settings.h b/src/common/settings.h index 7611f54043..23a0fe131d 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -371,7 +371,8 @@ struct Values { AstcDecodeMode::CpuAsynchronous, "accelerate_astc", Category::RendererAdvanced}; - SwitchableSetting nvdec_emulation{linkage, NvdecEmulation::Gpu, "nvdec_emulation", Category::RendererAdvanced}; + SwitchableSetting nvdec_emulation{ + linkage, NvdecEmulation::Gpu, "nvdec_emulation", Category::RendererAdvanced}; SwitchableSetting astc_recompression{linkage, AstcRecompression::Uncompressed, AstcRecompression::Uncompressed, diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp index 36478f7224..47f642e75a 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp @@ -225,45 +225,45 @@ std::shared_ptr ArmDynarmic32::MakeJit(Common::PageTable* pa } // Safe optimizations - if (Settings::values.cpu_debug_mode) { - if (!Settings::values.cpuopt_page_tables) { - config.page_table = nullptr; - } - if (!Settings::values.cpuopt_block_linking) { - config.optimizations &= ~Dynarmic::OptimizationFlag::BlockLinking; - } - if (!Settings::values.cpuopt_return_stack_buffer) { - config.optimizations &= ~Dynarmic::OptimizationFlag::ReturnStackBuffer; - } - if (!Settings::values.cpuopt_fast_dispatcher) { - config.optimizations &= ~Dynarmic::OptimizationFlag::FastDispatch; - } - if (!Settings::values.cpuopt_context_elimination) { - config.optimizations &= ~Dynarmic::OptimizationFlag::GetSetElimination; - } - if (!Settings::values.cpuopt_const_prop) { - config.optimizations &= ~Dynarmic::OptimizationFlag::ConstProp; - } - if (!Settings::values.cpuopt_misc_ir) { - config.optimizations &= ~Dynarmic::OptimizationFlag::MiscIROpt; - } - if (!Settings::values.cpuopt_reduce_misalign_checks) { - config.only_detect_misalignment_via_page_table_on_page_boundary = false; - } - if (!Settings::values.cpuopt_fastmem) { - config.fastmem_pointer = nullptr; - config.fastmem_exclusive_access = false; - } - if (!Settings::values.cpuopt_fastmem_exclusives) { - config.fastmem_exclusive_access = false; - } - if (!Settings::values.cpuopt_recompile_exclusives) { - config.recompile_on_exclusive_fastmem_failure = false; - } - if (!Settings::values.cpuopt_ignore_memory_aborts) { - config.check_halt_on_memory_access = true; - } - } else { + if (!Settings::values.cpuopt_page_tables) { + config.page_table = nullptr; + } + if (!Settings::values.cpuopt_block_linking) { + config.optimizations &= ~Dynarmic::OptimizationFlag::BlockLinking; + } + if (!Settings::values.cpuopt_return_stack_buffer) { + config.optimizations &= ~Dynarmic::OptimizationFlag::ReturnStackBuffer; + } + if (!Settings::values.cpuopt_fast_dispatcher) { + config.optimizations &= ~Dynarmic::OptimizationFlag::FastDispatch; + } + if (!Settings::values.cpuopt_context_elimination) { + config.optimizations &= ~Dynarmic::OptimizationFlag::GetSetElimination; + } + if (!Settings::values.cpuopt_const_prop) { + config.optimizations &= ~Dynarmic::OptimizationFlag::ConstProp; + } + if (!Settings::values.cpuopt_misc_ir) { + config.optimizations &= ~Dynarmic::OptimizationFlag::MiscIROpt; + } + if (!Settings::values.cpuopt_reduce_misalign_checks) { + config.only_detect_misalignment_via_page_table_on_page_boundary = false; + } + if (!Settings::values.cpuopt_fastmem) { + config.fastmem_pointer = nullptr; + config.fastmem_exclusive_access = false; + } + if (!Settings::values.cpuopt_fastmem_exclusives) { + config.fastmem_exclusive_access = false; + } + if (!Settings::values.cpuopt_recompile_exclusives) { + config.recompile_on_exclusive_fastmem_failure = false; + } + if (!Settings::values.cpuopt_ignore_memory_aborts) { + config.check_halt_on_memory_access = true; + } + + if (!Settings::values.cpu_debug_mode) { // Unsafe optimizations if (Settings::values.cpu_accuracy.GetValue() == Settings::CpuAccuracy::Unsafe) { config.unsafe_optimizations = true; diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.cpp b/src/core/arm/dynarmic/arm_dynarmic_64.cpp index c811c8ad56..10d44811df 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_64.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_64.cpp @@ -284,45 +284,45 @@ std::shared_ptr ArmDynarmic64::MakeJit(Common::PageTable* pa } // Safe optimizations - if (Settings::values.cpu_debug_mode) { - if (!Settings::values.cpuopt_page_tables) { - config.page_table = nullptr; - } - if (!Settings::values.cpuopt_block_linking) { - config.optimizations &= ~Dynarmic::OptimizationFlag::BlockLinking; - } - if (!Settings::values.cpuopt_return_stack_buffer) { - config.optimizations &= ~Dynarmic::OptimizationFlag::ReturnStackBuffer; - } - if (!Settings::values.cpuopt_fast_dispatcher) { - config.optimizations &= ~Dynarmic::OptimizationFlag::FastDispatch; - } - if (!Settings::values.cpuopt_context_elimination) { - config.optimizations &= ~Dynarmic::OptimizationFlag::GetSetElimination; - } - if (!Settings::values.cpuopt_const_prop) { - config.optimizations &= ~Dynarmic::OptimizationFlag::ConstProp; - } - if (!Settings::values.cpuopt_misc_ir) { - config.optimizations &= ~Dynarmic::OptimizationFlag::MiscIROpt; - } - if (!Settings::values.cpuopt_reduce_misalign_checks) { - config.only_detect_misalignment_via_page_table_on_page_boundary = false; - } - if (!Settings::values.cpuopt_fastmem) { - config.fastmem_pointer = nullptr; - config.fastmem_exclusive_access = false; - } - if (!Settings::values.cpuopt_fastmem_exclusives) { - config.fastmem_exclusive_access = false; - } - if (!Settings::values.cpuopt_recompile_exclusives) { - config.recompile_on_exclusive_fastmem_failure = false; - } - if (!Settings::values.cpuopt_ignore_memory_aborts) { - config.check_halt_on_memory_access = true; - } - } else { + if (!Settings::values.cpuopt_page_tables) { + config.page_table = nullptr; + } + if (!Settings::values.cpuopt_block_linking) { + config.optimizations &= ~Dynarmic::OptimizationFlag::BlockLinking; + } + if (!Settings::values.cpuopt_return_stack_buffer) { + config.optimizations &= ~Dynarmic::OptimizationFlag::ReturnStackBuffer; + } + if (!Settings::values.cpuopt_fast_dispatcher) { + config.optimizations &= ~Dynarmic::OptimizationFlag::FastDispatch; + } + if (!Settings::values.cpuopt_context_elimination) { + config.optimizations &= ~Dynarmic::OptimizationFlag::GetSetElimination; + } + if (!Settings::values.cpuopt_const_prop) { + config.optimizations &= ~Dynarmic::OptimizationFlag::ConstProp; + } + if (!Settings::values.cpuopt_misc_ir) { + config.optimizations &= ~Dynarmic::OptimizationFlag::MiscIROpt; + } + if (!Settings::values.cpuopt_reduce_misalign_checks) { + config.only_detect_misalignment_via_page_table_on_page_boundary = false; + } + if (!Settings::values.cpuopt_fastmem) { + config.fastmem_pointer = nullptr; + config.fastmem_exclusive_access = false; + } + if (!Settings::values.cpuopt_fastmem_exclusives) { + config.fastmem_exclusive_access = false; + } + if (!Settings::values.cpuopt_recompile_exclusives) { + config.recompile_on_exclusive_fastmem_failure = false; + } + if (!Settings::values.cpuopt_ignore_memory_aborts) { + config.check_halt_on_memory_access = true; + } + + if (!Settings::values.cpu_debug_mode) { // Unsafe optimizations if (Settings::values.cpu_accuracy.GetValue() == Settings::CpuAccuracy::Unsafe) { config.unsafe_optimizations = true; diff --git a/src/yuzu/configuration/configure_cpu_debug.ui b/src/yuzu/configuration/configure_cpu_debug.ui index 3010f7fad3..e3e20c4d22 100644 --- a/src/yuzu/configuration/configure_cpu_debug.ui +++ b/src/yuzu/configuration/configure_cpu_debug.ui @@ -28,7 +28,7 @@ - <html><head/><body><p><span style=" font-weight:600;">For debugging only.</span><br/>If you're not sure what these do, keep all of these enabled. <br/>These settings, when disabled, only take effect when CPU Debugging is enabled. </p></body></html> + <html><head/><body><p><span style=" font-weight:600;">For debugging only.</span><br/>If you're not sure what these do, keep all of these enabled.</p></body></html> false @@ -144,7 +144,7 @@ - Enable Host MMU Emulation (general memory instructions) + Enable Host MMU Emulation (Fastmem) - General memory instructions @@ -158,7 +158,7 @@ - Enable Host MMU Emulation (exclusive memory instructions) + Enable Host MMU Emulation (Fastmem) - Exclusive memory instructions