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
This commit is contained in:
parent
63f1663fa9
commit
0d174cbd45
7 changed files with 35 additions and 35 deletions
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue