fix(libSceAgcDriver): raise the graphics end-of-pipe event from flip packets #4215
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4215"
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 Mouad-Scriptz-0 on 2026-10-12T01:39:33Z.
What
sceAgcDriverAddEqEventregisters a queue's end-of-pipe event, and the driver raised it only for aRELEASE_MEMwhoseINT_SELasks for an interrupt. Minecraft (PPSA17221) registers the graphics event, never requests an interrupt in its releases, and after eachsceAgcDcbSetFlipwaits on the event while holding its render lock: it presented one frame and every thread then waited on that lock (sceKernelWaitEqueueonGraphicsEventQueuewith the one registered event never triggered, sampled witheu-stack), so the title sat at its first frame forever.AfterRecordedWork, as theRELEASE_MEMpath does), or at once when nothing is recorded.agc_driver_submit's end-of-pipe case gains a flip: a registered video output receives the flip and the graphics event arrives withdata1, type 0, and is cleared afterwards.With this (and the imports of #4118) Minecraft runs: menus, world creation and play on an Intel Arc Meteor Lake iGPU.
Tested
Fedora 44 (kernel 7.2.8, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON, Intel Arc Meteor Lake, Mesa 26.2.3), worktree onmainbab7b328:agc_driver_submitpasses (the new flip case fails without the change);tools/check_conventions.py --base origin/mainandgit diff --checkpass. Minecraft (PPSA17221) runs (Linux). Not tested on Windows.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-13T13:36:53Z.
Windows run, since the description says Windows is untested. Setup: Windows 11 (26300), WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON,ctest -j4 --timeout 300. Head 74389909f merged intomain3faa9cb40; the only conflict isdocs/dev/TechnicalDebt.md, where I keptmain's text. Two GPUs: RTX 4080 (NVIDIA 617.42) and Intel UHD 770 (101.6129).Submit.cppbuilds intoagc_driver_tests, which isEXCLUDE_FROM_ALLand not registered with ctest, so I built it and ran it by hand, with ctest'sPATH(build/core/libs/libs/unpatched).AGC driver submit tests passedon both GPUs.PacketExecution.cppfrommainfails on both GPUs withflip did not raise the graphics end-of-pipe event.mainindocs/dev/TechnicalDebt.md(the debt split), so it needs a rebase withpython3 tools/debt_split.py resolve.Not tested: a title.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T14:15:28Z.
Rebased onto
main(only conflict was the debt split: the line now lives indocs/dev/debt/libSceAgcDriver.md). Checked theagc_driverflip case passes and fails without thePacketExecution.cppchange, and the libSceAgcDriver ctest scope is green apart fromagc_driver_tessellation, which segfaults onmaintoo. Windows run by @johnmaia confirms the same on NVIDIA and Intel. Merging once the full Build is green.Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-18T14:51:51Z.
@Mouad-Scriptz-0 a question about the Minecraft case this PR fixed. The end-of-pipe event delivered after every flip packet makes Death Stranding 2 call a null handler on its first flip (#6462). Its graphics event handler table is still empty at that moment, so a bare
sceAgcDcbSetFlipcan't be raising that event on a console.To replace the per-flip event without hanging Minecraft again I need to know what Minecraft submits between two flips. Does its command buffer carry a
RELEASE_MEMorEVENT_WRITE_EOPwith an interrupt select, and on which queue? Which id and udata does it pass tosceAgcDriverAddEqEvent? A log of its submitted packets around two flips would answer both.