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
|
@ -314,24 +314,11 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl
|
|||
return NvInternalResult.InvalidInput;
|
||||
}
|
||||
|
||||
lock (hostEvent.Lock)
|
||||
{
|
||||
hostEvent.Cancel(_device.Gpu);
|
||||
|
||||
NvHostEventState oldState = hostEvent.State;
|
||||
_device.System.HostSyncpoint.UpdateMin(hostEvent.Fence.Id);
|
||||
|
||||
if (oldState == NvHostEventState.Waiting)
|
||||
{
|
||||
hostEvent.State = NvHostEventState.Cancelling;
|
||||
|
||||
hostEvent.Cancel(_device.Gpu);
|
||||
}
|
||||
|
||||
hostEvent.State = NvHostEventState.Cancelled;
|
||||
|
||||
_device.System.HostSyncpoint.UpdateMin(hostEvent.Fence.Id);
|
||||
|
||||
return NvInternalResult.Success;
|
||||
}
|
||||
return NvInternalResult.Success;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -486,7 +473,7 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl
|
|||
if (Event != null)
|
||||
{
|
||||
if (Event.State == NvHostEventState.Available ||
|
||||
Event.State == NvHostEventState.Signaled ||
|
||||
Event.State == NvHostEventState.Signaled ||
|
||||
Event.State == NvHostEventState.Cancelled)
|
||||
{
|
||||
eventIndex = index;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue