videoout, platform: fix for ooo irqs

This commit is contained in:
psucien 2024-05-29 12:48:21 +02:00
parent e5486cc57f
commit db113bbc7b
3 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,7 @@ struct VideoOutPort {
bool is_open = false;
SceVideoOutResolutionStatus resolution;
std::array<VideoOutBuffer, MaxDisplayBuffers> buffer_slots;
std::array<uintptr_t, MaxDisplayBuffers> buffer_labels; // should be contiguous in memory
std::array<u64, MaxDisplayBuffers> buffer_labels; // should be contiguous in memory
static_assert(sizeof(buffer_labels[0]) == 8u);
std::array<BufferAttributeGroup, MaxDisplayBufferGroups> groups;
FlipStatus flip_status;

View File

@ -251,6 +251,7 @@ s32 sceVideoOutSubmitEopFlip(s32 handle, u32 buf_id, u32 mode, u32 arg, void** u
Platform::IrqC::Instance()->RegisterOnce(
Platform::InterruptId::GfxFlip, [=](Platform::InterruptId irq) {
ASSERT_MSG(irq == Platform::InterruptId::GfxFlip, "An unexpected IRQ occured");
ASSERT_MSG(port->buffer_labels[buf_id] == 1, "Out of order flip IRQ");
const auto result = driver->SubmitFlip(port, buf_id, arg, true);
ASSERT_MSG(result, "EOP flip submission failed");
});

View File

@ -66,7 +66,7 @@ struct IrqController {
h(irq);
}
while (!ctx.one_time_subscribers.empty()) {
if (!ctx.one_time_subscribers.empty()) {
const auto& h = ctx.one_time_subscribers.front();
h(irq);