mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-05 11:45:10 +01:00
Fix potential nvdrv submission race
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 crashes or other such behaviour if a game waits on the fence at the right moment.
This commit is contained in:
parent
37453ed7fa
commit
91b2c47991
@ -108,13 +108,13 @@ namespace skyline::service::nvdrv::device::nvhost {
|
||||
}
|
||||
}
|
||||
|
||||
channelCtx->gpfifo.Push(gpEntries.subspan(0, numEntries));
|
||||
|
||||
fence.id = channelSyncpoint;
|
||||
|
||||
u32 increment{(flags.fenceIncrement ? 2 : 0) + (flags.incrementWithValue ? fence.threshold : 0)};
|
||||
fence.threshold = core.syncpointManager.IncrementSyncpointMaxExt(channelSyncpoint, increment);
|
||||
|
||||
channelCtx->gpfifo.Push(gpEntries.subspan(0, numEntries));
|
||||
|
||||
if (flags.fenceIncrement) {
|
||||
// Wraparound
|
||||
if (pushBufferMemoryOffset + SyncpointIncrCmdMaxLen >= pushBufferMemory.size())
|
||||
|
Loading…
Reference in New Issue
Block a user