From cee868560a8a8cb50da8c851c8e64be9e6078014 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sun, 22 Feb 2026 22:56:42 +0300 Subject: [PATCH] rsx: Add configuration toggle to debug tab --- rpcs3/Emu/RSX/GL/GLDraw.cpp | 2 +- rpcs3/Emu/RSX/VK/VKDraw.cpp | 2 +- rpcs3/Emu/RSX/VK/VKTextureCache.cpp | 2 +- rpcs3/Emu/system_config.h | 2 +- rpcs3/rpcs3qt/emu_settings_type.h | 2 ++ rpcs3/rpcs3qt/settings_dialog.cpp | 3 +++ rpcs3/rpcs3qt/settings_dialog.ui | 7 +++++++ rpcs3/rpcs3qt/tooltips.h | 1 + 8 files changed, 17 insertions(+), 4 deletions(-) diff --git a/rpcs3/Emu/RSX/GL/GLDraw.cpp b/rpcs3/Emu/RSX/GL/GLDraw.cpp index e7d1338868..bdf5a53d01 100644 --- a/rpcs3/Emu/RSX/GL/GLDraw.cpp +++ b/rpcs3/Emu/RSX/GL/GLDraw.cpp @@ -355,7 +355,7 @@ void GLGSRender::load_texture_env() sampler_state->image_handle && sampler_state->upload_context == rsx::texture_upload_context::shader_read && (current_fp_metadata.bx2_texture_reads_mask & (1u << i)) == 0 && - g_cfg.video.use_hardware_texel_remapping) [[ unlikely ]] + !g_cfg.video.disable_hardware_texel_remapping) [[ unlikely ]] { // Check if we need to override the view format const auto gl_format = sampler_state->image_handle->view_format(); diff --git a/rpcs3/Emu/RSX/VK/VKDraw.cpp b/rpcs3/Emu/RSX/VK/VKDraw.cpp index 8f14d7e8c7..344bde8b64 100644 --- a/rpcs3/Emu/RSX/VK/VKDraw.cpp +++ b/rpcs3/Emu/RSX/VK/VKDraw.cpp @@ -347,7 +347,7 @@ void VKGSRender::load_texture_env() sampler_state->image_handle && sampler_state->upload_context == rsx::texture_upload_context::shader_read && (current_fp_metadata.bx2_texture_reads_mask & (1u << i)) == 0 && - g_cfg.video.use_hardware_texel_remapping) [[ unlikely ]] + !g_cfg.video.disable_hardware_texel_remapping) [[ unlikely ]] { // Check if we need to override the view format const auto vk_format = sampler_state->image_handle->format(); diff --git a/rpcs3/Emu/RSX/VK/VKTextureCache.cpp b/rpcs3/Emu/RSX/VK/VKTextureCache.cpp index 0c3df5cd9c..c9d9599b9e 100644 --- a/rpcs3/Emu/RSX/VK/VKTextureCache.cpp +++ b/rpcs3/Emu/RSX/VK/VKTextureCache.cpp @@ -1154,7 +1154,7 @@ namespace vk rsx::flags32_t create_flags = 0; if (context == rsx::texture_upload_context::shader_read && - g_cfg.video.use_hardware_texel_remapping) + !g_cfg.video.disable_hardware_texel_remapping) { create_flags |= texture_create_flags::mutable_format; } diff --git a/rpcs3/Emu/system_config.h b/rpcs3/Emu/system_config.h index c9e763b5af..8ccf91db0e 100644 --- a/rpcs3/Emu/system_config.h +++ b/rpcs3/Emu/system_config.h @@ -176,7 +176,7 @@ struct cfg_root : cfg::node cfg::_bool disable_async_host_memory_manager{ this, "Disable Asynchronous Memory Manager", false, true }; cfg::_enum output_scaling{ this, "Output Scaling Mode", output_scaling_mode::bilinear, true }; cfg::_bool record_with_overlays{ this, "Record With Overlays", true, true }; - cfg::_bool use_hardware_texel_remapping{ this, "Use Hardware Texel Remapping", true, false }; + cfg::_bool disable_hardware_texel_remapping{ this, "Disable Hardware ColorSpace Remapping", false, true }; struct node_vk : cfg::node { diff --git a/rpcs3/rpcs3qt/emu_settings_type.h b/rpcs3/rpcs3qt/emu_settings_type.h index cc8ab57b96..6a5b6841b1 100644 --- a/rpcs3/rpcs3qt/emu_settings_type.h +++ b/rpcs3/rpcs3qt/emu_settings_type.h @@ -108,6 +108,7 @@ enum class emu_settings_type DisableAsyncHostMM, UseReBAR, RecordWithOverlays, + DisableHWTexelRemapping, // Performance Overlay PerfOverlayEnabled, @@ -312,6 +313,7 @@ inline static const std::map settings_location { emu_settings_type::ForceHwMSAAResolve, { "Video", "Force Hardware MSAA Resolve"}}, { emu_settings_type::DisableAsyncHostMM, { "Video", "Disable Asynchronous Memory Manager"}}, { emu_settings_type::RecordWithOverlays, { "Video", "Record With Overlays"}}, + { emu_settings_type::DisableHWTexelRemapping, { "Video", "Disable Hardware ColorSpace Remapping"}}, // 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 81e85546e9..0c0fb63efd 100644 --- a/rpcs3/rpcs3qt/settings_dialog.cpp +++ b/rpcs3/rpcs3qt/settings_dialog.cpp @@ -1555,6 +1555,9 @@ settings_dialog::settings_dialog(std::shared_ptr gui_settings, std m_emu_settings->EnhanceCheckBox(ui->enableSpuEventsBusyLoop, emu_settings_type::EnabledSPUEventsBusyLoop); SubscribeTooltip(ui->enableSpuEventsBusyLoop, tooltips.settings.enable_spu_events_busy_loop); + m_emu_settings->EnhanceCheckBox(ui->disableHardwareTexelRemapping, emu_settings_type::DisableHWTexelRemapping); + SubscribeTooltip(ui->disableHardwareTexelRemapping, tooltips.settings.disable_hw_texel_remapping); + // Comboboxes m_emu_settings->EnhanceComboBox(ui->maxSPURSThreads, emu_settings_type::MaxSPURSThreads, true); diff --git a/rpcs3/rpcs3qt/settings_dialog.ui b/rpcs3/rpcs3qt/settings_dialog.ui index 6a27f45be3..e394407e11 100644 --- a/rpcs3/rpcs3qt/settings_dialog.ui +++ b/rpcs3/rpcs3qt/settings_dialog.ui @@ -4316,6 +4316,13 @@ + + + + Disable Hardware ColorSpace Remapping + + + diff --git a/rpcs3/rpcs3qt/tooltips.h b/rpcs3/rpcs3qt/tooltips.h index abdc60f3dd..e9c8ad436b 100644 --- a/rpcs3/rpcs3qt/tooltips.h +++ b/rpcs3/rpcs3qt/tooltips.h @@ -127,6 +127,7 @@ public: const QString accurate_ppu_128_loop = tr("When enabled, PPU atomic operations will operate on entire cache line data, as opposed to a single 64bit block of memory when disabled.\nNumerical values control whether or not to enable the accurate version based on the atomic operation's length."); const QString enable_performance_report = tr("Measure certain events and print a chart after the emulator is stopped. Don't enable if not asked to."); const QString num_ppu_threads = tr("Affects maximum amount of PPU threads running concurrently, the value of 1 has very low compatibility with games.\n2 is the default, if unsure do not modify this setting."); + const QString disable_hw_texel_remapping = tr("Disables use of hardware-native color-space remapping formats such as _sRGB and _SNORM suffixes.\nDisabling this option increases accuracy compared to PS3 but can also introduce some noise due to how the software emulation works."); // emulator