summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-05-29 20:12:46 -0300
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-05-29 20:12:46 -0300
commite454f7e7a7d75fe0415ce48ffbd5d5979d79ce67 (patch)
treebf2fbe112de94bd3e88faa975b2bf532c74a747e
parentdd70e097ccb84b64983456759525d650d1ceab0a (diff)
texture_cache: Only copy textures that were modified from host
-rw-r--r--src/video_core/texture_cache/texture_cache.h8
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;