qt: Add shader compiler threads to GUI

This commit is contained in:
kd-11 2020-11-13 20:03:10 +03:00 committed by kd-11
parent 7553429130
commit 14358d5e84
4 changed files with 25 additions and 2 deletions

View File

@ -71,6 +71,7 @@ enum class emu_settings_type
DisableOnDiskShaderCache,
DisableVulkanMemAllocator,
ShaderMode,
ShaderCompilerNumThreads,
MultithreadedRSX,
VBlankRate,
RelaxedZCULL,
@ -211,6 +212,7 @@ static const QMap<emu_settings_type, cfg_location> settings_location =
{ emu_settings_type::DisableOnDiskShaderCache, { "Video", "Disable On-Disk Shader Cache"}},
{ emu_settings_type::DisableVulkanMemAllocator, { "Video", "Disable Vulkan Memory Allocator"}},
{ emu_settings_type::ShaderMode, { "Video", "Shader Mode"}},
{ emu_settings_type::ShaderCompilerNumThreads, { "Video", "Shader Compiler Threads"}},
{ emu_settings_type::MultithreadedRSX, { "Video", "Multithreaded RSX"}},
{ emu_settings_type::RelaxedZCULL, { "Video", "Relaxed ZCULL Sync"}},
{ emu_settings_type::AnisotropicFilterOverride, { "Video", "Anisotropic Filter Override"}},

View File

@ -392,6 +392,11 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
}
}
// Comboboxes
m_emu_settings->EnhanceComboBox(ui->shaderCompilerThreads, emu_settings_type::ShaderCompilerNumThreads, true);
SubscribeTooltip(ui->gb_shader_compiler_threads, tooltips.settings.shader_compiler_threads);
ui->shaderCompilerThreads->setItemText(ui->shaderCompilerThreads->findData(0), tr("Auto", "Number of Shader Compiler Threads"));
// Checkboxes: main options
m_emu_settings->EnhanceCheckBox(ui->dumpColor, emu_settings_type::WriteColorBuffers);
SubscribeTooltip(ui->dumpColor, tooltips.settings.dump_color);

View File

@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>753</width>
<height>620</height>
<height>650</height>
</rect>
</property>
<property name="sizePolicy">
@ -38,6 +38,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="coreTab">
<attribute name="title">
<string>CPU</string>
@ -682,6 +685,18 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gb_shader_compiler_threads">
<property name="title">
<string>Number of Shader Compiler Threads</string>
</property>
<layout class="QVBoxLayout" name="gb_shader_compiler_threads_layout">
<item>
<widget class="QComboBox" name="shaderCompilerThreads"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="gb_additional_settings">
<property name="sizePolicy">

View File

@ -1,4 +1,4 @@
#pragma once
#pragma once
#include <QString>
#include <QObject>
@ -155,6 +155,7 @@ public:
const QString async_shader_recompiler = tr("This is the recommended option.\nIf a shader is not found in the cache, nothing will be rendered for this shader until it has compiled.\nYou may experience graphics pop-in.");
const QString async_with_shader_interpreter = tr("Hybrid rendering mode.\nIf a shader is not found in the cache, the interpreter will be used to render approximated graphics for this shader until it has compiled.");
const QString shader_interpreter_only = tr("All rendering is handled by the interpreter with no attempt to compile native shaders.\nThis mode is very slow and experimental.");
const QString shader_compiler_threads = tr("Number of threads to use for the shader compiler backend.\nOnly has an impact when shader mode is set to one of the asynchronous modes.");
// gui