diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-20 16:55:32 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-04-22 17:36:17 +0200 |
commit | 1fb516cd979ed0dbf8fa7cb4f6a334932dfb6434 (patch) | |
tree | 123d3f3e906e1af35c4bbced2d9029bc93fb4653 /src/video_core/gpu.h | |
parent | FenceManager: Manage syncpoints and rename fences to semaphores. (diff) | |
download | yuzu-1fb516cd979ed0dbf8fa7cb4f6a334932dfb6434.tar yuzu-1fb516cd979ed0dbf8fa7cb4f6a334932dfb6434.tar.gz yuzu-1fb516cd979ed0dbf8fa7cb4f6a334932dfb6434.tar.bz2 yuzu-1fb516cd979ed0dbf8fa7cb4f6a334932dfb6434.tar.lz yuzu-1fb516cd979ed0dbf8fa7cb4f6a334932dfb6434.tar.xz yuzu-1fb516cd979ed0dbf8fa7cb4f6a334932dfb6434.tar.zst yuzu-1fb516cd979ed0dbf8fa7cb4f6a334932dfb6434.zip |
Diffstat (limited to '')
-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: void SyncGuestHost(); virtual void OnCommandListEnd(); + u64 RequestFlush(CacheAddr addr, std::size_t size); + + u64 CurrentFlushRequestFence() const { + return current_flush_fence.load(std::memory_order_relaxed); + } + + void TickWork(); + /// Returns a reference to the Maxwell3D GPU engine. Engines::Maxwell3D& Maxwell3D(); @@ -327,6 +335,19 @@ private: std::condition_variable sync_cv; + struct FlushRequest { + FlushRequest(u64 fence, CacheAddr addr, std::size_t size) + : fence{fence}, addr{addr}, size{size} {} + u64 fence; + CacheAddr addr; + std::size_t size; + }; + + std::list<FlushRequest> flush_requests; + std::atomic<u64> current_flush_fence{}; + u64 last_flush_fence{}; + std::mutex flush_request_mutex; + const bool is_async; }; |