diff options
| author | 2020-02-17 22:29:04 -0400 | |
|---|---|---|
| committer | 2020-04-22 11:36:12 -0400 | |
| commit | 165ae823f522aa981129927f42e76763a9fa6006 (patch) | |
| tree | 5b20ac78e3946e50aa37f76a1446a42654bf3511 /src/video_core/buffer_cache | |
| parent | FenceManager: Implement should wait. (diff) | |
| download | yuzu-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.h | 12 |
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}; |