config: Remove async recording option

* There's no reason to turn this off aside from debugging. So use renderer_debug to to deduce whether to use a worker thread or not
This commit is contained in:
GPUCode
2023-02-10 16:35:23 +02:00
parent d9ed4600ca
commit 95e6428d33
8 changed files with 3 additions and 25 deletions

View File

@ -117,10 +117,6 @@ void Config::ReadValues() {
Settings::values.graphics_api =
static_cast<Settings::GraphicsAPI>(sdl2_config->GetInteger("Renderer", "graphics_api", 2));
Settings::values.renderer_debug = sdl2_config->GetBoolean("Renderer", "renderer_debug", false);
Settings::values.async_command_recording =
sdl2_config->GetBoolean("Renderer", "async_command_recording", true) &&
!Settings::values
.renderer_debug; ///< Enabling debug renderer force disables async recording
Settings::values.async_shader_compilation =
sdl2_config->GetBoolean("Renderer", "async_shader_compilation", true);
Settings::values.spirv_shader_gen =

View File

@ -604,7 +604,6 @@ void Config::ReadRendererValues() {
qt_config->beginGroup(QStringLiteral("Renderer"));
ReadGlobalSetting(Settings::values.physical_device);
ReadGlobalSetting(Settings::values.async_command_recording);
ReadGlobalSetting(Settings::values.async_shader_compilation);
ReadGlobalSetting(Settings::values.spirv_shader_gen);
ReadGlobalSetting(Settings::values.graphics_api);
@ -1090,7 +1089,6 @@ void Config::SaveRendererValues() {
WriteGlobalSetting(Settings::values.graphics_api);
WriteGlobalSetting(Settings::values.physical_device);
WriteGlobalSetting(Settings::values.async_command_recording);
WriteGlobalSetting(Settings::values.async_shader_compilation);
WriteGlobalSetting(Settings::values.spirv_shader_gen);
WriteGlobalSetting(Settings::values.use_hw_renderer);

View File

@ -87,7 +87,6 @@ void ConfigureGraphics::SetConfiguration() {
static_cast<int>(Settings::values.graphics_api.GetValue()));
ui->physical_device_combo->setCurrentIndex(
static_cast<int>(Settings::values.physical_device.GetValue()));
ui->toggle_async_recording->setChecked(Settings::values.async_command_recording.GetValue());
ui->spirv_shader_gen->setChecked(Settings::values.spirv_shader_gen.GetValue());
ui->toggle_async_shaders->setChecked(Settings::values.async_shader_compilation.GetValue());
@ -113,8 +112,6 @@ void ConfigureGraphics::ApplyConfiguration() {
ui->graphics_api_combo);
ConfigurationShared::ApplyPerGameSetting(&Settings::values.physical_device,
ui->physical_device_combo);
ConfigurationShared::ApplyPerGameSetting(&Settings::values.async_command_recording,
ui->toggle_async_recording, async_command_recording);
ConfigurationShared::ApplyPerGameSetting(&Settings::values.async_shader_compilation,
ui->toggle_async_shaders, async_shader_compilation);
ConfigurationShared::ApplyPerGameSetting(&Settings::values.spirv_shader_gen,

View File

@ -40,7 +40,6 @@ private:
ConfigurationShared::CheckState shaders_accurate_mul;
ConfigurationShared::CheckState use_disk_shader_cache;
ConfigurationShared::CheckState use_vsync_new;
ConfigurationShared::CheckState async_command_recording;
ConfigurationShared::CheckState async_shader_compilation;
ConfigurationShared::CheckState spirv_shader_gen;
std::unique_ptr<Ui::ConfigureGraphics> ui;

View File

@ -169,13 +169,6 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="toggle_async_shaders">
<property name="text">
<string>Async Shader Compilation</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -186,12 +179,9 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="toggle_async_recording">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Offloads command buffer recording and fragment shader generation to a worker thread. Can improve performance especially on weaker systems. Disable if you notice better performance. If unsure leave it enabled,&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<widget class="QCheckBox" name="toggle_async_shaders">
<property name="text">
<string>Async Command Recording</string>
<string>Async Shader Compilation</string>
</property>
</widget>
</item>

View File

@ -107,7 +107,6 @@ void LogSettings() {
log_setting("Core_UseCpuJit", values.use_cpu_jit.GetValue());
log_setting("Core_CPUClockPercentage", values.cpu_clock_percentage.GetValue());
log_setting("Renderer_GraphicsAPI", GetAPIName(values.graphics_api.GetValue()));
log_setting("Renderer_AsyncRecording", values.async_command_recording.GetValue());
log_setting("Renderer_AsyncShaders", values.async_shader_compilation.GetValue());
log_setting("Renderer_SpirvShaderGen", values.spirv_shader_gen.GetValue());
log_setting("Renderer_Debug", values.renderer_debug.GetValue());

View File

@ -452,7 +452,6 @@ struct Values {
Setting<bool> dump_command_buffers{false, "dump_command_buffers"};
SwitchableSetting<bool> spirv_shader_gen{true, "spirv_shader_gen"};
SwitchableSetting<bool> async_shader_compilation{false, "async_shader_compilation"};
SwitchableSetting<bool> async_command_recording{true, "async_command_recording"};
SwitchableSetting<bool> use_hw_renderer{true, "use_hw_renderer"};
SwitchableSetting<bool> use_hw_shader{true, "use_hw_shader"};
SwitchableSetting<bool> separable_shader{false, "use_separable_shader"};

View File

@ -32,7 +32,7 @@ void Scheduler::CommandChunk::ExecuteAll(vk::CommandBuffer cmdbuf) {
Scheduler::Scheduler(const Instance& instance, RenderpassCache& renderpass_cache)
: instance{instance}, renderpass_cache{renderpass_cache}, master_semaphore{instance},
command_pool{instance, master_semaphore}, use_worker_thread{
Settings::values.async_command_recording} {
!Settings::values.renderer_debug} {
AllocateWorkerCommandBuffers();
if (use_worker_thread) {
AcquireNewChunk();