Skip to content

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

Merged
oneandonlydean merged 11 commits into
boykopovar:mainfrom
fma-rc:fix/agc-flip-no-eop-event
Nov 4, 2026
Merged

oneandonlydean merged 11 commits into
boykopovar:mainfrom
fma-rc:fix/agc-flip-no-eop-event

Conversation

@fma-rc

@fma-rc fma-rc commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

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 00d7e61 + #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 340247a with this PR (2c0ce89), unless a line names an earlier head.

  • Rebased on main 4f41f4c (04f9490) 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 a3a6f4a (3 of 3) and passes at 04f9490 (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 4569fe6 (5adc50d), keeping fix(agc): do not evict host imports used in the current or previous frame #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 c4a87b4.
  • 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 2c0ce89: 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 340247a; 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 fix(shader): decode GFX10 scratch offsets as one dword #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 a700809.
  • 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 b834c76, the last code change). Its captured frames show the same scene as main.

Checklist

@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 19, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions Bot added the fix error Closes an issue (Fixes #N) label Oct 19, 2026
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 4448 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp L426-430
PR 6501 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp L297
PR 6867 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp L473-474
PR 11346 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp L389-391
PR 12568 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/QueueWorker.cpp L72-74
PR 12696 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/QueueWorker.cpp L72-74

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 2434 docs/dev/debt/libSceAgcDriver.md
PR 5609 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
PR 5925 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
docs/dev/debt/libSceAgcDriver.md
PR 6186 docs/dev/debt/libSceAgcDriver.md
PR 6188 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
PR 6194 docs/dev/debt/libSceAgcDriver.md
PR 6223 docs/dev/debt/libSceAgcDriver.md
PR 6273 docs/dev/debt/libSceAgcDriver.md
PR 6280 docs/dev/debt/libSceAgcDriver.md
PR 6412 docs/dev/debt/libSceAgcDriver.md
PR 6481 docs/dev/debt/libSceAgcDriver.md
PR 6548 docs/dev/debt/libSceAgcDriver.md
PR 6804 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
docs/dev/debt/libSceAgcDriver.md
PR 6808 docs/dev/debt/libSceAgcDriver.md
PR 6987 docs/dev/debt/libSceAgcDriver.md
PR 6989 docs/dev/debt/libSceAgcDriver.md
PR 6995 docs/dev/debt/libSceAgcDriver.md
PR 7002 docs/dev/debt/libSceAgcDriver.md
PR 7085 docs/dev/debt/libSceAgcDriver.md
PR 7256 docs/dev/debt/libSceAgcDriver.md
PR 7275 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
PR 7449 docs/dev/debt/libSceAgcDriver.md
PR 7464 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
PR 7604 docs/dev/debt/libSceAgcDriver.md
PR 7642 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
docs/dev/debt/libSceAgcDriver.md
PR 7668 docs/dev/debt/libSceAgcDriver.md
PR 7963 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Submit.cpp
PR 8592 docs/dev/debt/libSceAgcDriver.md
PR 8707 docs/dev/debt/libSceAgcDriver.md
PR 9020 docs/dev/debt/libSceAgcDriver.md
PR 9318 docs/dev/debt/libSceAgcDriver.md
PR 9335 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9356 docs/dev/debt/libSceAgcDriver.md
PR 9387 docs/dev/debt/libSceAgcDriver.md
PR 9592 docs/dev/debt/libSceAgcDriver.md
PR 9672 docs/dev/debt/libSceAgcDriver.md
PR 9673 docs/dev/debt/libSceAgcDriver.md
PR 9675 docs/dev/debt/libSceAgcDriver.md
PR 9700 docs/dev/debt/libSceAgcDriver.md
PR 9748 docs/dev/debt/libSceAgcDriver.md
PR 9895 docs/dev/debt/libSceAgcDriver.md
PR 9898 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
docs/dev/debt/libSceAgcDriver.md
PR 9915 docs/dev/debt/libSceAgcDriver.md
PR 9950 docs/dev/debt/libSceAgcDriver.md
PR 10049 docs/dev/debt/libSceAgcDriver.md
PR 10193 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
docs/dev/debt/libSceAgcDriver.md
PR 10233 docs/dev/debt/libSceAgcDriver.md
PR 10256 docs/dev/debt/libSceAgcDriver.md
PR 10359 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
docs/dev/debt/libSceAgcDriver.md
PR 10442 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketMemory.cpp
PR 10743 docs/dev/debt/libSceAgcDriver.md
PR 11435 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
PR 11436 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/QueueWorker.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp
PR 11825 docs/dev/debt/libSceAgcDriver.md
PR 11998 docs/dev/debt/libSceAgcDriver.md
PR 12120 docs/dev/debt/libSceAgcDriver.md
PR 12565 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp
docs/dev/debt/libSceAgcDriver.md
PR 12567 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/QueueWorker.cpp
core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/Submission.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13599 docs/dev/debt/libSceAgcDriver.md
PR 13707 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Queues/QueueWorker.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13863 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13920 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
docs/dev/debt/libSceAgcDriver.md
PR 13928 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
docs/dev/debt/libSceAgcDriver.md
PR 13929 core/libs/prx/libSceAgcDriver/Execution/include/Driver/Driver.hpp
docs/dev/debt/libSceAgcDriver.md
PR 13963 docs/dev/debt/libSceAgcDriver.md
PR 13994 docs/dev/debt/libSceAgcDriver.md
PR 14005 docs/dev/debt/libSceAgcDriver.md
PR 14212 docs/dev/debt/libSceAgcDriver.md
PR 14302 docs/dev/debt/libSceAgcDriver.md
PR 14311 core/libs/prx/libSceAgcDriver/Execution/src/Driver/Packets/PacketExecution.cpp
docs/dev/debt/libSceAgcDriver.md
PR 14344 docs/dev/debt/libSceAgcDriver.md
PR 14561 docs/dev/debt/libSceAgcDriver.md
PR 14621 docs/dev/debt/libSceAgcDriver.md
PR 14943 docs/dev/debt/libSceAgcDriver.md
PR 14944 docs/dev/debt/libSceAgcDriver.md
PR 14976 docs/dev/debt/libSceAgcDriver.md

@fma-rc

fma-rc commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

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

fma-rc commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

@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

Copy link
Copy Markdown
Contributor

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#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

Copy link
Copy Markdown
Contributor

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.

@fma-rc
fma-rc force-pushed the fix/agc-flip-no-eop-event branch from 2c0ce89 to 00ba7be Compare October 20, 2026 15:28
@Lberonio

Lberonio commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

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:

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — changes requested

This pull request does not merge cleanly into main (4f41f4c): head 612ceb7 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.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 612ceb7 merged onto main 7feb37e · tested 2026-11-03 09:23 UTC · 33 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,611 passed · 10 failed (0 new, 9 also fail on main, 1 unstable on main) · 109 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,730 of 3,743 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (994 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.7 s, ⚠️ public_headers 90.1 s, ⚠️ agc_driver_image_sample_unnormalized 71.7 s, ⚠️ agc_driver_lazy_resolved_abi 60.4 s, ⚠️ agc_driver_indexed_copy 42.9 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 6 of the last 8 main runs
Failing on main too (9, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_depth_buffer_clear
agc_driver_native_depth_clears
agc_idle_publish_wait
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Passed on retry (4, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
agc_driver_sgpr_pattern_fill_keys: Failed in the parallel run; also passed only on retry in 2 other runs in the last 7 days
guest_pthread_start: Timeout in the parallel run; also passed only on retry in 14 other runs in the last 7 days
public_headers: Timeout in the parallel run; also passed only on retry in 6 other runs in the last 7 days
trace_digest_TraceDigestTests_test_cli_rejects_invalid_event_fields_without_partial_output: Timeout in the parallel run; also passed only on retry in 30 other runs in the last 7 days
Validated but not compared (58, not in the main baseline's validation pass)
guest_job_manager_worker_spin_scale_0.1
guest_pthread_start
public_headers_compile_0
public_headers_compile_10
public_headers_compile_12
public_headers_compile_14
public_headers_compile_16
public_headers_compile_18
public_headers_compile_19
public_headers_compile_2
public_headers_compile_20
public_headers_compile_21
public_headers_compile_22
public_headers_compile_23
public_headers_compile_24
public_headers_compile_25
public_headers_compile_26
public_headers_compile_27
public_headers_compile_28
public_headers_compile_29
public_headers_compile_30
public_headers_compile_31
public_headers_compile_32
public_headers_compile_33
public_headers_compile_34
public_headers_compile_35
public_headers_compile_36
public_headers_compile_37
public_headers_compile_38
public_headers_compile_39
public_headers_compile_4
public_headers_compile_40
public_headers_compile_41
public_headers_compile_42
public_headers_compile_43
public_headers_compile_44
public_headers_compile_45
public_headers_compile_46
public_headers_compile_47
public_headers_compile_48
public_headers_compile_49
public_headers_compile_50
public_headers_compile_51
public_headers_compile_52
public_headers_compile_53
public_headers_compile_54
public_headers_compile_55
public_headers_compile_56
public_headers_compile_57
public_headers_compile_58
public_headers_compile_59
public_headers_compile_6
public_headers_compile_60
public_headers_compile_61
public_headers_compile_62
public_headers_compile_63
public_headers_compile_8
trace_digest_TraceDigestTests_test_cli_rejects_invalid_event_fields_without_partial_output
Validation IDs already present on main (4 IDs in 519 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (519 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 511 more
VUID-vkCmdCopyImage-srcImage-01548 (6 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (6 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (109)
usage: check_skips.py [-h] [--job {linux,windows}] [--list] [--require-tests]
                      junit
check_skips.py: error: /home/ben/anyps5-gpu-ci/data/runs/pr-7978/612ceb75d74e-7feb37ee3e30/ctest.xml: testcase 'public_headers_compile_0' is notrun and was not run
Reproduce
git fetch origin 612ceb75d74ebebe156b6eaf007c9fe112e1f252 7feb37ee3e30e10139b483fb4df689d5b5b69ab8
git checkout 7feb37ee3e30e10139b483fb4df689d5b5b69ab8 && git merge --no-ff 612ceb75d74ebebe156b6eaf007c9fe112e1f252
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — changes still requested

The new head a3a6f4a5 only merges main 4f41f4c (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 4f41f4c 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 4f41f4c 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.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 3, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head a3a6f4a merged onto main 4f41f4c · tested 2026-11-03 11:35 UTC · 19 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,700 passed · 5 failed (0 new, 2 also fail on main, 3 unstable on main) · 48 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,753 of 3,811 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (929 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 4 of the last 10 main runs
agc_submit_progress: failed in 6 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 5 of the last 10 main runs
Failing on main too (2, not counted against this PR)
agc_driver_image_table
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 517 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (517 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 509 more
VUID-vkCmdCopyImage-srcImage-01548 (9 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, and 1 more
VUID-vkCmdCopyImage-srcImage-01551 (9 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, and 1 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (48)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not co
Reproduce
git fetch origin a3a6f4a5cb4e079f6818639edc597663e021ae89 4f41f4c375f5abb487dbd184fbc150f31994d762
git checkout 4f41f4c375f5abb487dbd184fbc150f31994d762 && git merge --no-ff a3a6f4a5cb4e079f6818639edc597663e021ae89
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

…eted, and raise no event from flips

A flip packet delivered the queue's graphics end-of-pipe event after the
work recorded before it. On the console a flip raises no such event: its
interrupt context is always a typed token that the kernel routes to the
display path (PS5 13.60 kernel), and neither Minecraft (PPSA17221) nor
Death Stranding 2 (PPSA02015) sends a release that requests one. Death
Stranding 2 registers the event before it fills its handler table, so the
first flip's event reached a null handler (issue 6462).

Minecraft did need it, but only because of when the flip hold ends. It
writes its frame label after the flip in the same buffer and, after its
next submission, waits on the event until that label is 1. The hold
released the title at the flip packet, so it read the label before the
worker had written it and slept until the flip event came. The hold now
ends when the previous flip submission ran to its end and its recorded GPU
work completed, so the label is in memory when the title reads it.

The per-queue flip event latch is removed with the event: a queue's own
release interrupts deliver as before.
…mand-buffer flips for the previous flip submission's work

The flip hold was released at the end of the submission, after the
presenter's GpuReady. A presenter that blocks there held every later
flip, CPU flips included, so video_out_flip_lifetime, _reopen and
_cpuflip timed out. Keep flipsAhead released before GpuReady as before
and count open flip submissions separately; only a command-buffer flip
waits for them and for their recorded work.
…before the next flip returns

waitFlipWork waited for the recorded work's serial but never reaped it,
so labels written by completion actions (write-backs and labels stored
when a batch is reaped) could still hold their old value when the
title read them after its next flip. Reap the batches up to that serial
under the GPU mutex, as the packet drain does.
@fma-rc
fma-rc force-pushed the fix/agc-flip-no-eop-event branch from a3a6f4a to 04f9490 Compare November 3, 2026 13:45
@fma-rc

fma-rc commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @oneandonlydean for tracking it down, and @XairRrR for the re-check. The second wait is there for Minecraft (PPSA17221): it writes its frame label after the flip in the same command buffer and, after its next submission, waits on the end-of-pipe event until that label is 1. Flips raise no event, so a label not yet written at that point leaves it asleep until some later event. The wait covers the rest of the previous flip submission, and that includes the output callback. A real output's GpuReady only queues the request and returns, so it never waits on the title; the test's gate did, which is the deadlock.

So I kept the wait and changed testDeferredBuffer instead: the GPU is now held by a WAIT_REG_MEM on a label the test writes after registering the buffer, the way a title holds the GPU, and it still checks that a flip submitted before its buffer is registered is accepted and presented. How far the console lets a title run ahead of frames its GPU has not finished is not measured; that stays in the debt entry.

At 04f9490 (rebased onto main 4f41f4c in place of the merge): run outside ctest with SDL's Wayland driver on an RTX 5080 (ctest uses the offscreen driver, so it skips there, and the Windows VM here has no GPU), video_out_flip_deferred aborts with test gate timed out at a3a6f4a in 3 of 3 runs and passes at 04f9490 in 3 of 3, and all 26 flip test modes pass. The other matching AGC tests pass on NVIDIA, RADV and lavapipe, and the Windows build and ctest pass 3918 of 3918.

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — approved

The new head 04f94904 rebases the branch onto main 4f41f4c 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 4f41f4c 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 4f41f4c
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.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 04f9490 merged onto main 4f41f4c · tested 2026-11-03 14:17 UTC · 18 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,700 passed · 5 failed (0 new, 2 also fail on main, 3 unstable on main) · 48 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,753 of 3,811 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (929 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.2 s, ⚠️ agc_driver_lazy_resolved_abi 46.0 s
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 4 of the last 10 main runs
agc_submit_progress: failed in 6 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 5 of the last 10 main runs
Failing on main too (2, not counted against this PR)
agc_driver_image_table
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 517 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (517 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 509 more
VUID-vkCmdCopyImage-srcImage-01548 (9 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, and 1 more
VUID-vkCmdCopyImage-srcImage-01551 (9 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, and 1 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (48)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop_main: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not co
Reproduce
git fetch origin 04f94904874156111efea0000631c4839fdeb554 4f41f4c375f5abb487dbd184fbc150f31994d762
git checkout 4f41f4c375f5abb487dbd184fbc150f31994d762 && git merge --no-ff 04f94904874156111efea0000631c4839fdeb554
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 04f9490 merged onto main 4f41f4c · tested 2026-11-03 14:20 UTC · 33 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,686 passed · 9 failed (0 new, 7 also fail on main, 2 unstable on main) · 58 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,753 of 3,811 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (929 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_image_sample_unnormalized 49.5 s, ⚠️ agc_driver_stream_copy 41.7 s, ⚠️ agc_driver_lazy_resolved_abi 40.9 s, ⚠️ agc_driver_sample_multisample_target 38.0 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 7 of the last 9 main runs
agc_driver_store_over_untracked: failed in 1 of the last 9 main runs
Failing on main too (7, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
agc_driver_submit_progress
agc_submit_progress
agc_submit_progress_no_timeline
guest_socket_options_multicast
Validation IDs already present on main (4 IDs in 517 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (517 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 509 more
VUID-vkCmdCopyImage-srcImage-01548 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, agc_driver_stencil_plane_memory
VUID-vkCmdCopyImage-srcImage-01551 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth, agc_driver_stencil_null_feedback, agc_driver_stencil_plane_memory
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
Skipped (58)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayW
Reproduce
git fetch origin 04f94904874156111efea0000631c4839fdeb554 4f41f4c375f5abb487dbd184fbc150f31994d762
git checkout 4f41f4c375f5abb487dbd184fbc150f31994d762 && git merge --no-ff 04f94904874156111efea0000631c4839fdeb554
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi fma-rc, closing out our earlier question about the Windows video_out_flip_deferred failure: we ran it ourselves. On Windows 11, main 4f41f4c375 with this PR at 04f9490487 merged in passes all 28 video_out_flip_* tests, video_out_flip_deferred included, and plain main passes the same 28. So the earlier failure is gone with the rebased head, which matches your explanation that the old test's wait was the deadlock. Nothing more needed from you on that point; thanks.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 3, 2026

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — approved

The only new commit is 7ceffb39, a merge of main 086c068 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 4f41f4c (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 4f41f4c, 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.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 3, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 7ceffb3 merged onto main 1c8c0ef · tested 2026-11-04 05:46 UTC · 28 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 2,724 passed · 5 failed (0 new, 3 also fail on main, 2 unstable on main) · 50 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 2,779 of 3,842 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (951 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 4 of the last 10 main runs
agc_submit_progress: failed in 5 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (8 IDs in 531 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (531 tests): agc_driver, agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, and 523 more
VUID-vkCmdCopyImage-srcImage-01548 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (7 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (1 test): agc_driver_srgb8_color_target
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
Skipped (50)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_sample_order_grid_reference: skipped, the device does not keep depth drawn at custom sample locations at those locations, even after a transition that names them: the composite of uniform renders holds the guest's depth in 0 of 3005 sloped samples, so no path can be compared with it bit for bit
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip_in_order: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_dcc: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_deferred: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_eop: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
vide
Reproduce
git fetch origin 7ceffb3974b59b6515ef021e010a78298510767b 1c8c0efc8c41314402e6966da5bef6ea3d639d10
git checkout 1c8c0efc8c41314402e6966da5bef6ea3d639d10 && git merge --no-ff 7ceffb3974b59b6515ef021e010a78298510767b
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 4, 2026
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 4, 2026
@oneandonlydean
oneandonlydean merged commit 19077c1 into boykopovar:main Nov 4, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* docs fix error Closes an issue (Fixes #N) unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AGC: the end-of-pipe event a flip raises makes Death Stranding 2 call a null handler