diff --git a/rpcs3/Emu/system_config.h b/rpcs3/Emu/system_config.h index cec1db15d7..af1ee0edc6 100644 --- a/rpcs3/Emu/system_config.h +++ b/rpcs3/Emu/system_config.h @@ -168,7 +168,7 @@ struct cfg_root : cfg::node cfg::_bool force_fifo{ this, "Force FIFO present mode" }; cfg::_bool force_primitive_restart{ this, "Force primitive restart flag" }; cfg::_bool force_disable_exclusive_fullscreen_mode{this, "Force Disable Exclusive Fullscreen Mode"}; - cfg::_bool asynchronous_texture_streaming{ this, "Asynchronous Texture Streaming Placeholder", false, true }; // Placeholder text because it'll have to be updated later + cfg::_bool asynchronous_texture_streaming{ this, "Asynchronous Texture Streaming", true, true }; cfg::_enum asynchronous_scheduler{ this, "Asynchronous Queue Scheduler", vk_gpu_scheduler_mode::device }; } vk{ this }; diff --git a/rpcs3/rpcs3qt/emu_settings_type.h b/rpcs3/rpcs3qt/emu_settings_type.h index e2fabb343f..45b3d8c91b 100644 --- a/rpcs3/rpcs3qt/emu_settings_type.h +++ b/rpcs3/rpcs3qt/emu_settings_type.h @@ -76,6 +76,8 @@ enum class emu_settings_type VBlankRate, RelaxedZCULL, DriverWakeUpDelay, + VulkanAsyncTextureUploads, + VulkanAsyncSchedulerDriver, // Performance Overlay PerfOverlayEnabled, @@ -225,6 +227,10 @@ static const QMap settings_location = { emu_settings_type::VBlankRate, { "Video", "Vblank Rate"}}, { emu_settings_type::DriverWakeUpDelay, { "Video", "Driver Wake-Up Delay"}}, + // Vulkan + { emu_settings_type::VulkanAsyncTextureUploads, { "Video", "Vulkan", "Asynchronous Texture Streaming"}}, + { emu_settings_type::VulkanAsyncSchedulerDriver, { "Video", "Vulkan", "Asynchronous Queue Scheduler"}}, + // Performance Overlay { emu_settings_type::PerfOverlayEnabled, { "Video", "Performance Overlay", "Enabled" } }, { emu_settings_type::PerfOverlayFramerateGraphEnabled, { "Video", "Performance Overlay", "Enable Framerate Graph" } }, diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index c7c23d50e9..654b0e6238 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -441,9 +441,13 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std ui->gb_resolutionScale->setEnabled(!checked); ui->gb_minimumScalableDimension->setEnabled(!checked); ui->gb_anisotropicFilter->setEnabled(!checked); + ui->vulkansched->setEnabled(!checked); }; connect(ui->strictModeRendering, &QCheckBox::clicked, this, onStrictRenderingMode); + m_emu_settings->EnhanceCheckBox(ui->asyncTextureStreaming, emu_settings_type::VulkanAsyncTextureUploads); + SubscribeTooltip(ui->asyncTextureStreaming, tooltips.settings.async_texture_streaming); + // Radio buttons SubscribeTooltip(ui->rb_legacy_recompiler, tooltips.settings.legacy_shader_recompiler); @@ -638,15 +642,20 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std connect(ui->graphicsAdapterBox, &QComboBox::currentTextChanged, set_adapter); connect(ui->renderBox, &QComboBox::currentTextChanged, set_renderer); - auto fix_gl_legacy = [=, this](const QString& text) + auto apply_renderer_specific_options = [=, this](const QString& text) { + // OpenGL-only ui->glLegacyBuffers->setEnabled(text == r_creator->OpenGL.name); + + // Vulkan-only + ui->asyncTextureStreaming->setEnabled(text == r_creator->Vulkan.name); + ui->vulkansched->setEnabled(text == r_creator->Vulkan.name); }; // Handle connects to disable specific checkboxes that depend on GUI state. onStrictRenderingMode(ui->strictModeRendering->isChecked()); - fix_gl_legacy(ui->renderBox->currentText()); // Init - connect(ui->renderBox, &QComboBox::currentTextChanged, fix_gl_legacy); + apply_renderer_specific_options(ui->renderBox->currentText()); // Init + connect(ui->renderBox, &QComboBox::currentTextChanged, apply_renderer_specific_options); // _ _ _______ _ // /\ | (_) |__ __| | | @@ -983,6 +992,9 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std m_emu_settings->EnhanceComboBox(ui->sleepTimersAccuracy, emu_settings_type::SleepTimersAccuracy); SubscribeTooltip(ui->gb_sleep_timers_accuracy, tooltips.settings.sleep_timers_accuracy); + m_emu_settings->EnhanceComboBox(ui->vulkansched, emu_settings_type::VulkanAsyncSchedulerDriver); + SubscribeTooltip(ui->gb_vulkansched, tooltips.settings.vulkan_async_scheduler); + // Sliders EnhanceSlider(emu_settings_type::DriverWakeUpDelay, ui->wakeupDelay, ui->wakeupText, tr(reinterpret_cast(u8"%0 µs"), "Driver wake up delay")); diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index f47bb8646d..03f4397aa6 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -10,7 +10,7 @@ 0 0 753 - 650 + 730 @@ -39,7 +39,7 @@ - 0 + 6 @@ -761,6 +761,13 @@ + + + + Asynchronous Texture Streaming + + + @@ -2061,6 +2068,25 @@ + + + + + 0 + 0 + + + + Vulkan Queue Scheduler + + + + + + + + + @@ -2200,8 +2226,8 @@ - 0 - 0 + 13 + 13 diff --git a/rpcs3/rpcs3qt/tooltips.h b/rpcs3/rpcs3qt/tooltips.h index c82fc2601d..1f99bf2df5 100644 --- a/rpcs3/rpcs3qt/tooltips.h +++ b/rpcs3/rpcs3qt/tooltips.h @@ -37,6 +37,7 @@ public: const QString clocks_scale = tr("Changes the scale of emulated system time.\nAffects software which uses system time to calculate things such as dynamic timesteps."); const QString wake_up_delay = tr("Try fiddling with this setting when encountering unstable games. The higher value, the better stability it may provide.\nIncrements/Decrements for each test should be around 100μs to 200μs until finding the best value for optimal stability.\nValues above 1000μs may cause noticeable performance penalties, use with caution."); const QString disabled_from_global = tr("Do not change this setting globally.\nRight-click the game in game list and choose \"Configure\" instead."); + const QString vulkan_async_scheduler = tr("Determines how to schedule GPU async compute jobs when using asynchronous streaming.\nUse 'Host' mode for more spec compliant behavior at the cost of CPU overhead.\nUse 'Device' to let your driver handle this. Beware that 'device' mode technically violates official spec but is the superior option."); // audio @@ -159,6 +160,8 @@ public: 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."); + const QString async_texture_streaming = tr("Stream textures to GPU in parallel with 3D rendering.\nCan improve performance on more powerful GPUs that have spare headroom.\nOnly works with Vulkan renderer."); + // gui const QString log_limit = tr("Sets the maximum amount of blocks that the log can display.\nThis usually equals the number of lines.\nSet 0 in order to remove the limit.");