Prevent Vulkan guest crashes by avoiding intermediate syncpt event signal state

The vulkan guest driver doesn't expect a 0xB return code from SyncptEventWait, even though this is valid when an event is being signalled. Just ignore the intermediate state instead as doing so avoids races without causing any more.
This commit is contained in:
Billy Laws 2023-01-23 21:19:22 +00:00
parent fcb8f2a229
commit 568306195f

View File

@ -11,10 +11,8 @@ namespace skyline::service::nvdrv::device::nvhost {
void Ctrl::SyncpointEvent::Signal() { void Ctrl::SyncpointEvent::Signal() {
// We should only signal the KEvent if the event is actively being waited on // We should only signal the KEvent if the event is actively being waited on
if (state.exchange(State::Signalling) == State::Waiting) if (state.exchange(State::Signalled) == State::Waiting)
event->Signal(); event->Signal();
state = State::Signalled;
} }
void Ctrl::SyncpointEvent::Cancel(soc::host1x::Host1x &host1x) { void Ctrl::SyncpointEvent::Cancel(soc::host1x::Host1x &host1x) {