diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-05-30 01:12:46 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-05-30 01:12:46 +0200 |
commit | e454f7e7a7d75fe0415ce48ffbd5d5979d79ce67 (patch) | |
tree | bf2fbe112de94bd3e88faa975b2bf532c74a747e | |
parent | texture_cache: Reload textures when number of resources mismatch (diff) | |
download | yuzu-e454f7e7a7d75fe0415ce48ffbd5d5979d79ce67.tar yuzu-e454f7e7a7d75fe0415ce48ffbd5d5979d79ce67.tar.gz yuzu-e454f7e7a7d75fe0415ce48ffbd5d5979d79ce67.tar.bz2 yuzu-e454f7e7a7d75fe0415ce48ffbd5d5979d79ce67.tar.lz yuzu-e454f7e7a7d75fe0415ce48ffbd5d5979d79ce67.tar.xz yuzu-e454f7e7a7d75fe0415ce48ffbd5d5979d79ce67.tar.zst yuzu-e454f7e7a7d75fe0415ce48ffbd5d5979d79ce67.zip |
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 62206b906..3e024a098 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -679,6 +679,12 @@ private: if (new_surface->GetMipmapSize(base_mipmap) != surface->GetMipmapSize(0)) { continue; } + ++passed_tests; + + if (!surface->IsModified()) { + continue; + } + modified = true; // Copy all mipmaps and layers const u32 block_width = params.GetDefaultBlockWidth(); @@ -694,8 +700,6 @@ private: src_params.depth); ImageCopy(surface, new_surface, copy_params); } - ++passed_tests; - modified |= surface->IsModified(); } if (passed_tests == 0) { return std::nullopt; |