texture_cache: Only update is_rescaling when resolution is not 1x

This commit is contained in:
ameerj
2022-04-02 02:25:32 -04:00
parent 550844e5e8
commit c6ef248170
+4 -7
View File
@@ -328,7 +328,8 @@ void TextureCache<P>::UpdateRenderTargets(bool is_clear) {
}
const bool rescaled = RescaleRenderTargets(is_clear);
if (is_rescaling != rescaled) {
const auto& resolution_info = Settings::values.resolution_info;
if (resolution_info.active && is_rescaling != rescaled) {
flags[Dirty::RescaleViewports] = true;
flags[Dirty::RescaleScissors] = true;
is_rescaling = rescaled;
@@ -345,12 +346,8 @@ void TextureCache<P>::UpdateRenderTargets(bool is_clear) {
for (size_t index = 0; index < NUM_RT; ++index) {
render_targets.draw_buffers[index] = static_cast<u8>(maxwell3d.regs.rt_control.Map(index));
}
u32 up_scale = 1;
u32 down_shift = 0;
if (is_rescaling) {
up_scale = Settings::values.resolution_info.up_scale;
down_shift = Settings::values.resolution_info.down_shift;
}
const u32 up_scale = is_rescaling ? resolution_info.up_scale : 1U;
const u32 down_shift = is_rescaling ? resolution_info.down_shift : 0U;
render_targets.size = Extent2D{
(maxwell3d.regs.render_area.width * up_scale) >> down_shift,
(maxwell3d.regs.render_area.height * up_scale) >> down_shift,