mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-11-02 05:17:52 +00:00
texture_cache: Only copy textures that were modified from host
This commit is contained in:
parent
dd70e097cc
commit
e454f7e7a7
1 changed files with 6 additions and 2 deletions
|
@ -679,6 +679,12 @@ private:
|
||||||
if (new_surface->GetMipmapSize(base_mipmap) != surface->GetMipmapSize(0)) {
|
if (new_surface->GetMipmapSize(base_mipmap) != surface->GetMipmapSize(0)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
++passed_tests;
|
||||||
|
|
||||||
|
if (!surface->IsModified()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
modified = true;
|
||||||
|
|
||||||
// Copy all mipmaps and layers
|
// Copy all mipmaps and layers
|
||||||
const u32 block_width = params.GetDefaultBlockWidth();
|
const u32 block_width = params.GetDefaultBlockWidth();
|
||||||
|
@ -694,8 +700,6 @@ private:
|
||||||
src_params.depth);
|
src_params.depth);
|
||||||
ImageCopy(surface, new_surface, copy_params);
|
ImageCopy(surface, new_surface, copy_params);
|
||||||
}
|
}
|
||||||
++passed_tests;
|
|
||||||
modified |= surface->IsModified();
|
|
||||||
}
|
}
|
||||||
if (passed_tests == 0) {
|
if (passed_tests == 0) {
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
|
Loading…
Reference in a new issue