Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

settings: Refactor a few CPU tab settings #10928

Merged
merged 3 commits into from Sep 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions rpcs3/Emu/CPU/CPUThread.cpp
Expand Up @@ -411,11 +411,6 @@ void cpu_thread::operator()()
}
if (id_type() == 2)
{
if (g_cfg.core.lower_spu_priority)
{
thread_ctrl::set_native_priority(-1);
}

// force input/output denormals to zero for SPU threads (FTZ/DAZ)
_mm_setcsr( _mm_getcsr() | 0x8040 );

Expand Down
3 changes: 1 addition & 2 deletions rpcs3/Emu/system_config.h
Expand Up @@ -31,13 +31,12 @@ struct cfg_root : cfg::node
cfg::_enum<thread_scheduler_mode> thread_scheduler{this, "Thread Scheduler Mode", thread_scheduler_mode::os};
cfg::_bool set_daz_and_ftz{ this, "Set DAZ and FTZ", false };
cfg::_enum<spu_decoder_type> spu_decoder{ this, "SPU Decoder", spu_decoder_type::llvm };
cfg::_bool lower_spu_priority{ this, "Lower SPU thread priority" };
cfg::_bool spu_getllar_polling_detection{ this, "SPU GETLLAR polling detection", false, true };
cfg::_bool spu_debug{ this, "SPU Debug" };
cfg::_bool mfc_debug{ this, "MFC Debug" };
cfg::_int<0, 6> preferred_spu_threads{ this, "Preferred SPU Threads", 0, true }; // Number of hardware threads dedicated to heavy simultaneous spu tasks
cfg::_int<0, 16> spu_delay_penalty{ this, "SPU delay penalty", 3 }; // Number of milliseconds to block a thread if a virtual 'core' isn't free
cfg::_bool spu_loop_detection{ this, "SPU loop detection", true, true }; // Try to detect wait loops and trigger thread yield
cfg::_bool spu_loop_detection{ this, "SPU loop detection", false, true }; // Try to detect wait loops and trigger thread yield
cfg::_int<0, 6> max_spurs_threads{ this, "Max SPURS Threads", 6 }; // HACK. If less then 6, max number of running SPURS threads in each thread group.
cfg::_enum<spu_block_size_type> spu_block_size{ this, "SPU Block Size", spu_block_size_type::safe };
cfg::_bool spu_accurate_getllar{ this, "Accurate GETLLAR", false, true };
Expand Down
2 changes: 0 additions & 2 deletions rpcs3/rpcs3qt/emu_settings_type.h
Expand Up @@ -12,7 +12,6 @@ enum class emu_settings_type
SPUDecoder,
HookStaticFuncs,
ThreadSchedulerMode,
LowerSPUThreadPrio,
SPULoopDetection,
PreferredSPUThreads,
PPUDebug,
Expand Down Expand Up @@ -164,7 +163,6 @@ inline static const QMap<emu_settings_type, cfg_location> settings_location =
{ emu_settings_type::SPUDecoder, { "Core", "SPU Decoder"}},
{ emu_settings_type::HookStaticFuncs, { "Core", "Hook static functions"}},
{ emu_settings_type::ThreadSchedulerMode, { "Core", "Thread Scheduler Mode"}},
{ emu_settings_type::LowerSPUThreadPrio, { "Core", "Lower SPU thread priority"}},
{ emu_settings_type::SPULoopDetection, { "Core", "SPU loop detection"}},
{ emu_settings_type::PreferredSPUThreads, { "Core", "Preferred SPU Threads"}},
{ emu_settings_type::PPUDebug, { "Core", "PPU Debug"}},
Expand Down
6 changes: 0 additions & 6 deletions rpcs3/rpcs3qt/settings_dialog.cpp
Expand Up @@ -195,12 +195,6 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std

// Checkboxes

m_emu_settings->EnhanceCheckBox(ui->spuCache, emu_settings_type::SPUCache);
SubscribeTooltip(ui->spuCache, tooltips.settings.spu_cache);

m_emu_settings->EnhanceCheckBox(ui->lowerSPUThrPrio, emu_settings_type::LowerSPUThreadPrio);
SubscribeTooltip(ui->lowerSPUThrPrio, tooltips.settings.lower_spu_thread_priority);

m_emu_settings->EnhanceCheckBox(ui->spuLoopDetection, emu_settings_type::SPULoopDetection);
SubscribeTooltip(ui->spuLoopDetection, tooltips.settings.spu_loop_detection);

Expand Down
14 changes: 0 additions & 14 deletions rpcs3/rpcs3qt/settings_dialog.ui
Expand Up @@ -143,27 +143,13 @@
<string>Additional Settings</string>
</property>
<layout class="QVBoxLayout" name="checkboxes_layout">
<item>
<widget class="QCheckBox" name="lowerSPUThrPrio">
<property name="text">
<string>Lower SPU thread priority</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="spuLoopDetection">
<property name="text">
<string>Enable SPU loop detection</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="spuCache">
<property name="text">
<string>SPU Cache</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="accurateXFloat">
<property name="text">
Expand Down
2 changes: 0 additions & 2 deletions rpcs3/rpcs3qt/tooltips.h
Expand Up @@ -64,9 +64,7 @@ class Tooltips : public QObject
const QString spu_asmjit = tr("Recompiles the game's SPU code using the ASMJIT Recompiler.\nThis is the fast option with very good compatibility.\nIf unsure, use this option.");
const QString spu_llvm = tr("Recompiles and caches the game's SPU code using the LLVM Recompiler before running which adds extra start-up time.\nThis is the fastest option with very good compatibility.\nIf you experience issues, use the ASMJIT Recompiler.");
const QString accurate_xfloat = tr("Adds extra accuracy to SPU float vectors processing.\nFixes bugs in various games at the cost of performance.\nThis setting is only applied when SPU Decoder is set to Fast or LLVM.");
const QString spu_cache = tr("Caches compiled SPU modules on disc.\nShould normally stay enabled.\nDisable this if the cache becomes too large.\nDisabling it does not remove the existing cache.");
const QString enable_thread_scheduler = tr("Control how RPCS3 utilizes the threads of your system.\nEach option heavily depends on the game and on your CPU. It's recommended to try each option to find out which performs the best.\nChanging the thread scheduler is not supported on CPUs with less than 12 threads.");
const QString lower_spu_thread_priority = tr("Runs SPU threads with lower priority than PPU threads.\nUsually faster on an i3 or i5, possibly slower or no difference on an i7 or Ryzen.");
const QString spu_loop_detection = tr("Try to detect loop conditions in SPU kernels and use them as scheduling hints.\nImproves performance and reduces CPU usage.\nMay cause severe audio stuttering in rare cases.");
const QString enable_tsx = tr("Enable usage of TSX instructions.\nNeeds to be forced on some Haswell or Broadwell CPUs.\nForcing this on older Hardware can lead to system instability, use it with caution.");
const QString spu_block_size = tr("This option controls the SPU analyser, particularly the size of compiled units. The Mega and Giga modes may improve performance by tying smaller units together, decreasing the number of compiled units but increasing their size.\nUse the Safe mode for maximum compatibility.");
Expand Down