nvservices: mitigate abort with heavy load on the GPU processing thread (#1173)

* nvservices: mitigate abort with heavy load on the GPU processing thread.

This should fix Mario Tennis and LM3 regressions with syncpoints.

NOTE: Mario Tennis seems to have another issue related to the texture
cache that happens randomly when starting a match.

PS: Also add a debug logger for all known ioctl call to facilitate
debugging and add a missing UpdateMin in EventSignal.

* Address LDj3SNuD's comment

* Address gdkchan's comment
This commit is contained in:
Thog 2020-05-01 23:18:42 +02:00 committed by GitHub
parent 71dbb38b9a
commit 81cba3c3df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 90 additions and 16 deletions

View file

@ -310,6 +310,8 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl
hostEvent.State = NvHostEventState.Cancelled;
_device.System.HostSyncpoint.UpdateMin(hostEvent.Fence.Id);
return NvInternalResult.Success;
}
@ -398,20 +400,29 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostCtrl
hostEvent.State == NvHostEventState.Signaled ||
hostEvent.State == NvHostEventState.Cancelled))
{
hostEvent.Wait(_device.Gpu, fence);
bool timedOut = hostEvent.Wait(_device.Gpu, fence);
if (isWaitEventCmd)
if (timedOut)
{
value = ((fence.Id & 0xfff) << 16) | 0x10000000;
if (isWaitEventCmd)
{
value = ((fence.Id & 0xfff) << 16) | 0x10000000;
}
else
{
value = fence.Id << 4;
}
value |= eventIndex;
result = NvInternalResult.TryAgain;
}
else
{
value = fence.Id << 4;
value = fence.Value;
return NvInternalResult.Success;
}
value |= eventIndex;
result = NvInternalResult.TryAgain;
}
else
{