summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2019-06-13 22:41:16 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2019-06-21 02:38:34 +0200
commit7232a1ed16e46715c29d781fb143bdf799090bec (patch)
treeb3be910260ee9c0e3eb67fa007f81c9296a60d72 /src/video_core/texture_cache
parenttexture_cache: Use siblings textures on Rebuild and fix possible error on blitting (diff)
downloadyuzu-7232a1ed16e46715c29d781fb143bdf799090bec.tar
yuzu-7232a1ed16e46715c29d781fb143bdf799090bec.tar.gz
yuzu-7232a1ed16e46715c29d781fb143bdf799090bec.tar.bz2
yuzu-7232a1ed16e46715c29d781fb143bdf799090bec.tar.lz
yuzu-7232a1ed16e46715c29d781fb143bdf799090bec.tar.xz
yuzu-7232a1ed16e46715c29d781fb143bdf799090bec.tar.zst
yuzu-7232a1ed16e46715c29d781fb143bdf799090bec.zip
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r--src/video_core/texture_cache/texture_cache.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 201c4d42e..7a9b4c27d 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -335,6 +335,9 @@ private:
if (untopological == MatchTopologyResult::CompressUnmatch) {
return RecycleStrategy::Flush;
}
+ if (untopological == MatchTopologyResult::FullMatch && !params.is_tiled) {
+ return RecycleStrategy::Flush;
+ }
return RecycleStrategy::Ignore;
}
@@ -372,6 +375,11 @@ private:
}
return InitializeSurface(gpu_addr, params, preserve_contents);
}
+ case RecycleStrategy::BufferCopy: {
+ auto new_surface = GetUncachedSurface(gpu_addr, params);
+ BufferCopy(overlaps[0], new_surface);
+ return {new_surface, new_surface->GetMainView()};
+ }
default: {
UNIMPLEMENTED_MSG("Unimplemented Texture Cache Recycling Strategy!");
return InitializeSurface(gpu_addr, params, do_load);
@@ -520,6 +528,10 @@ private:
const auto host_ptr{memory_manager->GetPointer(gpu_addr)};
const auto cache_addr{ToCacheAddr(host_ptr)};
+ if (gpu_addr == 0x00000001682F0000ULL) {
+ LOG_CRITICAL(HW_GPU, "Here's the texture!");
+ }
+
// Step 0: guarantee a valid surface
if (!cache_addr) {
// Return a null surface if it's invalid
@@ -566,6 +578,10 @@ private:
return InitializeSurface(gpu_addr, params, preserve_contents);
}
+ if (!params.is_tiled) {
+ return RecycleSurface(overlaps, params, gpu_addr, preserve_contents,
+ MatchTopologyResult::FullMatch);
+ }
// Step 3
// Now we need to figure the relationship between the texture and its overlaps
// we do a topological test to ensure we can find some relationship. If it fails