diff --git a/rpcs3/Emu/CPU/CPUThread.cpp b/rpcs3/Emu/CPU/CPUThread.cpp index fa8cca1980..1330038190 100644 --- a/rpcs3/Emu/CPU/CPUThread.cpp +++ b/rpcs3/Emu/CPU/CPUThread.cpp @@ -329,6 +329,13 @@ struct cpu_prof continue; } + if (!g_cfg.core.spu_debug) + { + // Reduce accuracy in favor of performance when enabled alone + thread_ctrl::wait_for(60, false); + continue; + } + // Wait, roughly for 20µs thread_ctrl::wait_for(20, false); } diff --git a/rpcs3/rpcs3qt/emu_settings_type.h b/rpcs3/rpcs3qt/emu_settings_type.h index c18a7bd38f..dd5b49bf90 100644 --- a/rpcs3/rpcs3qt/emu_settings_type.h +++ b/rpcs3/rpcs3qt/emu_settings_type.h @@ -51,6 +51,7 @@ enum class emu_settings_type AccuratePPUVNAN, AccuratePPUFPCC, MaxPreemptCount, + SPUProfiler, // Graphics Renderer, @@ -237,6 +238,7 @@ inline static const QMap settings_location = { emu_settings_type::AccuratePPUVNAN, { "Core", "PPU Accurate Vector NaN Values"}}, { emu_settings_type::AccuratePPUFPCC, { "Core", "PPU Set FPCC Bits"}}, { emu_settings_type::MaxPreemptCount, { "Core", "Max CPU Preempt Count"}}, + { emu_settings_type::SPUProfiler, { "Core", "SPU Profiler"}}, // Graphics Tab { emu_settings_type::Renderer, { "Video", "Renderer"}}, diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index 0df710c76f..09e4baf390 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -1477,6 +1477,9 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std m_emu_settings->EnhanceCheckBox(ui->compatibleSavestates, emu_settings_type::CompatibleEmulationSavestateMode); SubscribeTooltip(ui->compatibleSavestates, tooltips.settings.compatible_savestates); + m_emu_settings->EnhanceCheckBox(ui->spuProfiler, emu_settings_type::SPUProfiler); + SubscribeTooltip(ui->spuProfiler, tooltips.settings.spu_profiler); + m_emu_settings->EnhanceCheckBox(ui->silenceAllLogs, emu_settings_type::SilenceAllLogs); SubscribeTooltip(ui->silenceAllLogs, tooltips.settings.silence_all_logs); diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index c265f67f5e..a425c80907 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -2440,6 +2440,13 @@ + + + + SPU Profiler + + + diff --git a/rpcs3/rpcs3qt/tooltips.h b/rpcs3/rpcs3qt/tooltips.h index c334dc9c44..8857ba91a4 100644 --- a/rpcs3/rpcs3qt/tooltips.h +++ b/rpcs3/rpcs3qt/tooltips.h @@ -55,6 +55,7 @@ public: const QString suspend_savestates = tr("When this mode is on, emulation exits when saving and the savestate file is concealed after loading it, preventing reuse by RPCS3.\nThis mode is like hibernation of emulation: if you don't want to be able to cheat using savestates when playing the game, consider using this mode.\nDo note that the savestate file is not gone completely, just ignored by RPCS3. You can manually relaunch it if needed."); const QString compatible_savestates = tr("When this mode is on, SPU emulation prioritizes savestate compatibility, however, it may reduce performance slightly.\nWhen this mode is off, some games may not allow making a savestate and show an SPU pause error in the log."); const QString paused_savestates = tr("When this mode is on, savestates are loaded and paused on the first frame.\nThis allows players to prepare for gameplay without being thrown into the action immediately."); + const QString spu_profiler = tr("When enabled, SPU performance is measured at runtime.\nEnable only at a developr's request because when enabled it reduces performance a bit by itself."); // audio