diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-07-06 22:23:10 +0200 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-07-09 22:20:36 +0200 |
commit | 63915bf2de3358029cb5e904f51f6b147b64bfa1 (patch) | |
tree | 590fda8b8ef117ac71499443bb89dfd031d271c9 /src/video_core/fence_manager.h | |
parent | Videocore: Address Feedback & CLANG Format. (diff) | |
download | yuzu-63915bf2de3358029cb5e904f51f6b147b64bfa1.tar yuzu-63915bf2de3358029cb5e904f51f6b147b64bfa1.tar.gz yuzu-63915bf2de3358029cb5e904f51f6b147b64bfa1.tar.bz2 yuzu-63915bf2de3358029cb5e904f51f6b147b64bfa1.tar.lz yuzu-63915bf2de3358029cb5e904f51f6b147b64bfa1.tar.xz yuzu-63915bf2de3358029cb5e904f51f6b147b64bfa1.tar.zst yuzu-63915bf2de3358029cb5e904f51f6b147b64bfa1.zip |
Diffstat (limited to 'src/video_core/fence_manager.h')
-rw-r--r-- | src/video_core/fence_manager.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/video_core/fence_manager.h b/src/video_core/fence_manager.h index f055b61e9..cd17667cb 100644 --- a/src/video_core/fence_manager.h +++ b/src/video_core/fence_manager.h @@ -8,6 +8,7 @@ #include <queue> #include "common/common_types.h" +#include "common/settings.h" #include "core/core.h" #include "video_core/delayed_destruction_ring.h" #include "video_core/gpu.h" @@ -53,6 +54,23 @@ public: delayed_destruction_ring.Tick(); } + void SignalReference() { + // Only sync references on High + if (Settings::values.gpu_accuracy.GetValue() != Settings::GPUAccuracy::High) { + return; + } + TryReleasePendingFences(); + const bool should_flush = ShouldFlush(); + CommitAsyncFlushes(); + TFence new_fence = CreateFence(0, 0, !should_flush); + fences.push(new_fence); + QueueFence(new_fence); + if (should_flush) { + rasterizer.FlushCommands(); + } + rasterizer.SyncGuestHost(); + } + void SignalSemaphore(GPUVAddr addr, u32 value) { TryReleasePendingFences(); const bool should_flush = ShouldFlush(); @@ -87,8 +105,10 @@ public: } PopAsyncFlushes(); if (current_fence->IsSemaphore()) { - gpu_memory.template Write<u32>(current_fence->GetAddress(), - current_fence->GetPayload()); + if (current_fence->GetAddress() != 0) { + gpu_memory.template Write<u32>(current_fence->GetAddress(), + current_fence->GetPayload()); + } } else { gpu.IncrementSyncPoint(current_fence->GetPayload()); } |