diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2021-10-19 17:25:32 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-19 17:25:32 -0300 |
| commit | 0d174cbd4555e69660a900577a52f3d4bf7391b9 (patch) | |
| tree | ed68e5f55d2f9ba1d365d877d7f66dad8fa3df19 /Ryujinx.HLE/HOS/Services/SurfaceFlinger | |
| parent | 63f1663fa959d8809d1762d99e9364565ba9b3d8 (diff) | |
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
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/SurfaceFlinger')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs index 39aebde5..c45c4b9d 100644 --- a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs +++ b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/SurfaceFlinger.cs @@ -392,7 +392,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger } else { - item.Fence.RegisterCallback(_device.Gpu, () => + item.Fence.RegisterCallback(_device.Gpu, (x) => { _device.Gpu.Window.SignalFrameReady(); _device.Gpu.GPFifo.Interrupt(); diff --git a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs index 515efd05..5b72e257 100644 --- a/Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs +++ b/Ryujinx.HLE/HOS/Services/SurfaceFlinger/Types/AndroidFence.cs @@ -1,5 +1,6 @@ using Ryujinx.Common.Logging; using Ryujinx.Graphics.Gpu; +using Ryujinx.Graphics.Gpu.Synchronization; using Ryujinx.HLE.HOS.Services.Nv.Types; using System; using System.Runtime.CompilerServices; @@ -66,7 +67,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger return false; } - public void RegisterCallback(GpuContext gpuContext, Action callback) + public void RegisterCallback(GpuContext gpuContext, Action<SyncpointWaiterHandle> callback) { ref NvFence fence = ref NvFences[FenceCount - 1]; @@ -76,7 +77,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger } else { - callback(); + callback(null); } } |
