diff --git a/src/core/libraries/videoout/driver.h b/src/core/libraries/videoout/driver.h index e3a2667b..d98e62ee 100644 --- a/src/core/libraries/videoout/driver.h +++ b/src/core/libraries/videoout/driver.h @@ -18,7 +18,7 @@ struct VideoOutPort { bool is_open = false; SceVideoOutResolutionStatus resolution; std::array buffer_slots; - std::array buffer_labels; // should be contiguous in memory + std::array buffer_labels; // should be contiguous in memory static_assert(sizeof(buffer_labels[0]) == 8u); std::array groups; FlipStatus flip_status; diff --git a/src/core/libraries/videoout/video_out.cpp b/src/core/libraries/videoout/video_out.cpp index a1f971b5..bb19c586 100644 --- a/src/core/libraries/videoout/video_out.cpp +++ b/src/core/libraries/videoout/video_out.cpp @@ -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"); }); diff --git a/src/core/platform.h b/src/core/platform.h index c8cc2a4f..d8064c52 100644 --- a/src/core/platform.h +++ b/src/core/platform.h @@ -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);