diff options
| author | Djihads <76681596+Djihads80@users.noreply.github.com> | 2026-10-30 11:33:03 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-10-30 11:33:03 +0100 |
| commit | 9560dec549134cf50a7bcde3f86f87ed7658b25f (patch) | |
| tree | 75493cfac29ed9d1dc350658e17c366f7e10a3c4 /src/video_core/query_cache | |
| parent | 666d2447639594c7cd2b184acf2117b38766ac22 (diff) | |
| parent | 937bb4dd30401a339a062386c121b9714e33e38d (diff) | |
Merge pull request #26 from Djihads80/nx2-experimental
Nx2 experimental
Diffstat (limited to 'src/video_core/query_cache')
| -rw-r--r-- | src/video_core/query_cache/query_cache.h | 10 | ||||
| -rw-r--r-- | src/video_core/query_cache/query_cache_base.h | 3 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/video_core/query_cache/query_cache.h b/src/video_core/query_cache/query_cache.h index 245ab1996c..60ca50eb1f 100644 --- a/src/video_core/query_cache/query_cache.h +++ b/src/video_core/query_cache/query_cache.h @@ -520,6 +520,16 @@ bool QueryCacheBase<Traits>::HasUncommittedFlushes() const { } template <typename Traits> +bool QueryCacheBase<Traits>::HasPendingFenceWork() const { + bool result = false; + impl->ForEachStreamer([&result](StreamerInterface* streamer) { + result |= streamer->HasUnsyncedQueries() || streamer->HasPendingSync(); + return result; + }); + return result; +} + +template <typename Traits> bool QueryCacheBase<Traits>::ShouldWaitAsyncFlushes() { std::scoped_lock lk(impl->flush_guard); return !impl->flushes_pending.empty() && impl->flushes_pending.front() != 0ULL; diff --git a/src/video_core/query_cache/query_cache_base.h b/src/video_core/query_cache/query_cache_base.h index d73e9039f7..5a60e42986 100644 --- a/src/video_core/query_cache/query_cache_base.h +++ b/src/video_core/query_cache/query_cache_base.h @@ -109,6 +109,9 @@ public: bool HasUncommittedFlushes() const; + /// Whether a new fence has queries to flush or host writes to sync for this cache. + bool HasPendingFenceWork() const; + bool ShouldWaitAsyncFlushes(); void PopAsyncFlushes(); |
