rsx: Disable HW remapper if BX2 is active or the user requests not to use it

This commit is contained in:
kd-11 2026-02-22 22:31:18 +03:00 committed by kd-11
parent bf5056145e
commit 0fb8091a31
4 changed files with 9 additions and 3 deletions

View file

@ -353,7 +353,9 @@ void GLGSRender::load_texture_env()
if (sampler_state->format_ex.texel_remap_control &&
sampler_state->image_handle &&
sampler_state->upload_context == rsx::texture_upload_context::shader_read) [[ unlikely ]]
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 ]]
{
// Check if we need to override the view format
const auto gl_format = sampler_state->image_handle->view_format();

View file

@ -345,7 +345,9 @@ void VKGSRender::load_texture_env()
if (sampler_state->format_ex.texel_remap_control &&
sampler_state->image_handle &&
sampler_state->upload_context == rsx::texture_upload_context::shader_read) [[ unlikely ]]
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 ]]
{
// Check if we need to override the view format
const auto vk_format = sampler_state->image_handle->format();

View file

@ -1153,7 +1153,8 @@ namespace vk
const bool upload_async = rsx::get_current_renderer()->get_backend_config().supports_asynchronous_compute;
rsx::flags32_t create_flags = 0;
if (context == rsx::texture_upload_context::shader_read)
if (context == rsx::texture_upload_context::shader_read &&
g_cfg.video.use_hardware_texel_remapping)
{
create_flags |= texture_create_flags::mutable_format;
}

View file

@ -176,6 +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_mode> 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 };
struct node_vk : cfg::node
{