summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-05-30 01:10:58 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-05-30 01:10:58 +0200
commitdd70e097ccb84b64983456759525d650d1ceab0a (patch)
treee9c95eb5cba196ccc32c30fae769e4be7def0614 /src
parenttexture_cache: Handle overlaps with multiple subresources (diff)
downloadyuzu-dd70e097ccb84b64983456759525d650d1ceab0a.tar
yuzu-dd70e097ccb84b64983456759525d650d1ceab0a.tar.gz
yuzu-dd70e097ccb84b64983456759525d650d1ceab0a.tar.bz2
yuzu-dd70e097ccb84b64983456759525d650d1ceab0a.tar.lz
yuzu-dd70e097ccb84b64983456759525d650d1ceab0a.tar.xz
yuzu-dd70e097ccb84b64983456759525d650d1ceab0a.tar.zst
yuzu-dd70e097ccb84b64983456759525d650d1ceab0a.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/texture_cache/texture_cache.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 658264860..62206b906 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -660,6 +660,15 @@ private:
std::size_t passed_tests = 0;
bool modified = false;
+ u32 num_resources = 0;
+ for (auto& surface : overlaps) {
+ const SurfaceParams& src_params = surface->GetSurfaceParams();
+ num_resources += src_params.depth * src_params.num_levels;
+ }
+ if (num_resources != params.depth * params.num_levels) {
+ LoadSurface(new_surface);
+ }
+
for (auto& surface : overlaps) {
const SurfaceParams& src_params = surface->GetSurfaceParams();
const auto mipmap_layer{new_surface->GetLayerMipmap(surface->GetGpuAddr())};