summaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-02-17 22:29:04 -0400
committerGravatar Fernando Sahmkow2020-04-22 11:36:12 -0400
commit165ae823f522aa981129927f42e76763a9fa6006 (patch)
tree5b20ac78e3946e50aa37f76a1446a42654bf3511 /src/video_core/texture_cache
parentFenceManager: Implement should wait. (diff)
downloadyuzu-165ae823f522aa981129927f42e76763a9fa6006.tar.gz
yuzu-165ae823f522aa981129927f42e76763a9fa6006.tar.xz
yuzu-165ae823f522aa981129927f42e76763a9fa6006.zip
ThreadManager: Sync async reads on accurate gpu.
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:
116 } 116 }
117 } 117 }
118 118
119 bool MustFlushRegion(VAddr addr, std::size_t size) {
120 std::lock_guard lock{mutex};
121
122 auto surfaces = GetSurfacesInRegion(addr, size);
123 if (surfaces.empty()) {
124 return false;
125 }
126 for (const auto& surface : surfaces) {
127 if (surface->IsModified()) {
128 return true;
129 }
130 }
131 return false;
132 }
133
119 TView GetTextureSurface(const Tegra::Texture::TICEntry& tic, 134 TView GetTextureSurface(const Tegra::Texture::TICEntry& tic,
120 const VideoCommon::Shader::Sampler& entry) { 135 const VideoCommon::Shader::Sampler& entry) {
121 std::lock_guard lock{mutex}; 136 std::lock_guard lock{mutex};