From 8b0e1d6c03bb8ff51b658f8b84a47914f717485c Mon Sep 17 00:00:00 2001 From: kd-11 Date: Tue, 27 Apr 2021 23:13:43 +0300 Subject: [PATCH] rsx: Make renderdoc compatibility mode a general option --- rpcs3/Emu/RSX/GL/GLGSRender.cpp | 4 ++-- rpcs3/Emu/system_config.h | 2 +- rpcs3/rpcs3qt/emu_settings_type.h | 4 ++-- rpcs3/rpcs3qt/settings_dialog.cpp | 7 ++----- rpcs3/rpcs3qt/settings_dialog.ui | 8 ++++---- rpcs3/rpcs3qt/tooltips.h | 2 +- 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/rpcs3/Emu/RSX/GL/GLGSRender.cpp b/rpcs3/Emu/RSX/GL/GLGSRender.cpp index 647e1dacf5..abd04659d7 100644 --- a/rpcs3/Emu/RSX/GL/GLGSRender.cpp +++ b/rpcs3/Emu/RSX/GL/GLGSRender.cpp @@ -197,10 +197,10 @@ void GLGSRender::on_init_thread() { rsx_log.warning("Forcing use of legacy OpenGL buffers because ARB_buffer_storage is not supported"); // TODO: do not modify config options - g_cfg.video.gl_legacy_buffers.from_string("true"); + g_cfg.video.renderdoc_compatiblity.from_string("true"); } - if (g_cfg.video.gl_legacy_buffers) + if (g_cfg.video.renderdoc_compatiblity) { rsx_log.warning("Using legacy openGL buffers."); manually_flush_ring_buffers = true; diff --git a/rpcs3/Emu/system_config.h b/rpcs3/Emu/system_config.h index 949d2949ac..f06d63488b 100644 --- a/rpcs3/Emu/system_config.h +++ b/rpcs3/Emu/system_config.h @@ -136,7 +136,7 @@ struct cfg_root : cfg::node cfg::_bool vsync{ this, "VSync" }; cfg::_bool debug_output{ this, "Debug output" }; cfg::_bool overlay{ this, "Debug overlay", false, true }; - cfg::_bool gl_legacy_buffers{ this, "Use Legacy OpenGL Buffers" }; + cfg::_bool renderdoc_compatiblity{ this, "Renderdoc Compatibility Mode" }; cfg::_bool use_gpu_texture_scaling{ this, "Use GPU texture scaling", false }; cfg::_bool stretch_to_display_area{ this, "Stretch To Display Area", false, true }; cfg::_bool force_high_precision_z_buffer{ this, "Force High Precision Z buffer" }; diff --git a/rpcs3/rpcs3qt/emu_settings_type.h b/rpcs3/rpcs3qt/emu_settings_type.h index 1588da449a..56f8e4f7aa 100644 --- a/rpcs3/rpcs3qt/emu_settings_type.h +++ b/rpcs3/rpcs3qt/emu_settings_type.h @@ -54,7 +54,7 @@ enum class emu_settings_type VSync, DebugOutput, DebugOverlay, - LegacyBuffers, + RenderdocCompatibility, GPUTextureScaling, StretchToDisplayArea, VulkanAdapter, @@ -208,7 +208,7 @@ inline static const QMap settings_location = { emu_settings_type::VSync, { "Video", "VSync"}}, { emu_settings_type::DebugOutput, { "Video", "Debug output"}}, { emu_settings_type::DebugOverlay, { "Video", "Debug overlay"}}, - { emu_settings_type::LegacyBuffers, { "Video", "Use Legacy OpenGL Buffers"}}, + { emu_settings_type::RenderdocCompatibility, { "Video", "Renderdoc Compatibility Mode"}}, { emu_settings_type::GPUTextureScaling, { "Video", "Use GPU texture scaling"}}, { emu_settings_type::StretchToDisplayArea, { "Video", "Stretch To Display Area"}}, { emu_settings_type::ForceHighpZ, { "Video", "Force High Precision Z buffer"}}, diff --git a/rpcs3/rpcs3qt/settings_dialog.cpp b/rpcs3/rpcs3qt/settings_dialog.cpp index 1b708bcea6..af30836e89 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -660,9 +660,6 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std 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); @@ -1741,8 +1738,8 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std // |___/ // Checkboxes: gpu debug options - m_emu_settings->EnhanceCheckBox(ui->glLegacyBuffers, emu_settings_type::LegacyBuffers); - SubscribeTooltip(ui->glLegacyBuffers, tooltips.settings.gl_legacy_buffers); + m_emu_settings->EnhanceCheckBox(ui->renderdocCompatibility, emu_settings_type::RenderdocCompatibility); + SubscribeTooltip(ui->renderdocCompatibility, tooltips.settings.renderdoc_compatibility); m_emu_settings->EnhanceCheckBox(ui->forceHighpZ, emu_settings_type::ForceHighpZ); SubscribeTooltip(ui->forceHighpZ, tooltips.settings.force_high_pz); diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index a7eeb7c233..0326a6aa9f 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -39,7 +39,7 @@ - 0 + 9 @@ -3471,12 +3471,12 @@ - + - false + true - Use Legacy OpenGL Buffers + Renderdoc Compatibility Mode diff --git a/rpcs3/rpcs3qt/tooltips.h b/rpcs3/rpcs3qt/tooltips.h index c5fdb37e79..1a6fb5a254 100644 --- a/rpcs3/rpcs3qt/tooltips.h +++ b/rpcs3/rpcs3qt/tooltips.h @@ -86,7 +86,7 @@ public: const QString accurate_vector_nan = tr("Forces the floating point NaN (Not A Number) values outputted from PPU vector instructions to be accurate to the real hardware. (0x7FC00000)"); const QString accurate_rsx_access = tr("Forces RSX pauses on SPU MFC_GETLLAR and SPU MFC_PUTLLUC operations."); const QString hook_static_functions = tr("Allows to hook some functions like 'memcpy' replacing them with high-level implementations. May do nothing or break things. Experimental."); - const QString gl_legacy_buffers = tr("Enables use of classic OpenGL buffers which allows capturing tools to work with RPCS3 e.g RenderDoc.\nIf unsure, don't use this option."); + const QString renderdoc_compatibility = tr("Enables use of classic OpenGL buffers which allows capturing tools to work with RPCS3 e.g RenderDoc.\nAlso allows vulkan to use debug markers for nicer Renderdoc captures.\nIf unsure, don't use this option."); const QString force_high_pz = tr("Only useful when debugging differences in GPU hardware.\nNot necessary for average users.\nIf unsure, don't use this option."); const QString debug_output = tr("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."); const QString debug_overlay = tr("Provides a graphical overlay of various debugging information.\nIf unsure, don't use this option.");