sceGe: sceGeBreak(1) takes pending interrupts with it

Resetting the GE also gets rid of an interrupt that was raised but not taken
yet, so a list that reached its FINISH just before never gets its finish
callback. We delivered one anyway, for a list that no longer existed. If the
break comes from inside a GE callback, the interrupt being handled is kept,
since its handler still has to return.

Found by gpu/ge/intrsuspend, which also confirms from a thread, with
interrupts suspended, that nothing moves along the queue until the FINISH
interrupt has been taken.

Savestates: bump GPUCommon to 7. We didn't use to mark a PAUSE signal as
delivered, which sceGeContinue now goes by, so a state saved with a list
paused that way would load into a game that could never continue it. Fixed
up on load.

gpu/signals/handlercalls goes in as known failing: with an old SDK version, a
stall address set from inside a SUSPEND callback doesn't reach the GE, which
we can't express with just the one stall address per list. See docs/sceGe.md.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Fable 5.1 committed 2026-09-21 12:48:03 -06:00
1 parent 41627cc0ce
commit 91c9c4d14e
5 files changed
+35 -3

No files matched your search

+12 -1
View File
@@ -15,6 +15,7 @@
// Official git repository and contact information can be found at
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
#include <iterator>
#include <list>
#include <map>
#include <vector>
@@ -67,7 +68,8 @@ public:
bool run(PendingInterrupt& pend) override {
if (ge_pending_cb.empty()) {
ERROR_LOG_REPORT(Log::sceGe, "Unable to run GE interrupt: no pending interrupt");
// sceGeBreak(1) got there first. If interrupts were off, this one had already been raised.
DEBUG_LOG(Log::sceGe, "Ignoring GE interrupt, nothing pending anymore");
return false;
}
@@ -291,6 +293,15 @@ bool __GeTriggerSync(GPUSyncType type, int id, u64 atTicks) {
return true;
}
void __GeClearPendingInterrupts(bool interruptRunning) {
if (interruptRunning && !ge_pending_cb.empty()) {
ge_pending_cb.erase(std::next(ge_pending_cb.begin()), ge_pending_cb.end());
} else {
ge_pending_cb.clear();
}
CoreTiming::RemoveEvent(geInterruptEvent);
}
bool __GeTriggerInterrupt(int listid, u32 pc, u64 atTicks) {
GeInterruptData intrdata;
intrdata.listid = listid;