summaryrefslogtreecommitdiff
path: root/src/video_core/buffer_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/buffer_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/buffer_cache')
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index 5b14d52e2..df4c0211e 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -145,6 +145,18 @@ public:
145 } 145 }
146 } 146 }
147 147
148 bool MustFlushRegion(VAddr addr, std::size_t size) {
149 std::lock_guard lock{mutex};
150
151 std::vector<MapInterval> objects = GetMapsInRange(addr, size);
152 for (auto& object : objects) {
153 if (object->IsModified() && object->IsRegistered()) {
154 return true;
155 }
156 }
157 return false;
158 }
159
148 /// Mark the specified region as being invalidated 160 /// Mark the specified region as being invalidated
149 void InvalidateRegion(VAddr addr, u64 size) { 161 void InvalidateRegion(VAddr addr, u64 size) {
150 std::lock_guard lock{mutex}; 162 std::lock_guard lock{mutex};