fix(agc): raise no end-of-pipe event from flips and carry the release's interrupt context #7978

Merged
fma-rc merged 11 commits from upstream-pr/7978 into main 2026-11-04 17:33:39 +00:00
fma-rc commented 2026-10-19 16:44:12 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-19T16:44:12Z.


What

Death Stranding 2 (PPSA02015) crashes about 27 s in on current main with PR 5426: its graphics event thread calls a null handler. Stop on main 00d7e611ef + #5426:

SIGSEGV at 27.5 s, called from the event thread:
#0  0x0000000000000000 n/a (n/a + 0x0)
#1  n/a (app.elf + 0x1bd01b1)

The thread waits on graphics event 0 and indexes a handler table by sceAgcDriverGetEqContextId. Two things go wrong.

Flips raise the event. Since #4215 every flip delivers the end-of-pipe event (#7137 later latched it off per queue). From the PS5 13.60 kernel, a flip's interrupt context is always typed and goes to the display path, not to this event. Flips now raise no event. #4215 added the event so that Minecraft (PPSA17221) could keep the labels its frames write after a flip; instead, a submission with a flip in its command buffer now returns only after every earlier flip submission ran to its end and its GPU work completed. CPU flips (sceVideoOutSubmitFlip) do not wait, and the next flip is still released before presentation as before. This removes the #7137 latch.

The event carries the wrong context. The event data is queue | context << 16, where context is RELEASE_MEM dword 7 masked to 28 bits (from the PS5 13.60 kernel). sceAgcDriverGetEqContextId returns data >> 16 and sceAgcDriverGetEqEventType the low 32 bits (from the PS5 10.01 module). Before, both returned the queue, so the title's first own interrupt (queue 0x50, context 0) read context 0x50 and called the same null entry. A typed context (bit 27) throws, since it is not delivered as this event and that path is not implemented. Both functions no longer read the event's ident, so its two overflow checks are removed; agc_driver checks both decodes, up to a full 28-bit context.

Earlier attempts at the flip event: #6963 and #7008 (closed). Overlap: #6977 rewrites Eq/src/Event.cpp for PS4 titles. Rebased onto main after #7137, #6616 and #6794 merged.

Tested

Linux (Arch, GCC 16.2.1) and Windows Server 2025 (WinLibs GCC 15.2, no GPU), on main 340247a083 with this PR (2c0ce8994d), unless a line names an earlier head.

  • Rebased on main 4f41f4c375 (04f9490487) in place of the merge commits. video_out_flip_deferred deadlocked behind the second flip hold, because its output callback blocked until the test released it; the test now holds the GPU with a WAIT_REG_MEM on a label it writes after registering the buffer. Run outside ctest on the RTX 5080 with SDL's Wayland driver, it aborts with test gate timed out at a3a6f4a5cb (3 of 3) and passes at 04f9490487 (3 of 3); all 26 video_out_flip_tests modes pass there. The 47 tests matching ^agc_driver$|^agc_driver_(eop_interrupts|flip|flip_compute|present_mode|worker_failure_log|submit)$|^agc_submit|^video_out pass on NVIDIA, RADV (610M) and lavapipe, apart from the video_out_* tests that skip under ctest, and the Windows build and ctest pass 3918 of 3918.
  • Rebased on main 4569fe654a (5adc50d226), keeping #11357's host import frame checks in the flip tests and the AddEvent registration main added: the tests matching ^agc_driver$|^agc_driver_(eop_interrupts|flip|flip_compute|present_mode|worker_failure_log|submit)$|^agc_submit|^video_out pass on NVIDIA (RTX 5080), RADV (Radeon 610M) and lavapipe (the video_out_flip_* ones skip as before); the Windows build and ctest show no failure the merge base lacks (3282 tests).
  • agc_driver, agc_driver_eop_interrupts and agc_driver_flip fail on main with this PR's tests and pass with the change, 3 of 3 runs each on RADV (Radeon 680M), on c4a87b4ea7.
  • The 25 tests matching ^agc_driver$|^agc_driver_(eop_interrupts|flip|flip_compute|present_mode|worker_failure_log)$|^video_out pass on NVIDIA, RADV and lavapipe; the Windows build passes all 1700 tests.
  • The video_out_flip_* tests skip under ctest (the offscreen SDL driver has no Vulkan). Under Xvfb with SDL's x11 driver and Mesa's software WSI on RADV, all 12 pass on main and with this PR.
  • Full suite on 2c0ce8994d: lavapipe 1657 of 1658, the one failure agc_driver_f64_add_mul_denormal_modes (lavapipe flushes an f64 denormal) fails the same way on main 340247a083; RADV (Radeon 680M) only the same 4 failures as on main (agc_driver_image_table_vouched_lookups, agc_driver_bda_device, agc_driver_guest_memory_lifetime, agc_driver_tessellation).
  • Death Stranding 2 with #5426, before the rebase: gets past the null call and stops at unsupported MIMG opcode 0xb8, a separate bug.
  • Minecraft (PPSA17221), RADV 680M: runs 120 s and writes the same 6 captured frames as main a700809679.
  • Astro's Playroom (PPSA01325), RTX 5080, 10 s trace window in the same gameplay scene, main 147 and 143 frames in two rounds, this PR 145 (one round on b834c76b24, the last code change). Its captured frames show the same scene as main.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: #6462
  • Unblocks: PPSA02015, with #5426 (reaches the next stop)
  • GPUs tested: NVIDIA RTX 5080 (driver 615.78.08), AMD Radeon 610M (RADV Mesa 26.1.4), AMD Radeon 680M (RADV Mesa 26.2.4), lavapipe; Arch Linux
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4924264279 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7978). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-19T16:44:12Z. --- ### What Death Stranding 2 (PPSA02015) crashes about 27 s in on current `main` with PR 5426: its graphics event thread calls a null handler. Stop on `main` 00d7e611ef + #5426: ``` SIGSEGV at 27.5 s, called from the event thread: #0 0x0000000000000000 n/a (n/a + 0x0) #1 n/a (app.elf + 0x1bd01b1) ``` The thread waits on graphics event 0 and indexes a handler table by `sceAgcDriverGetEqContextId`. Two things go wrong. **Flips raise the event.** Since #4215 every flip delivers the end-of-pipe event (#7137 later latched it off per queue). From the PS5 13.60 kernel, a flip's interrupt context is always typed and goes to the display path, not to this event. Flips now raise no event. #4215 added the event so that Minecraft (PPSA17221) could keep the labels its frames write after a flip; instead, a submission with a flip in its command buffer now returns only after every earlier flip submission ran to its end and its GPU work completed. CPU flips (`sceVideoOutSubmitFlip`) do not wait, and the next flip is still released before presentation as before. This removes the #7137 latch. **The event carries the wrong context.** The event data is `queue | context << 16`, where context is `RELEASE_MEM` dword 7 masked to 28 bits (from the PS5 13.60 kernel). `sceAgcDriverGetEqContextId` returns `data >> 16` and `sceAgcDriverGetEqEventType` the low 32 bits (from the PS5 10.01 module). Before, both returned the queue, so the title's first own interrupt (queue 0x50, context 0) read context 0x50 and called the same null entry. A typed context (bit 27) throws, since it is not delivered as this event and that path is not implemented. Both functions no longer read the event's `ident`, so its two overflow checks are removed; `agc_driver` checks both decodes, up to a full 28-bit context. Earlier attempts at the flip event: #6963 and #7008 (closed). Overlap: #6977 rewrites `Eq/src/Event.cpp` for PS4 titles. Rebased onto `main` after #7137, #6616 and #6794 merged. ### Tested Linux (Arch, GCC 16.2.1) and Windows Server 2025 (WinLibs GCC 15.2, no GPU), on `main` 340247a083 with this PR (2c0ce8994d), unless a line names an earlier head. - Rebased on `main` 4f41f4c375 (04f9490487) in place of the merge commits. `video_out_flip_deferred` deadlocked behind the second flip hold, because its output callback blocked until the test released it; the test now holds the GPU with a `WAIT_REG_MEM` on a label it writes after registering the buffer. Run outside ctest on the RTX 5080 with SDL's Wayland driver, it aborts with `test gate timed out` at a3a6f4a5cb (3 of 3) and passes at 04f9490487 (3 of 3); all 26 `video_out_flip_tests` modes pass there. The 47 tests matching `^agc_driver$|^agc_driver_(eop_interrupts|flip|flip_compute|present_mode|worker_failure_log|submit)$|^agc_submit|^video_out` pass on NVIDIA, RADV (610M) and lavapipe, apart from the `video_out_*` tests that skip under ctest, and the Windows build and ctest pass 3918 of 3918. - Rebased on `main` 4569fe654a (5adc50d226), keeping #11357's host import frame checks in the flip tests and the `AddEvent` registration `main` added: the tests matching `^agc_driver$|^agc_driver_(eop_interrupts|flip|flip_compute|present_mode|worker_failure_log|submit)$|^agc_submit|^video_out` pass on NVIDIA (RTX 5080), RADV (Radeon 610M) and lavapipe (the `video_out_flip_*` ones skip as before); the Windows build and ctest show no failure the merge base lacks (3282 tests). - `agc_driver`, `agc_driver_eop_interrupts` and `agc_driver_flip` fail on `main` with this PR's tests and pass with the change, 3 of 3 runs each on RADV (Radeon 680M), on c4a87b4ea7. - The 25 tests matching `^agc_driver$|^agc_driver_(eop_interrupts|flip|flip_compute|present_mode|worker_failure_log)$|^video_out` pass on NVIDIA, RADV and lavapipe; the Windows build passes all 1700 tests. - The `video_out_flip_*` tests skip under ctest (the offscreen SDL driver has no Vulkan). Under Xvfb with SDL's x11 driver and Mesa's software WSI on RADV, all 12 pass on `main` and with this PR. - Full suite on 2c0ce8994d: lavapipe 1657 of 1658, the one failure `agc_driver_f64_add_mul_denormal_modes` (lavapipe flushes an f64 denormal) fails the same way on `main` 340247a083; RADV (Radeon 680M) only the same 4 failures as on `main` (`agc_driver_image_table_vouched_lookups`, `agc_driver_bda_device`, `agc_driver_guest_memory_lifetime`, `agc_driver_tessellation`). - Death Stranding 2 with #5426, before the rebase: gets past the null call and stops at `unsupported MIMG opcode 0xb8`, a separate bug. - Minecraft (PPSA17221), RADV 680M: runs 120 s and writes the same 6 captured frames as `main` a700809679. - Astro's Playroom (PPSA01325), RTX 5080, 10 s trace window in the same gameplay scene, `main` 147 and 143 frames in two rounds, this PR 145 (one round on b834c76b24, the last code change). Its captured frames show the same scene as `main`. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: #6462 - [x] Unblocks: PPSA02015, with #5426 (reaches the next stop) - [x] GPUs tested: NVIDIA RTX 5080 (driver 615.78.08), AMD Radeon 610M (RADV Mesa 26.1.4), AMD Radeon 680M (RADV Mesa 26.2.4), lavapipe; Arch Linux - [x] AI-assisted: yes
MarcZX10 commented 2026-10-19 16:45:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T16:45:25Z.

Review: COMMENTED


I reviewed the event encoding and flip-ordering paths. The event now carries the queue in the low bits and the release context above it, and the query helpers split those fields consistently. The regression cases cover a flip without an EOP event, release events with contexts, and a following submission held until the flip work completes. I did not independently run the reported GPU/Windows test matrix or title checks.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5574773460 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7978#pullrequestreview-5574773460). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-19T16:45:25Z. **Review:** COMMENTED --- I reviewed the event encoding and flip-ordering paths. The event now carries the queue in the low bits and the release context above it, and the query helpers split those fields consistently. The regression cases cover a flip without an EOP event, release events with contexts, and a following submission held until the flip work completes. I did not independently run the reported GPU/Windows test matrix or title checks.
fma-rc commented 2026-10-19 17:05:17 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-19T17:05:17Z.


On the overlap table: none of those PRs changes the end-of-pipe event or the flip hold; the rows are neighbouring lines in Driver.hpp, PacketExecution.cpp and the debt file. The real one is #6977, which rewrites AgcDriverDeliverEopInterrupt in Eq/src/Event.cpp for PS4 titles, so whichever of the two merges second has to carry the other's event data (queue | context << 16 here). #6292 and #6615 only change the mutex type in that file. If one of them lands first, I'll rebase this on it.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6272728694 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7978#issuecomment-6272728694). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-19T17:05:17Z. --- On the overlap table: none of those PRs changes the end-of-pipe event or the flip hold; the rows are neighbouring lines in `Driver.hpp`, `PacketExecution.cpp` and the debt file. The real one is #6977, which rewrites `AgcDriverDeliverEopInterrupt` in `Eq/src/Event.cpp` for PS4 titles, so whichever of the two merges second has to carry the other's event data (`queue | context << 16` here). #6292 and #6615 only change the mutex type in that file. If one of them lands first, I'll rebase this on it.
fma-rc commented 2026-10-19 18:16:40 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-19T18:16:40Z.


@Lberonio this removes the per-queue latch from #7137: flips no longer raise the end-of-pipe event on any queue, so the duplicate it suppressed for Gran Turismo 7 cannot happen. I don't have GT7 to check it. Could you run it on this branch and say whether it still gets as far as on main?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6274101943 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7978#issuecomment-6274101943). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-19T18:16:40Z. --- @Lberonio this removes the per-queue latch from #7137: flips no longer raise the end-of-pipe event on any queue, so the duplicate it suppressed for Gran Turismo 7 cannot happen. I don't have GT7 to check it. Could you run it on this branch and say whether it still gets as far as on `main`?
savvaniss commented 2026-10-20 03:57:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-20T03:57:30Z.


A data point from the PS4 side, on #6977's branch (head 93eeee014, before #7137), Windows, RX 9070 XT.

The Unity player in Boggle and Trivial Pursuit Live! (CUSA03312) ends each frame with an EVENT_WRITE_EOP that requests an interrupt. It then calls sceKernelWaitEqueue for one event without reading the label, and builds the next frame. With the flip's extra event:

  • One event was left pending after each wait, so the title got one more frame ahead of the queue with every flip.
  • The 16-flip queue stopped it 15 to 16 submissions ahead of the queue worker.
  • The worker then read descriptor tables written up to 15 frames later, so the title stopped on a T# found where a V# should be whenever a scene changed layout.

With #7137's commits on that branch there is one event per frame: 2684 events for 2683 submissions, against two per frame before. The worker stays within two submissions, and both titles run their menus at 60 fps. Trivial Pursuit now reaches its game. That PR is Get-fix/AnyPS5#5. Removing the flip event entirely, as this PR does, covers the same case.

shadPS4 also raises a separate flip interrupt for a PS4 flip, not the end-of-pipe one.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6283023788 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7978#issuecomment-6283023788). Originally posted by [savvaniss](https://github.com/savvaniss) on 2026-10-20T03:57:30Z. --- A data point from the PS4 side, on #6977's branch (head `93eeee014`, before #7137), Windows, RX 9070 XT. The Unity player in Boggle and Trivial Pursuit Live! (CUSA03312) ends each frame with an `EVENT_WRITE_EOP` that requests an interrupt. It then calls `sceKernelWaitEqueue` for one event without reading the label, and builds the next frame. With the flip's extra event: - One event was left pending after each wait, so the title got one more frame ahead of the queue with every flip. - The 16-flip queue stopped it 15 to 16 submissions ahead of the queue worker. - The worker then read descriptor tables written up to 15 frames later, so the title stopped on a T# found where a V# should be whenever a scene changed layout. With #7137's commits on that branch there is one event per frame: 2684 events for 2683 submissions, against two per frame before. The worker stays within two submissions, and both titles run their menus at 60 fps. Trivial Pursuit now reaches its game. That PR is Get-fix/AnyPS5#5. Removing the flip event entirely, as this PR does, covers the same case. shadPS4 also raises a separate flip interrupt for a PS4 flip, not the end-of-pipe one.
Lberonio commented 2026-10-20 13:29:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Lberonio on 2026-10-20T13:29:09Z.


Heads-up while you rewrite testEndOfPipeInterrupts: the merged #7137 branch (fix/agc-eop-latch-queue-mode) has a tip commit f038a474e that adds the flip-then-wait latch-residual test oneandonlydean asked for on #7137 (one suppressed flip, then wait 1.5 s with no further flips/releases, assert no event).

Since this PR removes the latch and the flip end-of-pipe event, that test pins behaviour you're deleting, so it should not be carried over. Flagging it only so you're not surprised by the branch tip differing from the merge commit 9de7cfd9f4.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6292001005 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7978#issuecomment-6292001005). Originally posted by [Lberonio](https://github.com/Lberonio) on 2026-10-20T13:29:09Z. --- Heads-up while you rewrite `testEndOfPipeInterrupts`: the merged #7137 branch (`fix/agc-eop-latch-queue-mode`) has a tip commit `f038a474e` that adds the flip-then-wait latch-residual test oneandonlydean asked for on #7137 (one suppressed flip, then wait 1.5 s with no further flips/releases, assert no event). Since this PR removes the latch and the flip end-of-pipe event, that test pins behaviour you're deleting, so it should not be carried over. Flagging it only so you're not surprised by the branch tip differing from the merge commit `9de7cfd9f4`.
Lberonio commented 2026-10-20 16:05:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Lberonio on 2026-10-20T16:05:42Z.


Ran it on Linux/RADV. Short answer: yes, far further than main, and no fault with or without dismissing the PSN prompt.

Setup. Arch Linux, kernel 7.2.9, GCC 16.2.1, Mesa 26.2.4, RADV on an AMD Radeon RX 9070 XT (1002:7550, GFX1201), Wayland/GNOME. Gran Turismo 7 PPSA01317 v01.680, base package. Same relinked app.elf and same app0 for both builds, only libs/ swapped, so the comparison isolates the driver prx.

build libSceAgcDriver md5 runs result
current main b18eaed1f02864b9088657dd77331548 4 SIGSEGV at 18–22 s, RC=139
this PR 00ba7bec6d 682e06256ff0b27d993719ab971081db 4 no fault, 98–112 s

On main the fault is a null read: under gdb r14 = 0, dereference at +0x48, in a thread whose caller frame is libkernel.prx. That is the same class as the PGL Event / 0x48 / r15 = 0 stop you and frankea reported. It happens 4 of 4 runs, always before GT7 draws anything.

With this PR, GT7 renders real frames and reaches the PlayStation Network prompt. The window title carries a running frame counter, so the captures read:

  • ~30 s: FPS: 10.84 (571)
  • ~60 s: FPS: 54.94 (2374), GT logo loading spinner on screen
  • ~90 s: FPS: 20.45 (4203), the "Failed — You cannot use network functions unless you sign in to PlayStation™Network." dialog with an OK button

So 4,203 frames presented at up to ~55 FPS, well past anything main does.

On the OK click: I ran it once with the dialog dismissed and once left alone. Both end on the same unrelated gap, shader 0x1258e49600 stage 5: sampled image descriptor uses an unsupported format (RC=134, abort), at 98 s with the click and 112 s without. Dismissing the prompt moves the game on into the screen that needs that shader, so it reaches the gap sooner, but there is no null-dereference and no fault in either case.

Two limits on what this shows. I could not get past the sampled-image format gap, and #7256's layered-depth gap is behind that, so nothing past those is tested. And neither run is a real play session; the only input was the single OK click.

Capture from the RADV run:

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6295342861 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7978#issuecomment-6295342861). Originally posted by [Lberonio](https://github.com/Lberonio) on 2026-10-20T16:05:42Z. --- Ran it on Linux/RADV. Short answer: yes, far further than `main`, and no fault with or without dismissing the PSN prompt. **Setup.** Arch Linux, kernel 7.2.9, GCC 16.2.1, Mesa 26.2.4, RADV on an AMD Radeon RX 9070 XT (1002:7550, GFX1201), Wayland/GNOME. Gran Turismo 7 PPSA01317 v01.680, base package. Same relinked `app.elf` and same `app0` for both builds, only `libs/` swapped, so the comparison isolates the driver prx. | build | libSceAgcDriver md5 | runs | result | |---|---|---|---| | current `main` | `b18eaed1f02864b9088657dd77331548` | 4 | SIGSEGV at 18–22 s, RC=139 | | this PR `00ba7bec6d` | `682e06256ff0b27d993719ab971081db` | 4 | no fault, 98–112 s | On `main` the fault is a null read: under gdb `r14 = 0`, dereference at `+0x48`, in a thread whose caller frame is `libkernel.prx`. That is the same class as the `PGL Event` / `0x48` / `r15 = 0` stop you and frankea reported. It happens 4 of 4 runs, always before GT7 draws anything. With this PR, GT7 renders real frames and reaches the PlayStation Network prompt. The window title carries a running frame counter, so the captures read: - ~30 s: `FPS: 10.84 (571)` - ~60 s: `FPS: 54.94 (2374)`, GT logo loading spinner on screen - ~90 s: `FPS: 20.45 (4203)`, the "Failed — You cannot use network functions unless you sign in to PlayStation™Network." dialog with an OK button So 4,203 frames presented at up to ~55 FPS, well past anything `main` does. On the OK click: I ran it once with the dialog dismissed and once left alone. Both end on the same unrelated gap, `shader 0x1258e49600 stage 5: sampled image descriptor uses an unsupported format` (RC=134, abort), at 98 s with the click and 112 s without. Dismissing the prompt moves the game on into the screen that needs that shader, so it reaches the gap sooner, but there is no null-dereference and no fault in either case. Two limits on what this shows. I could not get past the sampled-image format gap, and #7256's layered-depth gap is behind that, so nothing past those is tested. And neither run is a real play session; the only input was the single OK click. Capture from the RADV run:
MarcZX10 commented 2026-10-30 07:07:10 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T07:07:10Z.

Review: CHANGES_REQUESTED


Re-checked — new head, changes requested

The Windows/NVIDIA report shows the reported null-read crash absent in three runs on head 3ca955af52a988a4bebc353b47ba24a4ff97b21a, but that head is based on cccdaa2734a71d27e6c907325c60fdf2d3baf0af while live main is f7f03daf52f11191174b1be089a56e268390a707 and has changed several files this PR touches.

What I ran

Inspected the exact PR head and recorded base, live main, GitHub merge state, changed-file overlap since the recorded base, hosted checks, and the new Windows/NVIDIA report. Environment: Debian Linux x86_64, GitHub CLI/API. No compiler, local build, merge preview, or test was run.

gh api repos/boykopovar/AnyPS5/pulls/7978 --jq '{state:.state,head:.head.sha,base:.base.sha,mergeable:.mergeable,mergeable_state,labels:[.labels[].name]}'
gh api repos/boykopovar/AnyPS5/branches/main --jq '{name:.name,sha:.commit.sha}'
gh api repos/boykopovar/AnyPS5/compare/cccdaa2734a71d27e6c907325c60fdf2d3baf0af...f7f03daf52f11191174b1be089a56e268390a707 --jq '{status,ahead_by,behind_by}'
gh api repos/boykopovar/AnyPS5/compare/cccdaa2734a71d27e6c907325c60fdf2d3baf0af...f7f03daf52f11191174b1be089a56e268390a707 --jq '[.files[]|select(.filename=="core/libs/prx/libSceAgcDriver/Eq/include/Event.hpp" or .filename=="core/libs/prx/libSceAgcDriver/Eq/src/Event.cpp" or .filename=="core/libs/prx/libSceAgcDriver/Eq/src/Query.cpp" or .filename=="core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp" or .filename=="core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp" or .filename=="core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp" or .filename=="core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/QueueWorker.cpp" or .filename=="core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp" or .filename=="core/libs/prx/libSceAgcDriver/tests/Flip.cpp" or .filename=="core/libs/prx/libSceAgcDriver/tests/Submit.cpp" or .filename=="docs/dev/debt/libSceAgcDriver.md")|{filename,additions,deletions}]'
gh run view 40616954913 --repo boykopovar/AnyPS5 --json headSha,headBranch,event,status,conclusion,createdAt,updatedAt
gh pr checks 7978 --repo boykopovar/AnyPS5

Results

Check Result
Current PR state Open at head 3ca955af52a988a4bebc353b47ba24a4ff97b21a; recorded base cccdaa2734a71d27e6c907325c60fdf2d3baf0af; needs rebase label present and GitHub reports dirty
Live target branch main is f7f03daf52f11191174b1be089a56e268390a707, 2,318 commits ahead of the recorded base
Main changes in PR-touched files Event.hpp +2; Event.cpp +48/-31; Driver.hpp +17/-4; PacketExecution.cpp +5; QueueWorker.cpp +26/-8; Submission.cpp +12; Submit.cpp +74/-3
Hosted CI The completed Windows run is for exact PR head 3ca955... and passed; Linux and specialized jobs skipped. It tested the older recorded base, not integration with current main
New runtime report humanityBG reports the null-read crash absent in 3/3 Windows/NVIDIA runs on exact head 3ca955...; this is author-provided evidence, not a run I performed
Unedited API and CI output
{"base":"cccdaa2734a71d27e6c907325c60fdf2d3baf0af","head":"3ca955af52a988a4bebc353b47ba24a4ff97b21a","labels":["needs rebase","docs","agc","fix error","unblocks title"],"mergeable":false,"mergeable_state":"dirty","state":"open"}
{"name":"main","sha":"f7f03daf52f11191174b1be089a56e268390a707"}
{"ahead_by":2318,"behind_by":0,"status":"ahead"}
{"additions":2,"deletions":0,"filename":"core/libs/prx/libSceAgcDriver/Eq/include/Event.hpp"}
{"additions":48,"deletions":31,"filename":"core/libs/prx/libSceAgcDriver/Eq/src/Event.cpp"}
{"additions":17,"deletions":4,"filename":"core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp"}
{"additions":5,"deletions":0,"filename":"core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp"}
{"additions":26,"deletions":8,"filename":"core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/QueueWorker.cpp"}
{"additions":12,"deletions":0,"filename":"core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp"}
{"additions":74,"deletions":3,"filename":"core/libs/prx/libSceAgcDriver/tests/Submit.cpp"}
{"conclusion":"success","createdAt":"2026-10-28T01:45:39Z","event":"pull_request","headBranch":"fix/agc-flip-no-eop-event","headSha":"3ca955af52a988a4bebc353b47ba24a4ff97b21a","status":"completed","updatedAt":"2026-10-28T02:00:58Z"}
conventions	pass	16s
labels	pass	11s
windows	pass	15m7s
linux	skipping	0
register-context	skipping	0
relinker	skipping	0
relinker-asan	skipping	0
write-watch	skipping	0
eligibility	pass	6s
report	pass	28s

Findings

Blocking

  • The branch has not been updated from its recorded base cccdaa... to current main f7f03..., and current main changes multiple files this PR edits. The repository requires branches to stay up to date. The newly reported run and hosted Windows result are useful for the old integration, but do not establish the behavior of the current-main integration.

Non-blocking

The new report says the title proceeds past the null read and later stops on an unsupported render mode attributed to #9020; that is outside this PR's change as reported.

Sources

Not verified

I did not locally preview the merge, run diff or convention checks, build, or run CTest on the current-main integration. I did not independently reproduce the Windows/NVIDIA run or test other GPUs, the console, or the later unsupported render mode.

To get this to a good state

Update the branch to current main and rerun the same focused agc_driver, end-of-pipe, flip, and affected video_out checks on both main and the updated head on the same machine and GPU, with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1, and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Compare the logs for missing layer markers and new VUIDs, then update the test report with the exact new head. I will rerun the relevant non-build checks and reassess the new-head evidence.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5709120216 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7978#pullrequestreview-5709120216). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T07:07:10Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, changes requested The Windows/NVIDIA report shows the reported null-read crash absent in three runs on head `3ca955af52a988a4bebc353b47ba24a4ff97b21a`, but that head is based on `cccdaa2734a71d27e6c907325c60fdf2d3baf0af` while live `main` is `f7f03daf52f11191174b1be089a56e268390a707` and has changed several files this PR touches. ## What I ran Inspected the exact PR head and recorded base, live `main`, GitHub merge state, changed-file overlap since the recorded base, hosted checks, and the new Windows/NVIDIA report. Environment: Debian Linux x86_64, GitHub CLI/API. No compiler, local build, merge preview, or test was run. ```sh gh api repos/boykopovar/AnyPS5/pulls/7978 --jq '{state:.state,head:.head.sha,base:.base.sha,mergeable:.mergeable,mergeable_state,labels:[.labels[].name]}' gh api repos/boykopovar/AnyPS5/branches/main --jq '{name:.name,sha:.commit.sha}' gh api repos/boykopovar/AnyPS5/compare/cccdaa2734a71d27e6c907325c60fdf2d3baf0af...f7f03daf52f11191174b1be089a56e268390a707 --jq '{status,ahead_by,behind_by}' gh api repos/boykopovar/AnyPS5/compare/cccdaa2734a71d27e6c907325c60fdf2d3baf0af...f7f03daf52f11191174b1be089a56e268390a707 --jq '[.files[]|select(.filename=="core/libs/prx/libSceAgcDriver/Eq/include/Event.hpp" or .filename=="core/libs/prx/libSceAgcDriver/Eq/src/Event.cpp" or .filename=="core/libs/prx/libSceAgcDriver/Eq/src/Query.cpp" or .filename=="core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp" or .filename=="core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp" or .filename=="core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp" or .filename=="core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/QueueWorker.cpp" or .filename=="core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp" or .filename=="core/libs/prx/libSceAgcDriver/tests/Flip.cpp" or .filename=="core/libs/prx/libSceAgcDriver/tests/Submit.cpp" or .filename=="docs/dev/debt/libSceAgcDriver.md")|{filename,additions,deletions}]' gh run view 40616954913 --repo boykopovar/AnyPS5 --json headSha,headBranch,event,status,conclusion,createdAt,updatedAt gh pr checks 7978 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | |---|---| | Current PR state | Open at head `3ca955af52a988a4bebc353b47ba24a4ff97b21a`; recorded base `cccdaa2734a71d27e6c907325c60fdf2d3baf0af`; `needs rebase` label present and GitHub reports `dirty` | | Live target branch | `main` is `f7f03daf52f11191174b1be089a56e268390a707`, 2,318 commits ahead of the recorded base | | Main changes in PR-touched files | `Event.hpp` +2; `Event.cpp` +48/-31; `Driver.hpp` +17/-4; `PacketExecution.cpp` +5; `QueueWorker.cpp` +26/-8; `Submission.cpp` +12; `Submit.cpp` +74/-3 | | Hosted CI | The completed Windows run is for exact PR head `3ca955...` and passed; Linux and specialized jobs skipped. It tested the older recorded base, not integration with current `main` | | New runtime report | `humanityBG` reports the null-read crash absent in 3/3 Windows/NVIDIA runs on exact head `3ca955...`; this is author-provided evidence, not a run I performed | <details> <summary>Unedited API and CI output</summary> ```text {"base":"cccdaa2734a71d27e6c907325c60fdf2d3baf0af","head":"3ca955af52a988a4bebc353b47ba24a4ff97b21a","labels":["needs rebase","docs","agc","fix error","unblocks title"],"mergeable":false,"mergeable_state":"dirty","state":"open"} {"name":"main","sha":"f7f03daf52f11191174b1be089a56e268390a707"} {"ahead_by":2318,"behind_by":0,"status":"ahead"} {"additions":2,"deletions":0,"filename":"core/libs/prx/libSceAgcDriver/Eq/include/Event.hpp"} {"additions":48,"deletions":31,"filename":"core/libs/prx/libSceAgcDriver/Eq/src/Event.cpp"} {"additions":17,"deletions":4,"filename":"core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp"} {"additions":5,"deletions":0,"filename":"core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp"} {"additions":26,"deletions":8,"filename":"core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/QueueWorker.cpp"} {"additions":12,"deletions":0,"filename":"core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp"} {"additions":74,"deletions":3,"filename":"core/libs/prx/libSceAgcDriver/tests/Submit.cpp"} {"conclusion":"success","createdAt":"2026-10-28T01:45:39Z","event":"pull_request","headBranch":"fix/agc-flip-no-eop-event","headSha":"3ca955af52a988a4bebc353b47ba24a4ff97b21a","status":"completed","updatedAt":"2026-10-28T02:00:58Z"} conventions pass 16s labels pass 11s windows pass 15m7s linux skipping 0 register-context skipping 0 relinker skipping 0 relinker-asan skipping 0 write-watch skipping 0 eligibility pass 6s report pass 28s ``` </details> ## Findings ### Blocking - The branch has not been updated from its recorded base `cccdaa...` to current `main` `f7f03...`, and current `main` changes multiple files this PR edits. The repository requires branches to stay up to date. The newly reported run and hosted Windows result are useful for the old integration, but do not establish the behavior of the current-main integration. ### Non-blocking The new report says the title proceeds past the null read and later stops on an unsupported render mode attributed to #9020; that is outside this PR's change as reported. ## Sources - [Current PR implementation and tests](https://github.com/boykopovar/AnyPS5/tree/3ca955af52a988a4bebc353b47ba24a4ff97b21a) - [Live `main`](https://github.com/boykopovar/AnyPS5/commit/f7f03daf52f11191174b1be089a56e268390a707) - [Branch freshness rule](https://github.com/boykopovar/AnyPS5/blob/f7f03daf52f11191174b1be089a56e268390a707/CONTRIBUTING.md#L60) - [AGC validation requirements](https://github.com/boykopovar/AnyPS5/blob/f7f03daf52f11191174b1be089a56e268390a707/AGENTS.md#L15) - [New Windows/NVIDIA test report](https://github.com/boykopovar/AnyPS5/pull/7978#issuecomment-6516778247) - [Changed-file comparison](https://github.com/boykopovar/AnyPS5/compare/cccdaa2734a71d27e6c907325c60fdf2d3baf0af...f7f03daf52f11191174b1be089a56e268390a707) ## Not verified I did not locally preview the merge, run diff or convention checks, build, or run CTest on the current-main integration. I did not independently reproduce the Windows/NVIDIA run or test other GPUs, the console, or the later unsupported render mode. ## To get this to a good state Update the branch to current `main` and rerun the same focused `agc_driver`, end-of-pipe, flip, and affected `video_out` checks on both `main` and the updated head on the same machine and GPU, with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1`, and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`. Compare the logs for missing layer markers and new VUIDs, then update the test report with the exact new head. I will rerun the relevant non-build checks and reassess the new-head evidence.
XairRrR commented 2026-11-03 08:45:37 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T08:45:37Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

This pull request does not merge cleanly into main (4f41f4c375): head 612ceb75d74ebebe156b6eaf007c9fe112e1f252 conflicts in

  • core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp

Please rebase it onto current main. I will review the change once it merges cleanly.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5749262193 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7978#pullrequestreview-5749262193). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T08:45:37Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested This pull request does not merge cleanly into `main` (4f41f4c375f5abb487dbd184fbc150f31994d762): head 612ceb75d74ebebe156b6eaf007c9fe112e1f252 conflicts in - `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp` Please rebase it onto current `main`. I will review the change once it merges cleanly. <!-- anyps5-bots job=3210 head=612ceb75d74ebebe156b6eaf007c9fe112e1f252 -->
XairRrR commented 2026-11-03 10:55:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T10:55:20Z.

Review: CHANGES_REQUESTED


Re-checked — changes still requested

The new head a3a6f4a5 only merges main 4f41f4c375 (one mechanical conflict in PacketExecution.cpp). It merges cleanly, builds, and the focused AGC tests pass. However, the second flip hold that oneandonlydean reported as deadlocking video_out_flip_deferred is unchanged at this head and has had no reply.

What changed since my last review

I have no text from my previous review, so I reviewed the whole change again.

  • New commit: only a3a6f4a5 ("Merge main 4f41f4c375 into #7978"), on top of 612ceb75. The merge drops the flipInterruptDeferred local and keeps main's Graphics::StorageTexture::NoteFlip() call. Comparing 612ceb75..a3a6f4a5 over the PR's driver sources shows only main's own changes in Eq/src/Event.cpp and QueueWorker.cpp. The PR's logic is unchanged.
  • No reply from the author since oneandonlydean's comment of 2026-11-02 12:08 about video_out_flip_deferred.
  • Two GPU CI reports on 612ceb75: NVIDIA RTX 2000 Ada and AMD RX 6300. Both report 0 new failures. They are Linux runs, where the video_out_flip_* tests skip.

What I ran

Head a3a6f4a5cb4e079f6818639edc597663e021ae89, main 4f41f4c375f5abb487dbd184fbc150f31994d762, merged tree 38b2a2505799bb88222e1f7d85771f3acd40a7eb. The machine is Debian 13 (VM, 32 vCPU), GCC 14.2.0, and lavapipe (Mesa 26.1.6, LLVM 19), with no GPU.

git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...a3a6f4a5cb4e079f6818639edc597663e021ae89
python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762
git diff --stat 612ceb75d74ebebe156b6eaf007c9fe112e1f252 a3a6f4a5cb4e079f6818639edc597663e021ae89 -- <PR driver sources>
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(agc_driver|agc_driver_eop_interrupts|agc_driver_flip|agc_driver_flip_compute|video_out_flip_deferred|video_out_flip_lifetime)$"
# negative control: the 8 production files restored from main
git show 4f41f4c375f5abb487dbd184fbc150f31994d762:<path> > <path>
ninja -C build -j32 -l32 agc_driver_tests agc_driver_flip_tests
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(agc_driver|agc_driver_eop_interrupts|agc_driver_flip)$"
build/tests/agc_driver_flip_tests
build/tests/agc_driver_tests --eop-interrupts
# restore
git show 38b2a2505799bb88222e1f7d85771f3acd40a7eb:<path> > <path>
ninja -C build -j32 -l32 agc_driver_tests agc_driver_flip_tests libs
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 -R "^(agc_driver|agc_driver_eop_interrupts|agc_driver_flip)$"
git status --porcelain
Check Result
git diff --check clean
check_conventions.py "All conventions checks passed."
Build and libs (script) ok
Selected tests (script) 2169 run, 0 new failures, 0 timeouts; 7 known failures that also fail on main
Validation (script) layer loaded in 769 of 770 tests. The only new VUID is VUID-vkCmdDispatch-groupCountX-00386 in agc_driver_native_depth_uniform_planes. That test is absent at baseline d1ae628b and was added on main before 4f41f4c3. The PR does not touch dispatch or depth, so this VUID is not counted against it
agc_driver, agc_driver_eop_interrupts, agc_driver_flip, agc_driver_flip_compute pass
video_out_flip_deferred, video_out_flip_lifetime skipped (no display or Vulkan window on this machine)
Worktree after restore git status --porcelain empty

Negative control

I restored the 8 production files (Eq/include/Event.hpp, Eq/src/Event.cpp, Eq/src/Query.cpp, Driver.hpp, PacketExecution.cpp, PacketMemory.cpp, QueueWorker.cpp, Submission.cpp) from main and kept the PR's tests. All three changed tests then fail:

  • agc_driver: "graphics event type is not the event data"
  • agc_driver_eop_interrupts: "a flip raised the graphics end-of-pipe event"
  • agc_driver_flip: "a flip was accepted before the previous flip submission completed"

With the merged files restored and rebuilt, all three pass again.

Previous findings

I have no text of my previous review, so I can't list its findings one by one. The open points from other reviewers:

  • MarcZX10's "branch not updated to current main": resolved. The head merges cleanly onto main 4f41f4c375 and builds.
  • oneandonlydean's video_out_flip_deferred deadlock: still open. The code at core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp:284-291 is unchanged at this head. It is listed below as a new blocking finding because this is my first written record of it.

New findings

Blocking

  • A command-buffer flip now blocks the submitting thread until the previous flip's output callback returns, which deadlocks video_out_flip_deferred. This is at core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp:284-291. After the flipsAhead == 0 wait, a non-CPU flip also waits for flipWorkOpen == 0 and then for the recorded GPU work (waitFlipWork).
    • flipWorkOpen only drops in finishFlipWork, which runs after execute has passed flipHold.Release() and GpuReady (PacketExecution.cpp:461-462).
    • In core/libs/prx/libSceVideoOut/tests/Flip.cpp:205-215, the first flip goes to a Gate output whose GpuReady blocks until gate->Release(). The test only reaches that call after the second sceAgcDriverSubmitDcb (line 208) returns, so the two threads wait on each other.
    • I confirm oneandonlydean's analysis by reading the code. I could not run the test here because it skips without a display; the Windows failure is maintainer-reported.
    • This also contradicts the description's "the next flip is still released before presentation as before": that holds for flipsAhead, but the new wait still covers the previous flip's GpuReady. The real FlipRequest::GpuReady only returns early when APS5_SYNC_FLIP is unset.
    • Suggested fix: stop counting a flip submission as open work once the worker has handed its flip to the output. For example, take the work serial for the hold before GpuReady, or end the second wait at flipHold.Release() with the serial recorded up to that point. Then the title waits only for GPU work, not for presenter callbacks. If the PR keeps the wait, change testDeferredBuffer so it still checks that a flip submitted before its buffer is registered is accepted and presents after registration. Either way, the question needs an answer.

Non-blocking

  • The context is decoded twice. At core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp:597, the context is recomputed as packet[7] & 0x0fffffffu. releaseInterrupt already validated it and passed it to preparePacketMemory (line 396), where the bounds and typed-bit checks live. Passing the returned std::optional value through would keep one decode site.
  • EV_CLEAR now keeps only the newest interrupt's data. Two interrupts on one registration before a wait now give one event with the newer context (testEndOfPipeLabelsWithoutWork expects 0x12), where it used to give a count. A title that indexes a handler table by context would miss the first one. Whether the console's kernel coalesces these the same way isn't stated in the description or in the debt entry. Consider adding it to the sceAgcDriverGetEqContextId debt entry as unmeasured.

Not verified

  • video_out_flip_deferred and the other video_out_flip_* tests: they skip here (no display or Vulkan window). The Windows failure is maintainer-reported; I confirmed the cause from the code only.
  • Title results (Death Stranding 2, Gran Turismo 7, Minecraft, Astro's Playroom) and the NVIDIA, RADV and Windows matrices are author- or tester-reported. I did not reproduce them.
  • Performance: I did not measure the cost of the title thread now waiting on, and reaping, the previous flip submission's GPU work on each command-buffer flip.

To get this to a good state

  1. Address the second flip hold in holdFlipBehindWorker so a submit does not wait for the previous flip's output callback, or explain why it must, and adapt testDeferredBuffer while keeping what it checks.
  2. Reply to oneandonlydean's comment.
  3. Rerun video_out_flip_deferred and the other video_out_flip_* tests on a host where they don't skip (Windows, or Xvfb with SDL's x11 driver), on main and on the new head.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5750925882 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7978#pullrequestreview-5750925882). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T10:55:20Z. **Review:** CHANGES_REQUESTED --- # Re-checked — changes still requested The new head `a3a6f4a5` only merges `main` 4f41f4c375 (one mechanical conflict in `PacketExecution.cpp`). It merges cleanly, builds, and the focused AGC tests pass. However, the second flip hold that oneandonlydean reported as deadlocking `video_out_flip_deferred` is unchanged at this head and has had no reply. ## What changed since my last review I have no text from my previous review, so I reviewed the whole change again. - **New commit:** only `a3a6f4a5` ("Merge main 4f41f4c375 into #7978"), on top of `612ceb75`. The merge drops the `flipInterruptDeferred` local and keeps `main`'s `Graphics::StorageTexture::NoteFlip()` call. Comparing `612ceb75..a3a6f4a5` over the PR's driver sources shows only `main`'s own changes in `Eq/src/Event.cpp` and `QueueWorker.cpp`. The PR's logic is unchanged. - **No reply from the author** since oneandonlydean's comment of 2026-11-02 12:08 about `video_out_flip_deferred`. - **Two GPU CI reports on `612ceb75`:** NVIDIA RTX 2000 Ada and AMD RX 6300. Both report 0 new failures. They are Linux runs, where the `video_out_flip_*` tests skip. ## What I ran Head `a3a6f4a5cb4e079f6818639edc597663e021ae89`, `main` `4f41f4c375f5abb487dbd184fbc150f31994d762`, merged tree `38b2a2505799bb88222e1f7d85771f3acd40a7eb`. The machine is Debian 13 (VM, 32 vCPU), GCC 14.2.0, and lavapipe (Mesa 26.1.6, LLVM 19), with no GPU. ```sh git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...a3a6f4a5cb4e079f6818639edc597663e021ae89 python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762 git diff --stat 612ceb75d74ebebe156b6eaf007c9fe112e1f252 a3a6f4a5cb4e079f6818639edc597663e021ae89 -- <PR driver sources> ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(agc_driver|agc_driver_eop_interrupts|agc_driver_flip|agc_driver_flip_compute|video_out_flip_deferred|video_out_flip_lifetime)$" # negative control: the 8 production files restored from main git show 4f41f4c375f5abb487dbd184fbc150f31994d762:<path> > <path> ninja -C build -j32 -l32 agc_driver_tests agc_driver_flip_tests ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(agc_driver|agc_driver_eop_interrupts|agc_driver_flip)$" build/tests/agc_driver_flip_tests build/tests/agc_driver_tests --eop-interrupts # restore git show 38b2a2505799bb88222e1f7d85771f3acd40a7eb:<path> > <path> ninja -C build -j32 -l32 agc_driver_tests agc_driver_flip_tests libs ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 -R "^(agc_driver|agc_driver_eop_interrupts|agc_driver_flip)$" git status --porcelain ``` | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | "All conventions checks passed." | | Build and `libs` (script) | ok | | Selected tests (script) | 2169 run, 0 new failures, 0 timeouts; 7 known failures that also fail on `main` | | Validation (script) | layer loaded in 769 of 770 tests. The only new VUID is `VUID-vkCmdDispatch-groupCountX-00386` in `agc_driver_native_depth_uniform_planes`. That test is absent at baseline `d1ae628b` and was added on `main` before `4f41f4c3`. The PR does not touch dispatch or depth, so this VUID is not counted against it | | `agc_driver`, `agc_driver_eop_interrupts`, `agc_driver_flip`, `agc_driver_flip_compute` | pass | | `video_out_flip_deferred`, `video_out_flip_lifetime` | skipped (no display or Vulkan window on this machine) | | Worktree after restore | `git status --porcelain` empty | ## Negative control I restored the 8 production files (`Eq/include/Event.hpp`, `Eq/src/Event.cpp`, `Eq/src/Query.cpp`, `Driver.hpp`, `PacketExecution.cpp`, `PacketMemory.cpp`, `QueueWorker.cpp`, `Submission.cpp`) from `main` and kept the PR's tests. All three changed tests then fail: - `agc_driver`: "graphics event type is not the event data" - `agc_driver_eop_interrupts`: "a flip raised the graphics end-of-pipe event" - `agc_driver_flip`: "a flip was accepted before the previous flip submission completed" With the merged files restored and rebuilt, all three pass again. ## Previous findings I have no text of my previous review, so I can't list its findings one by one. The open points from other reviewers: - **MarcZX10's "branch not updated to current `main`": resolved.** The head merges cleanly onto `main` 4f41f4c375 and builds. - **oneandonlydean's `video_out_flip_deferred` deadlock: still open.** The code at `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp:284-291` is unchanged at this head. It is listed below as a new blocking finding because this is my first written record of it. ## New findings ### Blocking - **A command-buffer flip now blocks the submitting thread until the previous flip's output callback returns, which deadlocks `video_out_flip_deferred`.** This is at `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp:284-291`. After the `flipsAhead == 0` wait, a non-CPU flip also waits for `flipWorkOpen == 0` and then for the recorded GPU work (`waitFlipWork`). - `flipWorkOpen` only drops in `finishFlipWork`, which runs after `execute` has passed `flipHold.Release()` and `GpuReady` (`PacketExecution.cpp:461-462`). - In `core/libs/prx/libSceVideoOut/tests/Flip.cpp:205-215`, the first flip goes to a `Gate` output whose `GpuReady` blocks until `gate->Release()`. The test only reaches that call after the second `sceAgcDriverSubmitDcb` (line 208) returns, so the two threads wait on each other. - I confirm oneandonlydean's analysis by reading the code. I could not run the test here because it skips without a display; the Windows failure is maintainer-reported. - This also contradicts the description's "the next flip is still released before presentation as before": that holds for `flipsAhead`, but the new wait still covers the previous flip's `GpuReady`. The real `FlipRequest::GpuReady` only returns early when `APS5_SYNC_FLIP` is unset. - Suggested fix: stop counting a flip submission as open work once the worker has handed its flip to the output. For example, take the work serial for the hold before `GpuReady`, or end the second wait at `flipHold.Release()` with the serial recorded up to that point. Then the title waits only for GPU work, not for presenter callbacks. If the PR keeps the wait, change `testDeferredBuffer` so it still checks that a flip submitted before its buffer is registered is accepted and presents after registration. Either way, the question needs an answer. ### Non-blocking - **The context is decoded twice.** At `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp:597`, the context is recomputed as `packet[7] & 0x0fffffffu`. `releaseInterrupt` already validated it and passed it to `preparePacketMemory` (line 396), where the bounds and typed-bit checks live. Passing the returned `std::optional` value through would keep one decode site. - **EV_CLEAR now keeps only the newest interrupt's data.** Two interrupts on one registration before a wait now give one event with the newer context (`testEndOfPipeLabelsWithoutWork` expects `0x12`), where it used to give a count. A title that indexes a handler table by context would miss the first one. Whether the console's kernel coalesces these the same way isn't stated in the description or in the debt entry. Consider adding it to the `sceAgcDriverGetEqContextId` debt entry as unmeasured. ## Not verified - **`video_out_flip_deferred` and the other `video_out_flip_*` tests:** they skip here (no display or Vulkan window). The Windows failure is maintainer-reported; I confirmed the cause from the code only. - **Title results** (Death Stranding 2, Gran Turismo 7, Minecraft, Astro's Playroom) and the NVIDIA, RADV and Windows matrices are author- or tester-reported. I did not reproduce them. - **Performance:** I did not measure the cost of the title thread now waiting on, and reaping, the previous flip submission's GPU work on each command-buffer flip. ## To get this to a good state 1. Address the second flip hold in `holdFlipBehindWorker` so a submit does not wait for the previous flip's output callback, or explain why it must, and adapt `testDeferredBuffer` while keeping what it checks. 2. Reply to oneandonlydean's comment. 3. Rerun `video_out_flip_deferred` and the other `video_out_flip_*` tests on a host where they don't skip (Windows, or Xvfb with SDL's x11 driver), on `main` and on the new head. <!-- anyps5-bots job=3287 head=a3a6f4a5cb4e079f6818639edc597663e021ae89 -->
XairRrR commented 2026-11-03 14:09:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T14:09:48Z.

Review: APPROVED


Re-checked — approved

The new head 04f94904 rebases the branch onto main 4f41f4c375 and replaces the merge commit. It adds one test commit that holds video_out_flip_deferred's flip behind a GPU WAIT_REG_MEM instead of a Gate output callback. The author has explained why the second flip hold stays, and the code supports that explanation, so my blocking finding is resolved.

What changed since my last review

  • History: the branch was rebased onto main 4f41f4c375 in place of merge commit a3a6f4a5. The range-diff shows that commits 2, 4, 5, 6 and 7 are identical. Commits 1, 3 and 8 differ only in context from main (the RingOrder/NoteFlip neighbours, and nearby debt entries that main added). The PR's driver logic is unchanged.
  • New commit 04f94904 (test(videoout): ...):
    • testDeferredBuffer now submits one command buffer: a WAIT_REG_MEM on a host label, then the flip. The test writes the label after sceVideoOutRegisterBuffers2. The Gate on output 7 is gone from this test.
    • The commit also removes AgcDriverUnregisterVideoOutput_nid_postfix(7, gate) from testLifetime (see the new non-blocking finding).
  • Author reply (2026-11-03 13:45) to oneandonlydean and to me:
    • The second wait is kept on purpose for Minecraft's after-flip label.
    • A real GpuReady only queues the request, so it never waits on the title.
    • video_out_flip_deferred aborts at a3a6f4a5 and passes at 04f94904, 3 of 3 each, on an RTX 5080 with SDL's Wayland driver (author-reported).
  • Description: a new "Tested" paragraph covers this rebase.

What I ran

Head 04f94904874156111efea0000631c4839fdeb554, main 4f41f4c375f5abb487dbd184fbc150f31994d762, merged tree a178dbdc01b93a90c6d151eeedf7ddbba48e57fb. The machine is Debian 13 (VM, 32 vCPU), GCC 14.2.0 and lavapipe (Mesa 26.1.6), with no GPU and no display.

git show 04f94904874156111efea0000631c4839fdeb554
git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...04f94904874156111efea0000631c4839fdeb554
python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(agc_driver|agc_driver_eop_interrupts|agc_driver_flip|agc_driver_flip_compute|video_out_flip_deferred|video_out_flip_lifetime|video_out_flip_reopen|video_out_flip_cpuflip)$"
git status --porcelain
Check Result
git diff --check clean
check_conventions.py "All conventions checks passed."
Build and libs (script) ok
Selected tests (script) 2153 run, 0 new failures, 0 timeouts. 7 known failures also fail on main (denormal and division tests, vector_constant_factor_tininess, one unwrap test)
Validation (script) layer loaded in 769 of 770 tests, no layer missing, 0 tests with new VUIDs compared with main 4f41f4c3
agc_driver, agc_driver_eop_interrupts, agc_driver_flip, agc_driver_flip_compute pass (11.4 s at most)
video_out_flip_deferred, _lifetime, _reopen, _cpuflip skipped: no display or Vulkan window on this machine, and no Xvfb
Worktree git status --porcelain empty

Negative control

None for the changed test. video_out_flip_deferred skips on this machine, and the change adapts that test to the PR rather than adding a regression test for it. The author reports that it aborts with test gate timed out at a3a6f4a5 and passes at 04f94904. I accept that as author-reported.

The tests that check the PR's own behaviour (agc_driver, agc_driver_eop_interrupts, agc_driver_flip) are byte-identical to the previous head. My earlier negative control showed all three fail with the production files restored from main. They pass here on the rebased tree.

Previous findings

  • Blocking — the second flip hold deadlocks video_out_flip_deferred (Submission.cpp:284-291): Resolved. I concede the author's point:
    • The wait at core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp:284-291 still covers the previous flip's GpuReady. A deadlock needs a GpuReady that waits on the submitting thread, though.
    • In the real FlipRequest::GpuReady (core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp:314-317), the request is queued and GpuReady returns. With APS5_SYNC_FLIP it waits only for gpuComplete, failure or close, which is presenter progress, not the title.
    • The hold also ends when the worker waits on the title (queue0AwaitsTitle).
    • The rewritten test (core/libs/prx/libSceVideoOut/tests/Flip.cpp:197-225) still checks what it was written for. The flip is submitted while the GPU is held on a label (WAIT_REG_MEM with function 3 and memory space, the same encoding as GatedDispatchCapture.cpp). The buffer is registered next, and only then is the label released. The test then expects the flip to present buffer 0 with arg 3. I could not run it here.
  • Non-blocking — context decoded twice (PacketExecution.cpp:597): Still open. deliverGuestEopInterrupt(submission.queue, packet[7] & 0x0fffffffu) still recomputes what releaseInterrupt (line 134) already validated. This does not block the merge.
  • Non-blocking — EV_CLEAR keeps only the newest interrupt's context, not recorded as unmeasured: Still open. The debt file has no wording on coalescing. This does not block the merge.

New findings

Blocking

None.

Non-blocking

  • testLifetime no longer unregisters its gate output. In core/libs/prx/libSceVideoOut/tests/Flip.cpp:111-125, commit 04f94904 drops AgcDriverUnregisterVideoOutput_nid_postfix(7, gate) from testLifetime. That function is used by video_out_flip_lifetime and _reopen, which this PR does not otherwise touch, and the commit message only covers testDeferredBuffer.
    • Output 7 now stays registered until LibcRunShutdown_nid_postfix, and Driver::UnregisterVideoOutput's registration check is no longer run on this path.
    • Each mode runs in its own process, so this probably has no effect.
    • Suggested fix: restore the line. If it was removed because it now fails or blocks, say why in the PR.

Not verified

  • video_out_flip_* tests: none of them ran here (no display or Vulkan window). The deferred test's before/after result and "all 26 modes pass" are author-reported (RTX 5080, SDL Wayland).
  • Title results (Death Stranding 2, Gran Turismo 7, Minecraft, Astro's Playroom) and the NVIDIA, RADV and Windows runs are author- or tester-reported.
  • Cost of the hold: I did not measure what it costs a title thread to wait on, and reap, the previous flip submission's GPU work on each command-buffer flip.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5753587929 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7978#pullrequestreview-5753587929). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T14:09:48Z. **Review:** APPROVED --- # Re-checked — approved The new head `04f94904` rebases the branch onto `main` 4f41f4c375 and replaces the merge commit. It adds one test commit that holds `video_out_flip_deferred`'s flip behind a GPU `WAIT_REG_MEM` instead of a `Gate` output callback. The author has explained why the second flip hold stays, and the code supports that explanation, so my blocking finding is resolved. ## What changed since my last review - **History:** the branch was rebased onto `main` 4f41f4c375 in place of merge commit `a3a6f4a5`. The range-diff shows that commits 2, 4, 5, 6 and 7 are identical. Commits 1, 3 and 8 differ only in context from `main` (the `RingOrder`/`NoteFlip` neighbours, and nearby debt entries that `main` added). The PR's driver logic is unchanged. - **New commit `04f94904`** (`test(videoout): ...`): - `testDeferredBuffer` now submits one command buffer: a `WAIT_REG_MEM` on a host label, then the flip. The test writes the label after `sceVideoOutRegisterBuffers2`. The `Gate` on output 7 is gone from this test. - The commit also removes `AgcDriverUnregisterVideoOutput_nid_postfix(7, gate)` from `testLifetime` (see the new non-blocking finding). - **Author reply (2026-11-03 13:45)** to oneandonlydean and to me: - The second wait is kept on purpose for Minecraft's after-flip label. - A real `GpuReady` only queues the request, so it never waits on the title. - `video_out_flip_deferred` aborts at `a3a6f4a5` and passes at `04f94904`, 3 of 3 each, on an RTX 5080 with SDL's Wayland driver (author-reported). - **Description:** a new "Tested" paragraph covers this rebase. ## What I ran Head `04f94904874156111efea0000631c4839fdeb554`, `main` `4f41f4c375f5abb487dbd184fbc150f31994d762`, merged tree `a178dbdc01b93a90c6d151eeedf7ddbba48e57fb`. The machine is Debian 13 (VM, 32 vCPU), GCC 14.2.0 and lavapipe (Mesa 26.1.6), with no GPU and no display. ```sh git show 04f94904874156111efea0000631c4839fdeb554 git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...04f94904874156111efea0000631c4839fdeb554 python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(agc_driver|agc_driver_eop_interrupts|agc_driver_flip|agc_driver_flip_compute|video_out_flip_deferred|video_out_flip_lifetime|video_out_flip_reopen|video_out_flip_cpuflip)$" git status --porcelain ``` | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | "All conventions checks passed." | | Build and `libs` (script) | ok | | Selected tests (script) | 2153 run, 0 new failures, 0 timeouts. 7 known failures also fail on `main` (denormal and division tests, `vector_constant_factor_tininess`, one unwrap test) | | Validation (script) | layer loaded in 769 of 770 tests, no layer missing, 0 tests with new VUIDs compared with `main` 4f41f4c3 | | `agc_driver`, `agc_driver_eop_interrupts`, `agc_driver_flip`, `agc_driver_flip_compute` | pass (11.4 s at most) | | `video_out_flip_deferred`, `_lifetime`, `_reopen`, `_cpuflip` | skipped: no display or Vulkan window on this machine, and no Xvfb | | Worktree | `git status --porcelain` empty | ## Negative control None for the changed test. `video_out_flip_deferred` skips on this machine, and the change adapts that test to the PR rather than adding a regression test for it. The author reports that it aborts with `test gate timed out` at `a3a6f4a5` and passes at `04f94904`. I accept that as author-reported. The tests that check the PR's own behaviour (`agc_driver`, `agc_driver_eop_interrupts`, `agc_driver_flip`) are byte-identical to the previous head. My earlier negative control showed all three fail with the production files restored from `main`. They pass here on the rebased tree. ## Previous findings - **Blocking — the second flip hold deadlocks `video_out_flip_deferred` (`Submission.cpp:284-291`): Resolved.** I concede the author's point: - The wait at `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp:284-291` still covers the previous flip's `GpuReady`. A deadlock needs a `GpuReady` that waits on the submitting thread, though. - In the real `FlipRequest::GpuReady` (`core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp:314-317`), the request is queued and `GpuReady` returns. With `APS5_SYNC_FLIP` it waits only for `gpuComplete`, failure or close, which is presenter progress, not the title. - The hold also ends when the worker waits on the title (`queue0AwaitsTitle`). - The rewritten test (`core/libs/prx/libSceVideoOut/tests/Flip.cpp:197-225`) still checks what it was written for. The flip is submitted while the GPU is held on a label (`WAIT_REG_MEM` with function 3 and memory space, the same encoding as `GatedDispatchCapture.cpp`). The buffer is registered next, and only then is the label released. The test then expects the flip to present buffer 0 with arg 3. I could not run it here. - **Non-blocking — context decoded twice (`PacketExecution.cpp:597`): Still open.** `deliverGuestEopInterrupt(submission.queue, packet[7] & 0x0fffffffu)` still recomputes what `releaseInterrupt` (line 134) already validated. This does not block the merge. - **Non-blocking — EV_CLEAR keeps only the newest interrupt's context, not recorded as unmeasured: Still open.** The debt file has no wording on coalescing. This does not block the merge. ## New findings ### Blocking None. ### Non-blocking - **`testLifetime` no longer unregisters its gate output.** In `core/libs/prx/libSceVideoOut/tests/Flip.cpp:111-125`, commit `04f94904` drops `AgcDriverUnregisterVideoOutput_nid_postfix(7, gate)` from `testLifetime`. That function is used by `video_out_flip_lifetime` and `_reopen`, which this PR does not otherwise touch, and the commit message only covers `testDeferredBuffer`. - Output 7 now stays registered until `LibcRunShutdown_nid_postfix`, and `Driver::UnregisterVideoOutput`'s registration check is no longer run on this path. - Each mode runs in its own process, so this probably has no effect. - Suggested fix: restore the line. If it was removed because it now fails or blocks, say why in the PR. ## Not verified - **`video_out_flip_*` tests:** none of them ran here (no display or Vulkan window). The deferred test's before/after result and "all 26 modes pass" are author-reported (RTX 5080, SDL Wayland). - **Title results** (Death Stranding 2, Gran Turismo 7, Minecraft, Astro's Playroom) and the NVIDIA, RADV and Windows runs are author- or tester-reported. - **Cost of the hold:** I did not measure what it costs a title thread to wait on, and reap, the previous flip submission's GPU work on each command-buffer flip. <!-- anyps5-bots job=3370 head=04f94904874156111efea0000631c4839fdeb554 -->
XairRrR commented 2026-11-03 21:38:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T21:38:23Z.

Review: APPROVED


Re-checked — approved

The only new commit is 7ceffb39, a merge of main 086c0686c8 into 04f94904 by oneandonlydean. The PR's nine commits are identical to the ones I last reviewed, and both conflict resolutions in the merge keep both sides correctly.

What changed since my last review

  • PR commits: none changed. The range-diff shows commits 1 to 9 identical (=).
  • Merge commit 7ceffb39: git show --cc shows two hand-resolved hunks.
    • PacketExecution.cpp, the pipelined label/DMA condition: keeps the PR's enqueueLabelPacket(..., releaseInterrupt(packet, opcode, false)) and adds main's new || enqueueConstantRamDump(...). That is correct.
    • docs/dev/debt/libSceAgcDriver.md: keeps the PR's removal of the "Flip packets raise the graphics end-of-pipe event" entry and adds main's new "Host imports across devices" entry. That is correct.
    • Driver.hpp, PacketMemory.cpp and libSceVideoOut/tests/Flip.cpp take main's changes without conflict. main added enqueueConstantRamDump and commitStore, and a reopen check in testLifetime.
    • Every interrupt delivery in the merged tree still goes through deliverGuestEopInterrupt(queue, context) (PacketMemory.cpp:97, :537, :540, PacketExecution.cpp:597). Nothing from main brings back a flip-raised event or the old bool signature of commitLabel.
  • Description and discussion: no author changes since my last review. oneandonlydean reports that all 28 video_out_flip_* tests pass on Windows 11 at 04f94904 merged into main 4f41f4c375 (tester-reported).

What I ran

Head 7ceffb3974b59b6515ef021e010a78298510767b, main 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24, merged tree 4678edbe247f4ae0a7d2d3f64b0b9cd714d2b036. Debian 13 VM, GCC 14.2.0, lavapipe (Mesa 26.1.6), no GPU and no display.

git log --format="%H %P %s" -3 7ceffb3974b59b6515ef021e010a78298510767b
git show --cc 7ceffb3974b59b6515ef021e010a78298510767b
git diff --check 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24...7ceffb3974b59b6515ef021e010a78298510767b
python3 tools/check_conventions.py --base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24
ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(agc_driver|agc_driver_eop_interrupts|agc_driver_flip|agc_driver_flip_compute|agc_driver_submit|video_out_flip_deferred|video_out_flip_lifetime)$"
git status --porcelain
Check Result
git diff --check clean
check_conventions.py "All conventions checks passed."
Build and libs (script) ok
Selected tests (script) 2180 run, 0 new failures, 0 timeouts. The 7 known failures also fail on main (denormal and division tests, vector_constant_factor_tininess, one unwrap test)
agc_driver, agc_driver_eop_interrupts, agc_driver_flip, agc_driver_flip_compute pass (11.6 s at most)
video_out_flip_deferred, video_out_flip_lifetime skipped (no display or Vulkan window)
Validation (script) layer loaded in 782 of 783 tests, none missing. One test has new VUIDs, see below
Worktree git status --porcelain empty

The one validation difference is not from this PR. agc_driver_image_gather_volume reports VUID-VkSamplerCreateInfo-addressModeU-01079 and the addressMode{U,V,W}-parameter VUIDs. Every line is marked "test not run on main": the test does not exist in the older validation baseline (1e658521) and came in from main. This PR changes no sampler, image or shader code (its 12 files are the end-of-pipe event, the flip hold, their tests and the debt doc), so I do not count it against the PR.

Negative control

Not repeated. The PR's tests are byte-identical to the previously reviewed head. My earlier control showed agc_driver, agc_driver_eop_interrupts and agc_driver_flip fail with the production files restored from main. All three pass on this merged tree.

Previous findings

  • Non-blocking — context decoded twice (PacketExecution.cpp:597): Still open. deliverGuestEopInterrupt(submission.queue, packet[7] & 0x0fffffffu) still recomputes what releaseInterrupt already validated.
  • Non-blocking — EV_CLEAR keeps only the newest interrupt's context, not recorded as unmeasured: Still open. The debt file still says nothing about coalescing.
  • Non-blocking — testLifetime no longer unregisters its gate output (libSceVideoOut/tests/Flip.cpp): Still open. The only AgcDriverUnregisterVideoOutput_nid_postfix(7, ...) left is in another test (Flip.cpp:303). The author did not reply on this.

New findings

Blocking

None.

Non-blocking

None.

Not verified

  • main's new reopen check with the PR's flip hold: main added a check to testLifetime(reopen) that submits a label-store DCB while the gate holds a flip. With this PR only command-buffer flips are held, so that store should not block. video_out_flip_lifetime and _reopen skip on this machine, though, so I could not confirm it. oneandonlydean's Windows run (28 of 28) was on main 4f41f4c375, before this merge.
  • Other tests and title results: the other video_out_flip_* tests, all title results, and the NVIDIA, RADV and Windows runs are author- or tester-reported.
  • Validation baseline: the comparison used an older main (1e658521), so tests added to main since then were validated but not compared.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5759835855 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7978#pullrequestreview-5759835855). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T21:38:23Z. **Review:** APPROVED --- # Re-checked — approved The only new commit is `7ceffb39`, a merge of `main` 086c0686c8 into `04f94904` by oneandonlydean. The PR's nine commits are identical to the ones I last reviewed, and both conflict resolutions in the merge keep both sides correctly. ## What changed since my last review - **PR commits:** none changed. The range-diff shows commits 1 to 9 identical (`=`). - **Merge commit `7ceffb39`:** `git show --cc` shows two hand-resolved hunks. - `PacketExecution.cpp`, the pipelined label/DMA condition: keeps the PR's `enqueueLabelPacket(..., releaseInterrupt(packet, opcode, false))` and adds `main`'s new `|| enqueueConstantRamDump(...)`. That is correct. - `docs/dev/debt/libSceAgcDriver.md`: keeps the PR's removal of the "Flip packets raise the graphics end-of-pipe event" entry and adds `main`'s new "Host imports across devices" entry. That is correct. - `Driver.hpp`, `PacketMemory.cpp` and `libSceVideoOut/tests/Flip.cpp` take `main`'s changes without conflict. `main` added `enqueueConstantRamDump` and `commitStore`, and a reopen check in `testLifetime`. - Every interrupt delivery in the merged tree still goes through `deliverGuestEopInterrupt(queue, context)` (`PacketMemory.cpp:97`, `:537`, `:540`, `PacketExecution.cpp:597`). Nothing from `main` brings back a flip-raised event or the old `bool` signature of `commitLabel`. - **Description and discussion:** no author changes since my last review. oneandonlydean reports that all 28 `video_out_flip_*` tests pass on Windows 11 at `04f94904` merged into `main` 4f41f4c375 (tester-reported). ## What I ran Head `7ceffb3974b59b6515ef021e010a78298510767b`, `main` `04a9eb4fa2877eb6e40bf2c83adf972e40d89b24`, merged tree `4678edbe247f4ae0a7d2d3f64b0b9cd714d2b036`. Debian 13 VM, GCC 14.2.0, lavapipe (Mesa 26.1.6), no GPU and no display. ```sh git log --format="%H %P %s" -3 7ceffb3974b59b6515ef021e010a78298510767b git show --cc 7ceffb3974b59b6515ef021e010a78298510767b git diff --check 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24...7ceffb3974b59b6515ef021e010a78298510767b python3 tools/check_conventions.py --base 04a9eb4fa2877eb6e40bf2c83adf972e40d89b24 ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(agc_driver|agc_driver_eop_interrupts|agc_driver_flip|agc_driver_flip_compute|agc_driver_submit|video_out_flip_deferred|video_out_flip_lifetime)$" git status --porcelain ``` | Check | Result | |---|---| | `git diff --check` | clean | | `check_conventions.py` | "All conventions checks passed." | | Build and `libs` (script) | ok | | Selected tests (script) | 2180 run, 0 new failures, 0 timeouts. The 7 known failures also fail on `main` (denormal and division tests, `vector_constant_factor_tininess`, one unwrap test) | | `agc_driver`, `agc_driver_eop_interrupts`, `agc_driver_flip`, `agc_driver_flip_compute` | pass (11.6 s at most) | | `video_out_flip_deferred`, `video_out_flip_lifetime` | skipped (no display or Vulkan window) | | Validation (script) | layer loaded in 782 of 783 tests, none missing. One test has new VUIDs, see below | | Worktree | `git status --porcelain` empty | **The one validation difference is not from this PR.** `agc_driver_image_gather_volume` reports `VUID-VkSamplerCreateInfo-addressModeU-01079` and the `addressMode{U,V,W}-parameter` VUIDs. Every line is marked "test not run on main": the test does not exist in the older validation baseline (`1e658521`) and came in from `main`. This PR changes no sampler, image or shader code (its 12 files are the end-of-pipe event, the flip hold, their tests and the debt doc), so I do not count it against the PR. ## Negative control Not repeated. The PR's tests are byte-identical to the previously reviewed head. My earlier control showed `agc_driver`, `agc_driver_eop_interrupts` and `agc_driver_flip` fail with the production files restored from `main`. All three pass on this merged tree. ## Previous findings - **Non-blocking — context decoded twice (`PacketExecution.cpp:597`): Still open.** `deliverGuestEopInterrupt(submission.queue, packet[7] & 0x0fffffffu)` still recomputes what `releaseInterrupt` already validated. - **Non-blocking — EV_CLEAR keeps only the newest interrupt's context, not recorded as unmeasured: Still open.** The debt file still says nothing about coalescing. - **Non-blocking — `testLifetime` no longer unregisters its gate output (`libSceVideoOut/tests/Flip.cpp`): Still open.** The only `AgcDriverUnregisterVideoOutput_nid_postfix(7, ...)` left is in another test (`Flip.cpp:303`). The author did not reply on this. ## New findings ### Blocking None. ### Non-blocking None. ## Not verified - **`main`'s new reopen check with the PR's flip hold:** `main` added a check to `testLifetime(reopen)` that submits a label-store DCB while the gate holds a flip. With this PR only command-buffer flips are held, so that store should not block. `video_out_flip_lifetime` and `_reopen` skip on this machine, though, so I could not confirm it. oneandonlydean's Windows run (28 of 28) was on `main` 4f41f4c375, before this merge. - **Other tests and title results:** the other `video_out_flip_*` tests, all title results, and the NVIDIA, RADV and Windows runs are author- or tester-reported. - **Validation baseline:** the comparison used an older `main` (`1e658521`), so tests added to `main` since then were validated but not compared. <!-- anyps5-bots job=3625 head=7ceffb3974b59b6515ef021e010a78298510767b -->
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!7978
No description provided.