mirror of
https://github.com/skyline-emu/skyline.git
synced 2025-02-05 15:40:31 +03: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;
|
fence.id = channelSyncpoint;
|
||||||
|
|
||||||
u32 increment{(flags.fenceIncrement ? 2 : 0) + (flags.incrementWithValue ? fence.threshold : 0)};
|
u32 increment{(flags.fenceIncrement ? 2 : 0) + (flags.incrementWithValue ? fence.threshold : 0)};
|
||||||
fence.threshold = core.syncpointManager.IncrementSyncpointMaxExt(channelSyncpoint, increment);
|
fence.threshold = core.syncpointManager.IncrementSyncpointMaxExt(channelSyncpoint, increment);
|
||||||
|
|
||||||
|
channelCtx->gpfifo.Push(gpEntries.subspan(0, numEntries));
|
||||||
|
|
||||||
if (flags.fenceIncrement) {
|
if (flags.fenceIncrement) {
|
||||||
// Wraparound
|
// Wraparound
|
||||||
if (pushBufferMemoryOffset + SyncpointIncrCmdMaxLen >= pushBufferMemory.size())
|
if (pushBufferMemoryOffset + SyncpointIncrCmdMaxLen >= pushBufferMemory.size())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user