From 24587ab4594e9e9ef815c90db0bb92b0117c0ff9 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sat, 19 Feb 2022 20:43:31 +0300 Subject: [PATCH] rsx: Add the option to the advanced tab --- rpcs3/Emu/RSX/rsx_methods.cpp | 5 +++-- rpcs3/Emu/system_config.h | 2 +- rpcs3/rpcs3qt/emu_settings_type.h | 2 ++ rpcs3/rpcs3qt/settings_dialog.cpp | 7 +++++-- rpcs3/rpcs3qt/settings_dialog.ui | 15 +++++++++++---- rpcs3/rpcs3qt/tooltips.h | 1 + 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/rpcs3/Emu/RSX/rsx_methods.cpp b/rpcs3/Emu/RSX/rsx_methods.cpp index ec63a3f052..ca5ccf0d6d 100644 --- a/rpcs3/Emu/RSX/rsx_methods.cpp +++ b/rpcs3/Emu/RSX/rsx_methods.cpp @@ -235,7 +235,8 @@ namespace rsx void texture_read_semaphore_release(thread* rsx, u32 /*reg*/, u32 arg) { - // Pipeline barrier seems to be equivalent to a SHADER_READ stage barrier + // Pipeline barrier seems to be equivalent to a SHADER_READ stage barrier. + // Ideally the GPU only needs to have cached all textures declared up to this point before writing the label. // lle-gcm likes to inject system reserved semaphores, presumably for system/vsh usage // Avoid calling render to avoid any havoc(flickering) they may cause from invalid flush/write @@ -260,7 +261,7 @@ namespace rsx void back_end_write_semaphore_release(thread* rsx, u32 /*reg*/, u32 arg) { - // Full pipeline barrier + // Full pipeline barrier. GPU must flush pipeline before writing the label const u32 offset = method_registers.semaphore_offset_4097(); diff --git a/rpcs3/Emu/system_config.h b/rpcs3/Emu/system_config.h index c3bac89e37..74bda4a38c 100644 --- a/rpcs3/Emu/system_config.h +++ b/rpcs3/Emu/system_config.h @@ -156,7 +156,7 @@ struct cfg_root : cfg::node cfg::_int<1, 1800> vblank_rate{ this, "Vblank Rate", 60, true }; // Changing this from 60 may affect game speed in unexpected ways cfg::_bool vblank_ntsc{ this, "Vblank NTSC Fixup", false, true }; cfg::_bool decr_memory_layout{ this, "DECR memory layout", false}; // Force enable increased allowed main memory range as DECR console - cfg::_bool host_label_synchronization{ this, "Use Host GPU Labels", false }; + cfg::_bool host_label_synchronization{ this, "Allow Host GPU Labels", false }; struct node_vk : cfg::node { diff --git a/rpcs3/rpcs3qt/emu_settings_type.h b/rpcs3/rpcs3qt/emu_settings_type.h index c3a34eca47..c107ecad5b 100644 --- a/rpcs3/rpcs3qt/emu_settings_type.h +++ b/rpcs3/rpcs3qt/emu_settings_type.h @@ -90,6 +90,7 @@ enum class emu_settings_type DriverWakeUpDelay, VulkanAsyncTextureUploads, VulkanAsyncSchedulerDriver, + AllowHostGPULabels, MetalSemaphore, // Performance Overlay @@ -247,6 +248,7 @@ inline static const QMap settings_location = { emu_settings_type::VulkanAdapter, { "Video", "Vulkan", "Adapter"}}, { emu_settings_type::VBlankRate, { "Video", "Vblank Rate"}}, { emu_settings_type::DriverWakeUpDelay, { "Video", "Driver Wake-Up Delay"}}, + { emu_settings_type::AllowHostGPULabels, { "Video", "Allow Host GPU Labels"}}, // Vulkan { emu_settings_type::VulkanAsyncTextureUploads, { "Video", "Vulkan", "Asynchronous Texture Streaming 2"}}, diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index e06e9e502e..edd436cae6 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -1952,8 +1952,8 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std m_emu_settings->EnhanceCheckBox(ui->strictTextureFlushing, emu_settings_type::StrictTextureFlushing); SubscribeTooltip(ui->strictTextureFlushing, tooltips.settings.strict_texture_flushing); - m_emu_settings->EnhanceCheckBox(ui->DisableNativefp16, emu_settings_type::DisableNativefloat16); - SubscribeTooltip(ui->DisableNativefp16, tooltips.settings.disable_native_fp16); + m_emu_settings->EnhanceCheckBox(ui->disableNativefp16, emu_settings_type::DisableNativefloat16); + SubscribeTooltip(ui->disableNativefp16, tooltips.settings.disable_native_fp16); m_emu_settings->EnhanceCheckBox(ui->Enable3D, emu_settings_type::Enable3D); SubscribeTooltip(ui->Enable3D, tooltips.settings.enable_3d); @@ -1961,6 +1961,9 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std m_emu_settings->EnhanceCheckBox(ui->gpuTextureScaling, emu_settings_type::GPUTextureScaling); SubscribeTooltip(ui->gpuTextureScaling, tooltips.settings.gpu_texture_scaling); + m_emu_settings->EnhanceCheckBox(ui->allowHostGPULabels, emu_settings_type::AllowHostGPULabels); + SubscribeTooltip(ui->allowHostGPULabels, tooltips.settings.allow_host_labels); + // Checkboxes: core debug options m_emu_settings->EnhanceCheckBox(ui->ppuDebug, emu_settings_type::PPUDebug); SubscribeTooltip(ui->ppuDebug, tooltips.settings.ppu_debug); diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index 934ed7eb32..ffc0730a59 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -43,8 +43,8 @@ 0 0 - 838 - 641 + 821 + 667 @@ -54,7 +54,7 @@ - 0 + 6 @@ -2325,12 +2325,19 @@ - + Disable native float16 support + + + + Allow Host GPU Labels (Experimental) + + + diff --git a/rpcs3/rpcs3qt/tooltips.h b/rpcs3/rpcs3qt/tooltips.h index cfe542b5eb..f011cb2d61 100644 --- a/rpcs3/rpcs3qt/tooltips.h +++ b/rpcs3/rpcs3qt/tooltips.h @@ -38,6 +38,7 @@ public: 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 a game in the 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 'Safe' mode for more spec compliant behavior at the cost of some CPU overhead. This setting works with all devices.\nUse 'Fast' to use a faster but hacky version. This option is internally disabled for NVIDIA GPUs due to causing GPU hangs."); + const QString allow_host_labels = tr("Allows the host GPU to synchronize with CELL directly. This incurs a performance penalty, but exposes the true state of GPU objects to the guest CPU. Can help eliminate visual noise and glitching at the cost of performance. Use with caution."); // audio