diff options
Diffstat (limited to 'src/video_core/gpu.h')
| -rw-r--r-- | src/video_core/gpu.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index fa9991c87..943a5b110 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h | |||
| @@ -159,6 +159,14 @@ public: | |||
| 159 | void SyncGuestHost(); | 159 | void SyncGuestHost(); |
| 160 | virtual void OnCommandListEnd(); | 160 | virtual void OnCommandListEnd(); |
| 161 | 161 | ||
| 162 | u64 RequestFlush(CacheAddr addr, std::size_t size); | ||
| 163 | |||
| 164 | u64 CurrentFlushRequestFence() const { | ||
| 165 | return current_flush_fence.load(std::memory_order_relaxed); | ||
| 166 | } | ||
| 167 | |||
| 168 | void TickWork(); | ||
| 169 | |||
| 162 | /// Returns a reference to the Maxwell3D GPU engine. | 170 | /// Returns a reference to the Maxwell3D GPU engine. |
| 163 | Engines::Maxwell3D& Maxwell3D(); | 171 | Engines::Maxwell3D& Maxwell3D(); |
| 164 | 172 | ||
| @@ -327,6 +335,19 @@ private: | |||
| 327 | 335 | ||
| 328 | std::condition_variable sync_cv; | 336 | std::condition_variable sync_cv; |
| 329 | 337 | ||
| 338 | struct FlushRequest { | ||
| 339 | FlushRequest(u64 fence, CacheAddr addr, std::size_t size) | ||
| 340 | : fence{fence}, addr{addr}, size{size} {} | ||
| 341 | u64 fence; | ||
| 342 | CacheAddr addr; | ||
| 343 | std::size_t size; | ||
| 344 | }; | ||
| 345 | |||
| 346 | std::list<FlushRequest> flush_requests; | ||
| 347 | std::atomic<u64> current_flush_fence{}; | ||
| 348 | u64 last_flush_fence{}; | ||
| 349 | std::mutex flush_request_mutex; | ||
| 350 | |||
| 330 | const bool is_async; | 351 | const bool is_async; |
| 331 | }; | 352 | }; |
| 332 | 353 | ||