From 633e53674c98038057284897ae7eca7d019b11fb Mon Sep 17 00:00:00 2001 From: kd-11 Date: Thu, 9 Jul 2026 22:50:40 +0300 Subject: [PATCH] rsx: Allow blit engine to preserve resolution scaling - Since we're using the surface cache for storage, might as well enable resolution scaling on blit resources. --- rpcs3/Emu/RSX/Common/surface_store.h | 3 ++- rpcs3/Emu/RSX/Common/texture_cache.h | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/RSX/Common/surface_store.h b/rpcs3/Emu/RSX/Common/surface_store.h index dd6120721d..3cbda8991e 100644 --- a/rpcs3/Emu/RSX/Common/surface_store.h +++ b/rpcs3/Emu/RSX/Common/surface_store.h @@ -1073,6 +1073,7 @@ namespace rsx surface_type create_surface_from_rsx_section( command_list_type command_list, const rsx::image_section_attributes_t& attributes, + const rsx::surface_scaling_config_t& scaling_config, Args&&... extra_params) { cache_tag = rsx::get_shared_tag(); @@ -1087,7 +1088,7 @@ namespace rsx attributes.width, attributes.height, attributes.pitch, - {}, + scaling_config, std::forward(extra_params)...); } diff --git a/rpcs3/Emu/RSX/Common/texture_cache.h b/rpcs3/Emu/RSX/Common/texture_cache.h index 457baf3362..5610f44eea 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache.h +++ b/rpcs3/Emu/RSX/Common/texture_cache.h @@ -1538,7 +1538,7 @@ namespace rsx dst_area.y2 += dst_offset.y; // We have to create the surface in the surface cache - rsx::image_section_attributes_t section_attr + const rsx::image_section_attributes_t section_attr { .address = rsx_range.start, .gcm_format = preferred_dst_format, @@ -1553,9 +1553,16 @@ namespace rsx .edge_clamped = false }; + const surface_scaling_config_t scaling_config = + { + .scale_percent = static_cast(g_cfg.video.resolution_scale_percent), + .min_scalable_dimension = static_cast(g_cfg.video.min_scalable_dimension), + }; + auto dst_surface = m_rtts.create_surface_from_rsx_section( cmd, section_attr, + scaling_config, std::forward(extras)...); ensure(dst_surface, "Failed to create target surface");