diff options
| author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-04-15 00:03:48 +0200 |
|---|---|---|
| committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2023-04-23 04:48:50 +0200 |
| commit | fca72beb2db658e84ceac6e1f46f682bcacf8f25 (patch) | |
| tree | b2139045203240661f924a1cbaec017ca666d16a /src/video_core/query_cache.h | |
| parent | d60018358366304db271c76d64ee753f7dde14b4 (diff) | |
Fence Manager: implement async fence management in a sepparate thread.
Diffstat (limited to 'src/video_core/query_cache.h')
| -rw-r--r-- | src/video_core/query_cache.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/video_core/query_cache.h b/src/video_core/query_cache.h index 8906ba6d8..cd339b99d 100644 --- a/src/video_core/query_cache.h +++ b/src/video_core/query_cache.h @@ -173,15 +173,18 @@ public: } void CommitAsyncFlushes() { + std::unique_lock lock{mutex}; committed_flushes.push_back(uncommitted_flushes); uncommitted_flushes.reset(); } bool HasUncommittedFlushes() const { + std::unique_lock lock{mutex}; return uncommitted_flushes != nullptr; } bool ShouldWaitAsyncFlushes() const { + std::unique_lock lock{mutex}; if (committed_flushes.empty()) { return false; } @@ -189,6 +192,7 @@ public: } void PopAsyncFlushes() { + std::unique_lock lock{mutex}; if (committed_flushes.empty()) { return; } @@ -265,7 +269,7 @@ private: VideoCore::RasterizerInterface& rasterizer; - std::recursive_mutex mutex; + mutable std::recursive_mutex mutex; std::unordered_map<u64, std::vector<CachedQuery>> cached_queries; |
