diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-10-12 07:45:54 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-16 22:11:31 +0100 |
commit | 4de584005fe8ae00608f8c3267a78e7cf0eb52aa (patch) | |
tree | adbbf400f85034b0661513f27f56e110685c2950 /src/video_core/texture_cache/texture_cache.h | |
parent | vk_texture_cache: Fix BlitScale of non-2D images (diff) | |
download | yuzu-4de584005fe8ae00608f8c3267a78e7cf0eb52aa.tar yuzu-4de584005fe8ae00608f8c3267a78e7cf0eb52aa.tar.gz yuzu-4de584005fe8ae00608f8c3267a78e7cf0eb52aa.tar.bz2 yuzu-4de584005fe8ae00608f8c3267a78e7cf0eb52aa.tar.lz yuzu-4de584005fe8ae00608f8c3267a78e7cf0eb52aa.tar.xz yuzu-4de584005fe8ae00608f8c3267a78e7cf0eb52aa.tar.zst yuzu-4de584005fe8ae00608f8c3267a78e7cf0eb52aa.zip |
Diffstat (limited to 'src/video_core/texture_cache/texture_cache.h')
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index c77332b46..c1fb12679 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -795,25 +795,25 @@ bool TextureCache<P>::BlackListImage(ImageId image_id) { template <class P> bool TextureCache<P>::ImageCanRescale(ImageBase& image) { - if (True(image.flags & ImageFlagBits::Blacklisted)) { + if (!image.info.rescaleable || True(image.flags & ImageFlagBits::Blacklisted)) { return false; } - if (True(image.flags & (ImageFlagBits::Rescaled | ImageFlagBits::RescaleChecked))) { + if (True(image.flags & (ImageFlagBits::Rescaled | ImageFlagBits::CheckingRescalable))) { return true; } - if (!image.info.rescaleable) { - image.flags &= ~ImageFlagBits::RescaleChecked; - return false; + if (True(image.flags & ImageFlagBits::IsRescalable)) { + return true; } - image.flags |= ImageFlagBits::RescaleChecked; + image.flags |= ImageFlagBits::CheckingRescalable; for (const auto& alias : image.aliased_images) { Image& other_image = slot_images[alias.id]; if (!ImageCanRescale(other_image)) { - image.flags &= ~ImageFlagBits::RescaleChecked; + image.flags &= ~ImageFlagBits::CheckingRescalable; return false; } } - image.flags &= ~ImageFlagBits::RescaleChecked; + image.flags &= ~ImageFlagBits::CheckingRescalable; + image.flags |= ImageFlagBits::IsRescalable; return true; } |