diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-05-07 19:58:37 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-06-21 02:36:12 +0200 |
commit | b711cdce782ee604edc3c52628eb76e6b9a08b72 (patch) | |
tree | 0bbe1ee88b50d2ed5aa9886bf23c3c326015b11e /src/video_core/texture_cache/texture_cache.h | |
parent | Implement Texture Cache V2 (diff) | |
download | yuzu-b711cdce782ee604edc3c52628eb76e6b9a08b72.tar yuzu-b711cdce782ee604edc3c52628eb76e6b9a08b72.tar.gz yuzu-b711cdce782ee604edc3c52628eb76e6b9a08b72.tar.bz2 yuzu-b711cdce782ee604edc3c52628eb76e6b9a08b72.tar.lz yuzu-b711cdce782ee604edc3c52628eb76e6b9a08b72.tar.xz yuzu-b711cdce782ee604edc3c52628eb76e6b9a08b72.tar.zst yuzu-b711cdce782ee604edc3c52628eb76e6b9a08b72.zip |
Diffstat (limited to 'src/video_core/texture_cache/texture_cache.h')
-rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index eb0d9bc10..f3b28453a 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h @@ -284,7 +284,7 @@ private: const SurfaceParams& params) { const auto gpu_addr = current_surface->GetGpuAddr(); TSurface new_surface = GetUncachedSurface(gpu_addr, params); - std::vector<CopyParams> bricks = current_surface->BreakDown(); + std::vector<CopyParams> bricks = current_surface->BreakDown(params); for (auto& brick : bricks) { ImageCopy(current_surface, new_surface, brick); } @@ -370,11 +370,16 @@ private: if (overlaps.size() == 1) { TSurface current_surface = overlaps[0]; - if (current_surface->MatchesStructure(params) && + MatchStructureResult s_result = current_surface->MatchesStructure(params); + if (s_result != MatchStructureResult::None && current_surface->GetGpuAddr() == gpu_addr && (params.target != SurfaceTarget::Texture3D || current_surface->MatchTarget(params.target))) { - return ManageStructuralMatch(current_surface, params); + if (s_result == MatchStructureResult::FullMatch) { + return ManageStructuralMatch(current_surface, params); + } else { + return RebuildMirage(current_surface, params); + } } if (current_surface->GetSizeInBytes() <= candidate_size) { return RecycleSurface(overlaps, params, gpu_addr, host_ptr, preserve_contents, |