diff options
| author | 2020-02-17 22:15:43 -0400 | |
|---|---|---|
| committer | 2020-04-22 11:36:11 -0400 | |
| commit | 57fdbd9b8992de4eaf2b262e6a2cece43c141894 (patch) | |
| tree | f7d0bb17daffdffa76c61bd39eef3fa766150d9c /src/video_core/fence_manager.h | |
| parent | GPU: Implement a Fence Manager. (diff) | |
| download | yuzu-57fdbd9b8992de4eaf2b262e6a2cece43c141894.tar.gz yuzu-57fdbd9b8992de4eaf2b262e6a2cece43c141894.tar.xz yuzu-57fdbd9b8992de4eaf2b262e6a2cece43c141894.zip | |
FenceManager: Implement should wait.
Diffstat (limited to 'src/video_core/fence_manager.h')
| -rw-r--r-- | src/video_core/fence_manager.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/fence_manager.h b/src/video_core/fence_manager.h index 19cec0f66..036f3996c 100644 --- a/src/video_core/fence_manager.h +++ b/src/video_core/fence_manager.h | |||
| @@ -53,7 +53,10 @@ public: | |||
| 53 | void WaitPendingFences() { | 53 | void WaitPendingFences() { |
| 54 | while (!fences.empty()) { | 54 | while (!fences.empty()) { |
| 55 | TFence& current_fence = fences.front(); | 55 | TFence& current_fence = fences.front(); |
| 56 | WaitFence(current_fence); | 56 | bool should_wait = texture_cache.ShouldWaitAsyncFlushes(); |
| 57 | if (should_wait) { | ||
| 58 | WaitFence(current_fence); | ||
| 59 | } | ||
| 57 | texture_cache.PopAsyncFlushes(); | 60 | texture_cache.PopAsyncFlushes(); |
| 58 | auto& gpu{system.GPU()}; | 61 | auto& gpu{system.GPU()}; |
| 59 | auto& memory_manager{gpu.MemoryManager()}; | 62 | auto& memory_manager{gpu.MemoryManager()}; |
| @@ -80,7 +83,8 @@ private: | |||
| 80 | void TryReleasePendingFences() { | 83 | void TryReleasePendingFences() { |
| 81 | while (!fences.empty()) { | 84 | while (!fences.empty()) { |
| 82 | TFence& current_fence = fences.front(); | 85 | TFence& current_fence = fences.front(); |
| 83 | if (!IsFenceSignaled(current_fence)) { | 86 | bool should_wait = texture_cache.ShouldWaitAsyncFlushes(); |
| 87 | if (should_wait && !IsFenceSignaled(current_fence)) { | ||
| 84 | return; | 88 | return; |
| 85 | } | 89 | } |
| 86 | texture_cache.PopAsyncFlushes(); | 90 | texture_cache.PopAsyncFlushes(); |