summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2021-08-07 02:15:24 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-16 22:11:29 +0100
commit4b1393a691d1d8d79c57e7b73734cb8287b91760 (patch)
tree46c046c5c1b02378585596bf6ad9370cc81c60de
parentshader: Fix TextureSize check on rescaling. (diff)
downloadyuzu-4b1393a691d1d8d79c57e7b73734cb8287b91760.tar
yuzu-4b1393a691d1d8d79c57e7b73734cb8287b91760.tar.gz
yuzu-4b1393a691d1d8d79c57e7b73734cb8287b91760.tar.bz2
yuzu-4b1393a691d1d8d79c57e7b73734cb8287b91760.tar.lz
yuzu-4b1393a691d1d8d79c57e7b73734cb8287b91760.tar.xz
yuzu-4b1393a691d1d8d79c57e7b73734cb8287b91760.tar.zst
yuzu-4b1393a691d1d8d79c57e7b73734cb8287b91760.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/texture_cache/texture_cache.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index d86f80b5d..2de439889 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -473,18 +473,21 @@ void TextureCache<P>::BlitImage(const Tegra::Engines::Fermi2D::Surface& dst,
PrepareImage(dst_id, true, false);
Image& dst_image = slot_images[dst_id];
- const Image& src_image = slot_images[src_id];
+ Image& src_image = slot_images[src_id];
- const bool is_src_rescaled = True(src_image.flags & ImageFlagBits::Rescaled);
+ bool is_src_rescaled = True(src_image.flags & ImageFlagBits::Rescaled);
bool is_dst_rescaled = True(dst_image.flags & ImageFlagBits::Rescaled);
- // TODO: This requires the rendertarget image views to be updated with the upscaled sizes,
- // otherwise the blit will use a larger framebuffer size than the image view attachment.
- // if (is_src_rescaled && !is_dst_rescaled) {
- // if (ImageCanRescale(dst_image)) {
- // is_dst_rescaled = dst_image.ScaleUp();
- // }
- // }
+ if (is_src_rescaled != is_dst_rescaled) {
+ if (ImageCanRescale(dst_image)) {
+ ScaleUp(dst_image);
+ is_dst_rescaled = True(dst_image.flags & ImageFlagBits::Rescaled);
+ }
+ if (ImageCanRescale(src_image)) {
+ ScaleUp(src_image);
+ is_src_rescaled = True(src_image.flags & ImageFlagBits::Rescaled);
+ }
+ }
const auto& resolution = Settings::values.resolution_info;
const auto scale_up = [&](u32 value) -> u32 {