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
|
@ -34,13 +34,13 @@ namespace Ryujinx.Graphics.Gpu.Synchronization
|
|||
/// <param name="threshold">The target threshold</param>
|
||||
/// <param name="callback">The callback to call when the threshold is reached</param>
|
||||
/// <returns>The created SyncpointWaiterHandle object or null if already past threshold</returns>
|
||||
public SyncpointWaiterHandle RegisterCallback(uint threshold, Action callback)
|
||||
public SyncpointWaiterHandle RegisterCallback(uint threshold, Action<SyncpointWaiterHandle> callback)
|
||||
{
|
||||
lock (_waiters)
|
||||
{
|
||||
if (Value >= threshold)
|
||||
{
|
||||
callback();
|
||||
callback(null);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
@ -111,13 +111,13 @@ namespace Ryujinx.Graphics.Gpu.Synchronization
|
|||
// we can't call it inside the lock.
|
||||
if (expired != null)
|
||||
{
|
||||
expired.Callback();
|
||||
expired.Callback(expired);
|
||||
|
||||
if (expiredList != null)
|
||||
{
|
||||
for (int i = 0; i < expiredList.Count; i++)
|
||||
{
|
||||
expiredList[i].Callback();
|
||||
expiredList[i].Callback(expiredList[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue