diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-01-06 19:47:15 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-10-06 21:00:52 +0200 |
commit | e44ac8b821833672f7c99ad22dbe57ac9403279d (patch) | |
tree | 9457817c1a58c02e21800e44a7c193de04b76c61 | |
parent | Texture cache: Fix the remaining issues with memory mnagement and unmapping. (diff) | |
download | yuzu-e44ac8b821833672f7c99ad22dbe57ac9403279d.tar yuzu-e44ac8b821833672f7c99ad22dbe57ac9403279d.tar.gz yuzu-e44ac8b821833672f7c99ad22dbe57ac9403279d.tar.bz2 yuzu-e44ac8b821833672f7c99ad22dbe57ac9403279d.tar.lz yuzu-e44ac8b821833672f7c99ad22dbe57ac9403279d.tar.xz yuzu-e44ac8b821833672f7c99ad22dbe57ac9403279d.tar.zst yuzu-e44ac8b821833672f7c99ad22dbe57ac9403279d.zip |
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index a483892e4..66de41f04 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -1758,6 +1758,7 @@ void TextureCache<P>::SynchronizeAliases(ImageId image_id) { boost::container::small_vector<const AliasedImage*, 1> aliased_images; Image& image = slot_images[image_id]; bool any_rescaled = True(image.flags & ImageFlagBits::Rescaled); + bool any_modified = True(image.flags & ImageFlagBits::GpuModified); u64 most_recent_tick = image.modification_tick; for (const AliasedImage& aliased : image.aliased_images) { ImageBase& aliased_image = slot_images[aliased.id]; @@ -1765,9 +1766,7 @@ void TextureCache<P>::SynchronizeAliases(ImageId image_id) { most_recent_tick = std::max(most_recent_tick, aliased_image.modification_tick); aliased_images.push_back(&aliased); any_rescaled |= True(aliased_image.flags & ImageFlagBits::Rescaled); - if (True(aliased_image.flags & ImageFlagBits::GpuModified)) { - image.flags |= ImageFlagBits::GpuModified; - } + any_modified |= True(aliased_image.flags & ImageFlagBits::GpuModified); } } if (aliased_images.empty()) { @@ -1782,6 +1781,9 @@ void TextureCache<P>::SynchronizeAliases(ImageId image_id) { } } image.modification_tick = most_recent_tick; + if (any_modified) { + image.flags |= ImageFlagBits::GpuModified; + } std::ranges::sort(aliased_images, [this](const AliasedImage* lhs, const AliasedImage* rhs) { const ImageBase& lhs_image = slot_images[lhs->id]; const ImageBase& rhs_image = slot_images[rhs->id]; |