summaryrefslogtreecommitdiffstats
path: root/src/video_core/fence_manager.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-04-22 17:14:40 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-04-22 17:36:27 +0200
commit4e37f1b1130b083b42f21029155e5a2e4e9a9eb3 (patch)
tree751ecd6d575de14bb9b7bf5a9bc0e2e28c9fa1e3 /src/video_core/fence_manager.h
parentAsync GPU: Correct flushing behavior to be similar to old async GPU behavior. (diff)
downloadyuzu-4e37f1b1130b083b42f21029155e5a2e4e9a9eb3.tar
yuzu-4e37f1b1130b083b42f21029155e5a2e4e9a9eb3.tar.gz
yuzu-4e37f1b1130b083b42f21029155e5a2e4e9a9eb3.tar.bz2
yuzu-4e37f1b1130b083b42f21029155e5a2e4e9a9eb3.tar.lz
yuzu-4e37f1b1130b083b42f21029155e5a2e4e9a9eb3.tar.xz
yuzu-4e37f1b1130b083b42f21029155e5a2e4e9a9eb3.tar.zst
yuzu-4e37f1b1130b083b42f21029155e5a2e4e9a9eb3.zip
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 {
public:
void SignalSemaphore(GPUVAddr addr, u32 value) {
TryReleasePendingFences();
- bool should_flush = ShouldFlush();
+ const bool should_flush = ShouldFlush();
CommitAsyncFlushes();
TFence new_fence = CreateFence(addr, value, !should_flush);
fences.push(new_fence);
@@ -67,7 +67,7 @@ public:
void SignalSyncPoint(u32 value) {
TryReleasePendingFences();
- bool should_flush = ShouldFlush();
+ const bool should_flush = ShouldFlush();
CommitAsyncFlushes();
TFence new_fence = CreateFence(value, !should_flush);
fences.push(new_fence);
@@ -79,15 +79,15 @@ public:
}
void WaitPendingFences() {
+ auto& gpu{system.GPU()};
+ auto& memory_manager{gpu.MemoryManager()};
while (!fences.empty()) {
TFence& current_fence = fences.front();
if (ShouldWait()) {
WaitFence(current_fence);
}
PopAsyncFlushes();
- auto& gpu{system.GPU()};
if (current_fence->IsSemaphore()) {
- auto& memory_manager{gpu.MemoryManager()};
memory_manager.Write<u32>(current_fence->GetAddress(), current_fence->GetPayload());
} else {
gpu.IncrementSyncPoint(current_fence->GetPayload());
@@ -125,15 +125,15 @@ protected:
private:
void TryReleasePendingFences() {
+ auto& gpu{system.GPU()};
+ auto& memory_manager{gpu.MemoryManager()};
while (!fences.empty()) {
TFence& current_fence = fences.front();
if (ShouldWait() && !IsFenceSignaled(current_fence)) {
return;
}
PopAsyncFlushes();
- auto& gpu{system.GPU()};
if (current_fence->IsSemaphore()) {
- auto& memory_manager{gpu.MemoryManager()};
memory_manager.Write<u32>(current_fence->GetAddress(), current_fence->GetPayload());
} else {
gpu.IncrementSyncPoint(current_fence->GetPayload());