AGC: the end-of-pipe event a flip raises makes Death Stranding 2 call a null handler #6462
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-15T16:22:29Z.
The graphics end-of-pipe event that flips raise since #4215 crashes Death Stranding 2 (PPSA02015, 01.015.000) about 56 s in.
Setup: Linux, RTX 5080,
main0029e62f9plus #6437, #5426 and #5855, without which it stops earlier.The title registers graphics event 0 with
sceAgcDriverAddEqEventand runs a thread that waits on it and calls a handler from a table indexed bysceAgcDriverGetEqContextId. Every flip raises the event, and the thread calls address 0 (SIGSEGV, called fromapp.elf+ 0x1bd01b1). With a local switch that skips the flip event, 20 flips go by without a crash, and the first event comes from the title's ownRELEASE_MEMwithINT_SEL2 on queue 72 at about 131 s.RELEASE_MEMinterrupt hits the same null call, a separate bug in whatsceAgcDriverGetEqContextIdreturns that I have a fix forSo this title does not expect an event per flip. How does Minecraft (the title #4215 was for) get its per-flip event on a console? If its flips carry their own end-of-pipe release with an interrupt, raising the event only from that release would serve both.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T22:35:38Z.
I traced this to the flip path added for #4215: after flushing/queuing the flip, it calls
AgcDriverDeliverEopInterrupt(submission.queue)unconditionally (or defers the same call until recorded work completes). The existingRELEASE_MEMinterrupt path is separate. #4215 explicitly left unmeasured whether console flips raise this event themselves or only through an interrupt in the flip sequence. Do you have a packet trace or command-buffer excerpt for the affected Death Stranding 2 flip showing whether its submission contains an interrupting release? Comparing that with the Minecraft flip that needs the event would establish whether the event should be tied to a packet condition rather than every flip.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T22:45:38Z.
Related evidence from GT7 in #6350: its current-main trace records one EOP delivery from the guest's interrupting
RELEASE_MEMmarker and a second delivery from the separate flip branch, with one flip in that run. That matches the two independent paths in the code and confirms the emulator can deliver both for one submission. It still does not establish whether console behavior should coalesce them; the missing discriminator remains a console-side event count/data trace or another reliable reference for a submission containing both.Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-16T00:44:29Z.
I logged every flip submission in Death Stranding 2 with its packets (same stack as the issue, local print only). In two runs the game dies after its first flip, with the same null call from
app.elf+0x1bd01b1. That flip is submission 10 on queue 0, and the submission is the flip packet alone, six dwords (c004105c 00000001 00000000 00000001 00000000 00000000). It holds noRELEASE_MEMand nothing withINT_SEL, so the only event that submission raises is the one from the flip branch's unconditionalAgcDriverDeliverEopInterrupt.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T03:27:46Z.
Thanks, this isolates the local trigger: the first failing submission is a flip packet with no
RELEASE_MEMorINT_SEL, so the event comes from the unconditional flip path. It still does not establish whether the console raises this event for a bare flip; #4215 relies on that behavior for Minecraft, so I do not have a safe generic change to propose yet. A console event count or trace for this packet shape would settle the remaining question.Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-17T08:30:21Z.
One more fact for this: that bare flip packet is written by the game's own
sceAgcDcbSetFlip(video out handle 1, buffers 0 and 1), not bysceVideoOutSubmitFlip. I logged both callers on the same stack and onlysceAgcDcbSetFlipfires before the crash. So it is the same packet shape a title gets from the AGC flip call, which is also the path #4215 relies on, and PR #7008 (which only changes VideoOut flips) leaves this crash unchanged in my runs.PR #7978 fixes this: flips no longer raise the graphics end-of-pipe event (a flip in a command buffer now waits for the previous flip submission's GPU work instead), and the event carries the release's interrupt context so
sceAgcDriverGetEqContextIdreturns it. With it and #5426, Death Stranding 2 gets past the null call on currentmainand stops atunsupported MIMG opcode 0xb8.