Add advanced tab

This commit is contained in:
msuih 2019-08-15 19:01:19 +03:00 committed by Ivan
parent f2a2dfda3a
commit 42ff93d30c
4 changed files with 380 additions and 82 deletions

View File

@ -1,4 +1,16 @@
{
"advanced": {
"debugConsoleMode": "Increases the amount of usable system memory to match a DECR console and more.\nCauses some software to behave differently than on retail hardware.",
"readColor": "Initializes render target memory using vm memory.",
"readDepth": "Initializes render target memory using vm memory.",
"dumpDepth": "Writes depth buffer values to vm memory.",
"disableOnDiskShaderCache": "Disables the loading and saving of shaders from and to the shader cache in the data directory.",
"maxSPURSThreads": "Limits the maximum number of SPURS threads in each thread group.\nMay improve performance in some cases, especially on systems with limited number of hardware threads.\nLimiting the number of threads is likely to cause crashes; it's recommended to keep this at default value.",
"sleepTimersAccuracy": "Changes the sleep period accuracy.\n'As Host' uses default accuracy of the underlying operating system, while 'All Timers' attempts to improve it.\n'Usleep Only' limits the adjustments to usleep syscall only.\nCan affect perfomance in unexpected ways.",
"vblankRate": "Adjusts the frequency of vertical blanking signals that the emulator sends.\nAffects timing of events which rely on these signals.",
"clocksScale": "Changes the scale of emulated system time.\nAffects software which uses system time to calculate things such as dynamic timesteps.",
"disabledFromGlobal": "Do not change this setting globally.\nRight-click the game in game list and choose \"Configure\" instead."
},
"audio": {
"audioOutBox": "XAudio2 is the recommended option and should be used whenever possible.\nOpenAL uses a cross-platform approach and is the next best alternative.",
"audioOutBox_Linux": "OpenAL uses a cross-platform approach and supports audio buffering, so it is the recommended option.\nPulseAudio uses the native Linux sound system, and is the next best alternative. If neither are available, ALSA can be used instead.",
@ -51,10 +63,6 @@
"accurateGETLLAR": "Never use this.",
"accuratePUTLLUC": "Never use this.",
"hookStFunc": "Allows to hook some functions like 'memcpy' replacing them with high-level implementations. May do nothing or break things. Experimental.",
"debugConsoleMode": "Increases the amount of usable system memory to match a DECR console and more.\nCauses some software to behave differently than on retail hardware.",
"readColor": "Never use this.",
"dumpDepth": "Never use this.",
"readDepth": "Never use this.",
"glLegacyBuffers": "Enables use of classic OpenGL buffers which allows capturing tools to work with RPCS3 e.g RenderDoc.\nIf unsure, don't use this option.",
"forceHighpZ": "Only useful when debugging differences in GPU hardware.\nNot necessary for average users.\nIf unsure, don't use this option.",
"debugOutput": "Enables the selected API's inbuilt debugging functionality.\nWill cause severe performance degradation especially with Vulkan.\nOnly useful to developers.\nIf unsure, don't use this option.",
@ -62,12 +70,10 @@
"logProg": "Dump game shaders to file. Only useful to developers.\nIf unsure, don't use this option.",
"disableOcclusionQueries": "Disables running occlusion queries. Minor to moderate performance boost.\nMight introduce issues with broken occlusion e.g missing geometry and extreme pop-in.",
"forceCpuBlitEmulation": "Forces emulation of all blit and image manipulation operations on the CPU.\nRequires 'Write Color Buffers' option to also be enabled in most cases to avoid missing graphics.\nSignificantly degrades performance but is more accurate in some cases.\nThis setting overrides the 'GPU texture scaling' option.",
"disableOnDiskShaderCache": "Disables the loading and saving of shaders from and to the shader cache in the data directory.",
"disableVulkanMemAllocator": "Disables the custom Vulkan memory allocator and reverts to direct calls to VkAllocateMemory/VkFreeMemory.",
"disableFIFOReordering": "Disables RSX FIFO optimizations completely. Draws are processed as they are received by the DMA puller.",
"gpuTextureScaling": "Force all texture transfer, scaling and conversion operations on the GPU.\nMay cause texture corruption in some cases.",
"strictTextureFlushing": "Forces texture flushing even in situations where it is not necessary/correct. Known to cause visual artifacts, but useful for debugging certain texture cache issues.",
"maxSPURSThreads": "Limits the maximum number of SPURS threads in each thread group.\nMay improve performance in some cases, especially on systems with limited number of hardware threads.\nLimiting the number of threads is likely to cause crashes; it's recommended to keep this at default value."
"strictTextureFlushing": "Forces texture flushing even in situations where it is not necessary/correct. Known to cause visual artifacts, but useful for debugging certain texture cache issues."
},
"emulator": {
"misc": {

View File

@ -47,6 +47,8 @@ public:
SPUCache,
DebugConsoleMode,
MaxSPURSThreads,
SleepTimersAccuracy,
ClocksScale,
// Graphics
Renderer,
@ -81,6 +83,7 @@ public:
DisableVulkanMemAllocator,
DisableAsyncShaderCompiler,
MultithreadedRSX,
VBlankRate,
// Performance Overlay
PerfOverlayEnabled,
@ -274,6 +277,8 @@ private:
{ SPUCache, { "Core", "SPU Cache"}},
{ DebugConsoleMode, { "Core", "Debug Console Mode"}},
{ MaxSPURSThreads, { "Core", "Max SPURS Threads"}},
{ SleepTimersAccuracy, { "Core", "Sleep Timers Accuracy"}},
{ ClocksScale, { "Core", "Clocks scale"}},
// Graphics Tab
{ Renderer, { "Video", "Renderer"}},
@ -308,6 +313,7 @@ private:
{ MinimumScalableDimension, { "Video", "Minimum Scalable Dimension"}},
{ D3D12Adapter, { "Video", "D3D12", "Adapter"}},
{ VulkanAdapter, { "Video", "Vulkan", "Adapter"}},
{ VBlankRate, { "Video", "Vblank Rate"}},
// Performance Overlay
{ PerfOverlayEnabled, { "Video", "Performance Overlay", "Enabled" } },

View File

@ -45,11 +45,11 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
xgui_settings->SetValue(gui::m_showDebugTab, showDebugTab);
if (!showDebugTab)
{
ui->tab_widget_settings->removeTab(8);
ui->tab_widget_settings->removeTab(9);
}
if (game)
{
ui->tab_widget_settings->removeTab(7);
ui->tab_widget_settings->removeTab(8);
}
// Add description labels
@ -59,6 +59,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
SubscribeDescription(ui->description_io);
SubscribeDescription(ui->description_system);
SubscribeDescription(ui->description_network);
SubscribeDescription(ui->description_advanced);
SubscribeDescription(ui->description_emulator);
if (!game)
{
@ -89,6 +90,8 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
QJsonObject json_sys = json_obj.value("system").toObject();
QJsonObject json_net = json_obj.value("network").toObject();
QJsonObject json_advanced = json_obj.value("advanced").toObject();
QJsonObject json_emu = json_obj.value("emulator").toObject();
QJsonObject json_emu_misc = json_emu.value("misc").toObject();
QJsonObject json_emu_overlay = json_emu.value("overlay").toObject();
@ -1039,6 +1042,72 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
xemu_settings->EnhanceComboBox(ui->netStatusBox, emu_settings::ConnectionStatus);
SubscribeTooltip(ui->netStatusBox, json_net["netStatusBox"].toString());
// _ _ _______ _
// /\ | | | | |__ __| | |
// / \ __| |_ ____ _ _ __ ___ ___ __| | | | __ _| |__
// / /\ \ / _` \ \ / / _` | '_ \ / __/ _ \/ _` | | |/ _` | '_ \
// / ____ \ (_| |\ V / (_| | | | | (_| __/ (_| | | | (_| | |_) |
// /_/ \_\__,_| \_/ \__,_|_| |_|\___\___|\__,_| |_|\__,_|_.__/
// Checkboxes
xemu_settings->EnhanceCheckBox(ui->debugConsoleMode, emu_settings::DebugConsoleMode);
SubscribeTooltip(ui->debugConsoleMode, json_advanced["debugConsoleMode"].toString());
xemu_settings->EnhanceCheckBox(ui->readColor, emu_settings::ReadColorBuffers);
SubscribeTooltip(ui->readColor, json_advanced["readColor"].toString());
xemu_settings->EnhanceCheckBox(ui->readDepth, emu_settings::ReadDepthBuffer);
SubscribeTooltip(ui->readDepth, json_advanced["readDepth"].toString());
xemu_settings->EnhanceCheckBox(ui->dumpDepth, emu_settings::WriteDepthBuffer);
SubscribeTooltip(ui->dumpDepth, json_advanced["dumpDepth"].toString());
xemu_settings->EnhanceCheckBox(ui->disableOnDiskShaderCache, emu_settings::DisableOnDiskShaderCache);
SubscribeTooltip(ui->disableOnDiskShaderCache, json_advanced["disableOnDiskShaderCache"].toString());
// Comboboxes
xemu_settings->EnhanceComboBox(ui->maxSPURSThreads, emu_settings::MaxSPURSThreads, true);
ui->maxSPURSThreads->setItemText(ui->maxSPURSThreads->findData("6"), tr("Unlimited (Default)"));
SubscribeTooltip(ui->maxSPURSThreads, json_advanced["maxSPURSThreads"].toString());
xemu_settings->EnhanceComboBox(ui->sleepTimersAccuracy, emu_settings::SleepTimersAccuracy);
SubscribeTooltip(ui->sleepTimersAccuracy, json_advanced["sleepTimersAccuracy"].toString());
// Sliders
EnhanceSlider(emu_settings::VBlankRate, ui->vblank, ui->vblankText, tr("%0 Hz"));
int vblankDef = stoi(xemu_settings->GetSettingDefault(emu_settings::VBlankRate));
connect(ui->vblankReset, &QAbstractButton::clicked, [=]()
{
ui->vblank->setValue(vblankDef);
});
EnhanceSlider(emu_settings::ClocksScale, ui->clockScale, ui->clockScaleText, tr("%0 %"));
int clocksScaleDef = stoi(xemu_settings->GetSettingDefault(emu_settings::ResolutionScale));
connect(ui->clockScaleReset, &QAbstractButton::clicked, [=]()
{
ui->clockScale->setValue(clocksScaleDef);
});
if (!game) // Prevent users from doing dumb things
{
ui->vblank->setDisabled(true);
ui->vblankReset->setDisabled(true);
SubscribeTooltip(ui->vblank, json_advanced["disabledFromGlobal"].toString());
ui->clockScale->setDisabled(true);
ui->clockScaleReset->setDisabled(true);
SubscribeTooltip(ui->clockScale, json_advanced["disabledFromGlobal"].toString());
}
else
{
SubscribeTooltip(ui->vblank, json_advanced["vblankRate"].toString());
SubscribeTooltip(ui->clockScale, json_advanced["clocksScale"].toString());
}
// ______ _ _ _______ _
// | ____| | | | | |__ __| | |
// | |__ _ __ ___ _ _| | __ _| |_ ___ _ __ | | __ _| |__
@ -1442,24 +1511,12 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
xemu_settings->EnhanceCheckBox(ui->logProg, emu_settings::LogShaderPrograms);
SubscribeTooltip(ui->logProg, json_debug["logProg"].toString());
xemu_settings->EnhanceCheckBox(ui->readColor, emu_settings::ReadColorBuffers);
SubscribeTooltip(ui->readColor, json_debug["readColor"].toString());
xemu_settings->EnhanceCheckBox(ui->dumpDepth, emu_settings::WriteDepthBuffer);
SubscribeTooltip(ui->dumpDepth, json_debug["dumpDepth"].toString());
xemu_settings->EnhanceCheckBox(ui->readDepth, emu_settings::ReadDepthBuffer);
SubscribeTooltip(ui->readDepth, json_debug["readDepth"].toString());
xemu_settings->EnhanceCheckBox(ui->disableHwOcclusionQueries, emu_settings::DisableOcclusionQueries);
SubscribeTooltip(ui->disableHwOcclusionQueries, json_debug["disableOcclusionQueries"].toString());
xemu_settings->EnhanceCheckBox(ui->forceCpuBlitEmulation, emu_settings::ForceCPUBlitEmulation);
SubscribeTooltip(ui->forceCpuBlitEmulation, json_debug["forceCpuBlitEmulation"].toString());
xemu_settings->EnhanceCheckBox(ui->disableOnDiskShaderCache, emu_settings::DisableOnDiskShaderCache);
SubscribeTooltip(ui->disableOnDiskShaderCache, json_debug["disableOnDiskShaderCache"].toString());
xemu_settings->EnhanceCheckBox(ui->disableVulkanMemAllocator, emu_settings::DisableVulkanMemAllocator);
SubscribeTooltip(ui->disableVulkanMemAllocator, json_debug["disableVulkanMemAllocator"].toString());
@ -1491,14 +1548,6 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> guiSettings, std:
xemu_settings->EnhanceCheckBox(ui->hookStFunc, emu_settings::HookStaticFuncs);
SubscribeTooltip(ui->hookStFunc, json_debug["hookStFunc"].toString());
xemu_settings->EnhanceCheckBox(ui->debugConsoleMode, emu_settings::DebugConsoleMode);
SubscribeTooltip(ui->debugConsoleMode, json_debug["debugConsoleMode"].toString());
// Comboboxes
xemu_settings->EnhanceComboBox(ui->maxSPURSThreads, emu_settings::MaxSPURSThreads, true);
ui->maxSPURSThreads->setItemText(ui->maxSPURSThreads->findData("6"), tr("Unlimited (Default)"));
SubscribeTooltip(ui->maxSPURSThreads, json_debug["maxSPURSThreads"].toString());
// Layout fix for High Dpi
layout()->setSizeConstraint(QLayout::SetFixedSize);
}

View File

@ -1564,6 +1564,296 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="advancedTab">
<attribute name="title">
<string>Advanced</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_83">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_28" stretch="1,1,1">
<item>
<layout class="QVBoxLayout" name="verticalLayout_89">
<item>
<widget class="QGroupBox" name="gb_advanced_core">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Core</string>
</property>
<layout class="QVBoxLayout" name="VerticalLayout_91">
<item>
<widget class="QCheckBox" name="debugConsoleMode">
<property name="text">
<string>Debug Console Mode</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gb_sleep_timers_accuracy">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Sleep Timers Accuracy</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_85">
<item>
<widget class="QComboBox" name="sleepTimersAccuracy"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gb_max_spurs_threads">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Maximum Number of SPURS Threads</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_82">
<item>
<widget class="QComboBox" name="maxSPURSThreads"/>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_23">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="VerticalLayout_88">
<item>
<widget class="QGroupBox" name="gb_advanced_gpu">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>GPU</string>
</property>
<layout class="QVBoxLayout" name="VerticalLayout_90">
<item>
<widget class="QCheckBox" name="readDepth">
<property name="text">
<string>Read Depth Buffers</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="dumpDepth">
<property name="text">
<string>Write Depth Buffers</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="readColor">
<property name="text">
<string>Read Color Buffers</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="disableOnDiskShaderCache">
<property name="text">
<string>Disable On-Disk Shader Cache</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_22">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="VerticalLayout_87">
<item>
<widget class="QGroupBox" name="gb_vblank">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>VBlank Frequency</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_86">
<item>
<widget class="QSlider" name="vblank">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_30" stretch="1,0">
<item>
<widget class="QLabel" name="vblankText">
<property name="text">
<string>60 Hz</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="vblankReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gb_clockScale">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Clocks Scale</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_87">
<item>
<widget class="QSlider" name="clockScale">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_29" stretch="1,0">
<item>
<widget class="QLabel" name="clockScaleText">
<property name="text">
<string>100%</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="clockScaleReset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_21">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_20">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="groupBox_65">
<property name="title">
<string>Description</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_84">
<item>
<widget class="QLabel" name="description_advanced">
<property name="text">
<string>Point your mouse at an option to display a description in here.
</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="emulatorTab">
<attribute name="title">
<string>Emulator</string>
@ -2370,27 +2660,6 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="dumpDepth">
<property name="text">
<string>Write Depth Buffers</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="readDepth">
<property name="text">
<string>Read Depth Buffers</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="readColor">
<property name="text">
<string>Read Color Buffers</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="disableHwOcclusionQueries">
<property name="text">
@ -2405,13 +2674,6 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="disableOnDiskShaderCache">
<property name="text">
<string>Disable On-Disk Shader Cache</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="disableVulkanMemAllocator">
<property name="text">
@ -2491,13 +2753,6 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="debugConsoleMode">
<property name="text">
<string>Debug Console Mode</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
@ -2511,24 +2766,6 @@
</property>
</spacer>
</item>
<item>
<widget class="QGroupBox" name="gb_max_spurs_threads">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Maximum Number of SPURS Threads</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_82">
<item>
<widget class="QComboBox" name="maxSPURSThreads"/>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>