mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-03 01:03:16 +00:00
graphics: separate IRQ for GPU driven flips
This commit is contained in:
parent
98316575fb
commit
8677972505
4 changed files with 63 additions and 33 deletions
|
@ -49,12 +49,13 @@ s32 PS4_SYSV_ABI sceGnmAddEqEvent(SceKernelEqueue eq, u64 id, void* udata) {
|
|||
kernel_event.event.udata = udata;
|
||||
eq->addEvent(kernel_event);
|
||||
|
||||
Platform::IrqC::Instance()->Register([=](Platform::InterruptId irq) {
|
||||
ASSERT_MSG(irq == Platform::InterruptId::GfxEop,
|
||||
"An unexpected IRQ occured"); // We need to conver IRQ# to event id and do proper
|
||||
// filtering in trigger function
|
||||
eq->triggerEvent(SceKernelEvent::Type::GfxEop, EVFILT_GRAPHICS_CORE, nullptr);
|
||||
});
|
||||
Platform::IrqC::Instance()->Register(
|
||||
Platform::InterruptId::GfxEop, [=](Platform::InterruptId irq) {
|
||||
ASSERT_MSG(irq == Platform::InterruptId::GfxEop,
|
||||
"An unexpected IRQ occured"); // We need to conver IRQ# to event id and do
|
||||
// proper filtering in trigger function
|
||||
eq->triggerEvent(SceKernelEvent::Type::GfxEop, EVFILT_GRAPHICS_CORE, nullptr);
|
||||
});
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
|
@ -164,7 +165,7 @@ s32 PS4_SYSV_ABI sceGnmDeleteEqEvent(SceKernelEqueue eq, u64 id) {
|
|||
|
||||
eq->removeEvent(id);
|
||||
|
||||
Platform::IrqC::Instance()->Unregister();
|
||||
Platform::IrqC::Instance()->Unregister(Platform::InterruptId::GfxEop);
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -223,11 +223,12 @@ s32 sceVideoOutSubmitEopFlip(s32 handle, u32 buf_id, u32 mode, u32 arg, void** u
|
|||
return 0x8029000b;
|
||||
}
|
||||
|
||||
Platform::IrqC::Instance()->RegisterOnce([=](Platform::InterruptId irq) {
|
||||
ASSERT_MSG(irq == Platform::InterruptId::GfxEop, "An unexpected IRQ occured");
|
||||
const auto result = driver->SubmitFlip(port, buf_id, arg, true);
|
||||
ASSERT_MSG(result, "EOP flip submission failed");
|
||||
});
|
||||
Platform::IrqC::Instance()->RegisterOnce(
|
||||
Platform::InterruptId::GfxFlip, [=](Platform::InterruptId irq) {
|
||||
ASSERT_MSG(irq == Platform::InterruptId::GfxFlip, "An unexpected IRQ occured");
|
||||
const auto result = driver->SubmitFlip(port, buf_id, arg, true);
|
||||
ASSERT_MSG(result, "EOP flip submission failed");
|
||||
});
|
||||
|
||||
return ORBIS_OK;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue