summaryrefslogtreecommitdiff
path: root/src/video_core/fence_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/fence_manager.h')
-rw-r--r--src/video_core/fence_manager.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/fence_manager.h b/src/video_core/fence_manager.h
index 9fe9c1bf2..dabd1588c 100644
--- a/src/video_core/fence_manager.h
+++ b/src/video_core/fence_manager.h
@@ -54,7 +54,7 @@ class FenceManager {
54public: 54public:
55 void SignalSemaphore(GPUVAddr addr, u32 value) { 55 void SignalSemaphore(GPUVAddr addr, u32 value) {
56 TryReleasePendingFences(); 56 TryReleasePendingFences();
57 bool should_flush = ShouldFlush(); 57 const bool should_flush = ShouldFlush();
58 CommitAsyncFlushes(); 58 CommitAsyncFlushes();
59 TFence new_fence = CreateFence(addr, value, !should_flush); 59 TFence new_fence = CreateFence(addr, value, !should_flush);
60 fences.push(new_fence); 60 fences.push(new_fence);
@@ -67,7 +67,7 @@ public:
67 67
68 void SignalSyncPoint(u32 value) { 68 void SignalSyncPoint(u32 value) {
69 TryReleasePendingFences(); 69 TryReleasePendingFences();
70 bool should_flush = ShouldFlush(); 70 const bool should_flush = ShouldFlush();
71 CommitAsyncFlushes(); 71 CommitAsyncFlushes();
72 TFence new_fence = CreateFence(value, !should_flush); 72 TFence new_fence = CreateFence(value, !should_flush);
73 fences.push(new_fence); 73 fences.push(new_fence);
@@ -79,15 +79,15 @@ public:
79 } 79 }
80 80
81 void WaitPendingFences() { 81 void WaitPendingFences() {
82 auto& gpu{system.GPU()};
83 auto& memory_manager{gpu.MemoryManager()};
82 while (!fences.empty()) { 84 while (!fences.empty()) {
83 TFence& current_fence = fences.front(); 85 TFence& current_fence = fences.front();
84 if (ShouldWait()) { 86 if (ShouldWait()) {
85 WaitFence(current_fence); 87 WaitFence(current_fence);
86 } 88 }
87 PopAsyncFlushes(); 89 PopAsyncFlushes();
88 auto& gpu{system.GPU()};
89 if (current_fence->IsSemaphore()) { 90 if (current_fence->IsSemaphore()) {
90 auto& memory_manager{gpu.MemoryManager()};
91 memory_manager.Write<u32>(current_fence->GetAddress(), current_fence->GetPayload()); 91 memory_manager.Write<u32>(current_fence->GetAddress(), current_fence->GetPayload());
92 } else { 92 } else {
93 gpu.IncrementSyncPoint(current_fence->GetPayload()); 93 gpu.IncrementSyncPoint(current_fence->GetPayload());
@@ -125,15 +125,15 @@ protected:
125 125
126private: 126private:
127 void TryReleasePendingFences() { 127 void TryReleasePendingFences() {
128 auto& gpu{system.GPU()};
129 auto& memory_manager{gpu.MemoryManager()};
128 while (!fences.empty()) { 130 while (!fences.empty()) {
129 TFence& current_fence = fences.front(); 131 TFence& current_fence = fences.front();
130 if (ShouldWait() && !IsFenceSignaled(current_fence)) { 132 if (ShouldWait() && !IsFenceSignaled(current_fence)) {
131 return; 133 return;
132 } 134 }
133 PopAsyncFlushes(); 135 PopAsyncFlushes();
134 auto& gpu{system.GPU()};
135 if (current_fence->IsSemaphore()) { 136 if (current_fence->IsSemaphore()) {
136 auto& memory_manager{gpu.MemoryManager()};
137 memory_manager.Write<u32>(current_fence->GetAddress(), current_fence->GetPayload()); 137 memory_manager.Write<u32>(current_fence->GetAddress(), current_fence->GetPayload());
138 } else { 138 } else {
139 gpu.IncrementSyncPoint(current_fence->GetPayload()); 139 gpu.IncrementSyncPoint(current_fence->GetPayload());