diff options
| author | 2023-08-06 09:38:16 +0200 | |
|---|---|---|
| committer | 2023-09-23 23:05:30 +0200 | |
| commit | 282ae8fa51e060e6d4ef026b734aa871b1b9331e (patch) | |
| tree | 3bc4603b6add0582315dc65544f1986427e4182d /src/video_core/fence_manager.h | |
| parent | QueryCache: Implement dependant queries. (diff) | |
| download | yuzu-282ae8fa51e060e6d4ef026b734aa871b1b9331e.tar.gz yuzu-282ae8fa51e060e6d4ef026b734aa871b1b9331e.tar.xz yuzu-282ae8fa51e060e6d4ef026b734aa871b1b9331e.zip | |
Query Cache: address issues
Diffstat (limited to 'src/video_core/fence_manager.h')
| -rw-r--r-- | src/video_core/fence_manager.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/video_core/fence_manager.h b/src/video_core/fence_manager.h index 8459a3092..805a89900 100644 --- a/src/video_core/fence_manager.h +++ b/src/video_core/fence_manager.h | |||
| @@ -55,6 +55,9 @@ public: | |||
| 55 | 55 | ||
| 56 | // Unlike other fences, this one doesn't | 56 | // Unlike other fences, this one doesn't |
| 57 | void SignalOrdering() { | 57 | void SignalOrdering() { |
| 58 | if constexpr (!can_async_check) { | ||
| 59 | TryReleasePendingFences<false>(); | ||
| 60 | } | ||
| 58 | std::scoped_lock lock{buffer_cache.mutex}; | 61 | std::scoped_lock lock{buffer_cache.mutex}; |
| 59 | buffer_cache.AccumulateFlushes(); | 62 | buffer_cache.AccumulateFlushes(); |
| 60 | } | 63 | } |
| @@ -104,13 +107,9 @@ public: | |||
| 104 | SignalFence(std::move(func)); | 107 | SignalFence(std::move(func)); |
| 105 | } | 108 | } |
| 106 | 109 | ||
| 107 | void WaitPendingFences(bool force) { | 110 | void WaitPendingFences([[maybe_unused]] bool force) { |
| 108 | if constexpr (!can_async_check) { | 111 | if constexpr (!can_async_check) { |
| 109 | if (force) { | 112 | TryReleasePendingFences<true>(); |
| 110 | TryReleasePendingFences<true>(); | ||
| 111 | } else { | ||
| 112 | TryReleasePendingFences<false>(); | ||
| 113 | } | ||
| 114 | } else { | 113 | } else { |
| 115 | if (!force) { | 114 | if (!force) { |
| 116 | return; | 115 | return; |
| @@ -125,7 +124,8 @@ public: | |||
| 125 | }); | 124 | }); |
| 126 | SignalFence(std::move(func)); | 125 | SignalFence(std::move(func)); |
| 127 | std::unique_lock lk(wait_mutex); | 126 | std::unique_lock lk(wait_mutex); |
| 128 | wait_cv.wait(lk, [&wait_finished] { return wait_finished.load(std::memory_order_relaxed); }); | 127 | wait_cv.wait( |
| 128 | lk, [&wait_finished] { return wait_finished.load(std::memory_order_relaxed); }); | ||
| 129 | } | 129 | } |
| 130 | } | 130 | } |
| 131 | 131 | ||