Display: Resched interrupt before vblank threads.

Otherwise, we may first schedule to a woken thread, and then immediately
reschedule to the interrupt.  Each reschedule costs ticks, and it doesn't
look like this should cause two reschedules.

Improves #11414, Breath of Fire 3 frame flicker.
This commit is contained in:
Unknown W. Brackets committed 2018-10-07 14:41:08 -07:00
1 parent ca5adcda71
commit 014d9ddead
1 file changed
+3 -3
+3 -3
View File
@@ -645,6 +645,9 @@ void hleEnterVblank(u64 userdata, int cyclesLate) {
CoreTiming::ScheduleEvent(msToCycles(vblankMs) - cyclesLate, leaveVblankEvent, vbCount + 1);
// Trigger VBlank interrupt handlers.
__TriggerInterrupt(PSP_INTR_IMMEDIATE | PSP_INTR_ONLY_IF_ENABLED | PSP_INTR_ALWAYS_RESCHED, PSP_VBLANK_INTR, PSP_INTR_SUB_ALL);
// Wake up threads waiting for VBlank
u32 error;
bool wokeThreads = false;
@@ -663,9 +666,6 @@ void hleEnterVblank(u64 userdata, int cyclesLate) {
__KernelReSchedule("entered vblank");
}
// Trigger VBlank interrupt handlers.
__TriggerInterrupt(PSP_INTR_IMMEDIATE | PSP_INTR_ONLY_IF_ENABLED | PSP_INTR_ALWAYS_RESCHED, PSP_VBLANK_INTR, PSP_INTR_SUB_ALL);
numVBlanks++;
numVBlanksSinceFlip++;