summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-18 03:29:04 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-04-22 17:36:12 +0200
commit165ae823f522aa981129927f42e76763a9fa6006 (patch)
tree5b20ac78e3946e50aa37f76a1446a42654bf3511 /src/video_core/texture_cache
parentFenceManager: Implement should wait. (diff)
downloadyuzu-165ae823f522aa981129927f42e76763a9fa6006.tar
yuzu-165ae823f522aa981129927f42e76763a9fa6006.tar.gz
yuzu-165ae823f522aa981129927f42e76763a9fa6006.tar.bz2
yuzu-165ae823f522aa981129927f42e76763a9fa6006.tar.lz
yuzu-165ae823f522aa981129927f42e76763a9fa6006.tar.xz
yuzu-165ae823f522aa981129927f42e76763a9fa6006.tar.zst
yuzu-165ae823f522aa981129927f42e76763a9fa6006.zip
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r--src/video_core/texture_cache/texture_cache.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 04fe69c11..e251a30c3 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -116,6 +116,21 @@ public:
}
}
+ bool MustFlushRegion(VAddr addr, std::size_t size) {
+ std::lock_guard lock{mutex};
+
+ auto surfaces = GetSurfacesInRegion(addr, size);
+ if (surfaces.empty()) {
+ return false;
+ }
+ for (const auto& surface : surfaces) {
+ if (surface->IsModified()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
TView GetTextureSurface(const Tegra::Texture::TICEntry& tic,
const VideoCommon::Shader::Sampler& entry) {
std::lock_guard lock{mutex};