diff options
author | Billy Laws <blaws05@gmail.com> | 2022-06-04 20:36:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-04 21:36:36 +0200 |
commit | 2073ba29197be4fcdcd750db7e7b8a36110efd71 (patch) | |
tree | 55059b0775ca273d3649440384de0c4747b56c2c | |
parent | d03124a9921f2dd9f3d52c8aa7c7b6dc5d4f7aef (diff) |
Fix a potential GPFIFO submission race (#3378)1.1.138
The syncpoint maximum value represents the maximum possible syncpt value at a given time, however due to PBs being submitted before max was incremented, for a brief moment of time this is not the case which could lead to invalid behaviour if a game waits on the fence at that specific time.
-rw-r--r-- | Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs index f73e3891..9f16a280 100644 --- a/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs +++ b/Ryujinx.HLE/HOS/Services/Nv/NvDrvServices/NvHostChannel/NvHostChannelDeviceFile.cs @@ -429,8 +429,6 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel Channel.PushHostCommandBuffer(CreateWaitCommandBuffer(header.Fence)); } - Channel.PushEntries(entries); - header.Fence.Id = _channelSyncpoint.Id; if (header.Flags.HasFlag(SubmitGpfifoFlags.FenceIncrement) || header.Flags.HasFlag(SubmitGpfifoFlags.IncrementWithValue)) @@ -449,6 +447,8 @@ namespace Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel header.Fence.Value = _device.System.HostSyncpoint.ReadSyncpointMaxValue(header.Fence.Id); } + Channel.PushEntries(entries); + if (header.Flags.HasFlag(SubmitGpfifoFlags.FenceIncrement)) { Channel.PushHostCommandBuffer(CreateIncrementCommandBuffer(ref header.Fence, header.Flags)); |