diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-09-20 22:18:15 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-16 22:11:30 +0100 |
commit | ea82bd4b7e4c4f23a40f8a35858d8b74950fc347 (patch) | |
tree | d1ff5b2aae66e1f95d36bc9393086a5eb10015f1 /src/video_core/texture_cache/texture_cache.h | |
parent | TextureCache: Base fixes on rescaling. (diff) | |
download | yuzu-ea82bd4b7e4c4f23a40f8a35858d8b74950fc347.tar yuzu-ea82bd4b7e4c4f23a40f8a35858d8b74950fc347.tar.gz yuzu-ea82bd4b7e4c4f23a40f8a35858d8b74950fc347.tar.bz2 yuzu-ea82bd4b7e4c4f23a40f8a35858d8b74950fc347.tar.lz yuzu-ea82bd4b7e4c4f23a40f8a35858d8b74950fc347.tar.xz yuzu-ea82bd4b7e4c4f23a40f8a35858d8b74950fc347.tar.zst yuzu-ea82bd4b7e4c4f23a40f8a35858d8b74950fc347.zip |
Diffstat (limited to 'src/video_core/texture_cache/texture_cache.h')
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index a543776fd..b60f840c1 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -476,17 +476,26 @@ void TextureCache<P>::BlitImage(const Tegra::Engines::Fermi2D::Surface& dst, Image& dst_image = slot_images[dst_id]; Image& src_image = slot_images[src_id]; + bool is_resolve = src_image.info.num_samples != 1 && dst_image.info.num_samples == 1; + bool is_src_rescaled = True(src_image.flags & ImageFlagBits::Rescaled); bool is_dst_rescaled = True(dst_image.flags & ImageFlagBits::Rescaled); 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); + if (is_resolve) { + dst_image.info.rescaleable = true; + for (const auto& alias : dst_image.aliased_images) { + Image& other_image = slot_images[alias.id]; + other_image.info.rescaleable = true; + } + } + } + if (ImageCanRescale(dst_image)) { + ScaleUp(dst_image); + is_dst_rescaled = True(dst_image.flags & ImageFlagBits::Rescaled); } } |