mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-26 03:55:37 +00:00
Suggestions and removing peding mutex now
This commit is contained in:
parent
a5454c7fed
commit
528f7a29f4
@ -311,7 +311,7 @@ void VideoOutDriver::PresentThread(std::stop_token token) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Flip(request);
|
Flip(request);
|
||||||
main_port.vblank_cv.notify_all();
|
request.port->vo_cv.notify_all();
|
||||||
// wake up threads waiting to submit more flips
|
// wake up threads waiting to submit more flips
|
||||||
}
|
}
|
||||||
FRAME_END;
|
FRAME_END;
|
||||||
|
@ -350,22 +350,8 @@ s32 sceVideoOutSubmitEopFlip(s32 handle, u32 buf_id, u32 mode, u32 arg, void** u
|
|||||||
LOG_WARNING(Lib_VideoOut, "Ignoring flip IRQ during mode change");
|
LOG_WARNING(Lib_VideoOut, "Ignoring flip IRQ during mode change");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::tuple<u32, u32> pending;
|
const bool result = driver->SubmitFlip(port, buf_id, arg, true);
|
||||||
{
|
ASSERT_MSG(result, "EOP flip submission failed for buffer {}", buf_id);
|
||||||
std::lock_guard lock(port->pending_mutex);
|
|
||||||
if (port->pending_flips.empty()) {
|
|
||||||
LOG_ERROR(Lib_VideoOut, "Received GfxFlip IRQ but no flips pending");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
pending = port->pending_flips.front();
|
|
||||||
port->pending_flips.pop();
|
|
||||||
}
|
|
||||||
const auto [queued_buf_id, queued_arg] = pending;
|
|
||||||
ASSERT_MSG(queued_buf_id == buf_id,
|
|
||||||
"Out-of-order flip IRQ (expected buf_id = {}, got = {})", buf_id,
|
|
||||||
queued_buf_id);
|
|
||||||
const bool result = driver->SubmitFlip(port, queued_buf_id, queued_arg, true);
|
|
||||||
ASSERT_MSG(result, "EOP flip submission failed for buffer {}", queued_buf_id);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return ORBIS_OK;
|
return ORBIS_OK;
|
||||||
|
Loading…
Reference in New Issue
Block a user