From 0d174cbd4555e69660a900577a52f3d4bf7391b9 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 19 Oct 2021 17:25:32 -0300 Subject: EventWait should not signal the event when it returns Success (#2739) * Fix race when EventWait is called and a wait is done on the CPU * This is useless now * Fix EventSignal * Ensure the signal belongs to the current fence, to avoid stale signals --- Ryujinx.Graphics.Gpu/Synchronization/SynchronizationManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Synchronization/SynchronizationManager.cs') diff --git a/Ryujinx.Graphics.Gpu/Synchronization/SynchronizationManager.cs b/Ryujinx.Graphics.Gpu/Synchronization/SynchronizationManager.cs index d246f474..968de930 100644 --- a/Ryujinx.Graphics.Gpu/Synchronization/SynchronizationManager.cs +++ b/Ryujinx.Graphics.Gpu/Synchronization/SynchronizationManager.cs @@ -70,7 +70,7 @@ namespace Ryujinx.Graphics.Gpu.Synchronization /// The callback to call when the threshold is reached /// Thrown when id >= MaxHardwareSyncpoints /// The created SyncpointWaiterHandle object or null if already past threshold - public SyncpointWaiterHandle RegisterCallbackOnSyncpoint(uint id, uint threshold, Action callback) + public SyncpointWaiterHandle RegisterCallbackOnSyncpoint(uint id, uint threshold, Action callback) { if (id >= MaxHardwareSyncpoints) { @@ -120,7 +120,7 @@ namespace Ryujinx.Graphics.Gpu.Synchronization using (ManualResetEvent waitEvent = new ManualResetEvent(false)) { - var info = _syncpoints[id].RegisterCallback(threshold, () => waitEvent.Set()); + var info = _syncpoints[id].RegisterCallback(threshold, (x) => waitEvent.Set()); if (info == null) { -- cgit v1.2.3