perf(agc): write CPU-path frame dumps through the frame dump writer #10513

Merged
thuanquang merged 1 commit from upstream-pr/10513 into main 2026-10-27 08:21:56 +00:00
thuanquang commented 2026-10-24 06:47:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-24T06:47:09Z.


What

With APS5_DUMP_FRAMES, VulkanDevice::PresentDisplayBuffer (Execution/src/VulkanDevice.cpp) reads most dumped frames back on the GPU and hands them to the frame dump writer thread (FrameDumpWriter). The frames it takes from the CPU were written with WriteFrameBmp on the presenter instead: every dumped frame with APS5_NO_GPU_DUMP=1, and on an HDR10 swapchain the linear display buffers and the tiled ones not shown from a resident image. That write ran inside Driver::Present with the GPU mutex held.

These frames are now reduced by the dump scale on the presenter, as WriteFrameBmp did, and queued with FrameDumpWriter::Enqueue, which writes them in order on the writer thread. Every queued frame is now already reduced, so WriteFrameBmp writes it as it is, and the writer's per-frame scale (always 1 for GPU readbacks) is gone.

What stays the same:

  • The dump index is taken before present(): file names and numbering are unchanged, and a dropped presentation keeps its CPU dump, as before.
  • The queue holds the reduced frames, as it does for GPU readbacks since #4320 (a 1920x1080 frame at the default APS5_DUMP_SCALE=4 is 518 KB), and the presenter waits only once 64 MiB are queued (#8807).
  • The writer skips frames once the BMP output is disabled, and writes the queued ones when the device is torn down, as for GPU dumps.

What differs from GPU readbacks:

  • GPU readbacks are usually queued after the GPU mutex is released (RetirePresents runs before Driver::Present takes it; only its fallbacks in present() and ensureHdrScaler, and WaitIdle with APS5_SYNC_FLIP, retire under it), while a CPU dump is always queued inside Present. So when the 64 MiB limit is reached, the presenter still waits with the GPU mutex held. At the default scale that starts once 129 frames of 1920x1080 are queued; at APS5_DUMP_SCALE=1 and 3840x2160, from the third.
  • CPU dumps still queued are lost when the process ends without tearing the device down (a guest _Exit, an abort, a crash), as GPU dumps already are. Before, each one was on disk when Present returned.

Screenshots: takeScreenshot takes a requested screenshot (#4891) only while the writer has nothing queued. A present's CPU dump is queued after that check, so the dump of the same frame does not hold the screenshot back. A screenshot moves to a later present only while earlier frames are still being written, which GPU dumps already do.

Overlap: #9602 (also mine) merged first. It changed the GPU readback's log line directly above the dumpWriter.Enqueue call this change edits, so this head is rebased onto main 6f58a046b1, keeping #9602's ProfilePrint_nid_no_patch line; that line was the only conflict. #9673 also edits VulkanDevice.cpp (ResidentPresentable); a three-way merge of the file with its head 3840ec60b1 has no conflict.

Why

VideoOut completes the flip only after Driver::Present returns, so every CPU-path dump write was on the guest's frame time. The queue workers waited for the GPU mutex for as long as the write took. On a slow or busy disk, one write stopped the title for seconds.

A trace on main 4997726a5f, PPSA14363 (METAL GEAR SOLID Master Collection Vol. 1, own dump) at 1920x1080 with APS5_NO_GPU_DUMP=1 and APS5_DUMP_FRAMES_EVERY=60, while a parallel build (about 14 compile jobs on the same disk) and a League of Legends match were running, has its five longest presents at 16.0 s, 8.2 s, 3.2 s, 1.0 s and 0.84 s. All of each one is spent in Driver.Present.present_display_buffer, while the queue worker sits in GpuMutex.wait.flush. The traced display buffer decode inside each of those presents takes 11 to 17 ms. The untraced rest is the write of one 518 KB BMP. The three synchronous calls are unchanged on current main: VulkanDevice.cpp:3331, :3333 and :3393 at 6f58a046b1.

PPSA14363, main against this change under disk load. main 379b1dca32 and this change (8e73ff3ada, see Tested), each built from a clean commit in the same tree; the same prepared run folder with only libSceAgcDriver.prx swapped (hash-checked). Each run starts the launcher and runs 120 s without input, with APS5_DUMP_FRAMES=3000, APS5_DUMP_FRAMES_EVERY=60 and APS5_NO_GPU_DUMP=1, and captures APS5_TRACE_SECONDS=15:90, no other APS5_TRACE_* or APS5_PROFILE_* switch. A warm-up run came first. Disk load: two processes stream 4 GiB files and one makes 64 KB writes to a file, flushing each, on the same disk as the run folder, started 10 s before the run; in a 45 s calibration without the title, writing one 518 KB file took up to 42.4 s. Exclusive GPU, no build or test running; a League of Legends match was running during the warm-up, A1, B1 and B2, only its client during A2, and only the Riot Client service during the two unloaded runs.

APS5_TRACE_SECONDS=15:90 window main A1 main A2 change B1 change B2 main, no load change, no load
presents 1800 2983 5388 5385 5388 5393
frame p99 31.5 ms 21.3 ms 19.4 ms 19.4 ms 17.7 ms 17.6 ms
frame max 26462 ms 13770 ms 61.6 ms 92.5 ms 86.3 ms 60.1 ms
complete CPU dumps in the 120 s run 41 (+1 cut off) 59 (+1 cut off) 116 116 117 117

On main, the loaded runs spend 36.2 ms (A1) and 14.4 ms (A2) per frame of the window in Driver.Present.present_display_buffer while the queue worker waits in GpuMutex.wait.flush (35.5 and 13.8 ms per frame); with the change neither phase appears in the top phases. Without disk load both sides present 5388-5393 frames. On main under load the window opens at an earlier present (420-437 against 815-825), because the stalls began before 15 s; its measured length is 94.5 and 91.7 s.

Summary lines of A2 and B2, main first:

{"commit":"379b1dca32ec","dirty":false,"env":{"APS5_DUMP_FRAMES":"3000","APS5_DUMP_FRAMES_EVERY":"60","APS5_NO_GPU_DUMP":"1","APS5_TRACE_SECONDS":"15:90"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 15:90","first_present":437,"ms":91748.440},"presents":2983,"frame_ms":{"p50":16.684,"p90":17.085,"p99":21.269,"max":13769.879},"gpu_busy_ms_per_present":1.366,"worker_busy_pct":{"queue worker 0x0":1.909},"top_phases_ms_per_frame":{"VideoOut.Flip":18.582,"VideoOut.Flip.present":16.112,"Driver.Present":16.108,"Driver.Present.present_display_buffer":14.393,"GpuMutex.wait.flush":13.819,"VideoOut.Flip.vblank_wait":2.255,"Driver.Present.acquire_image":1.266,"Vulkan.Acquire":1.264},"trace_dropped":false,"trace":"aps5-trace-379b1dca32ec-23128.json.gz"}
{"commit":"8e73ff3adac1","dirty":false,"env":{"APS5_DUMP_FRAMES":"3000","APS5_DUMP_FRAMES_EVERY":"60","APS5_NO_GPU_DUMP":"1","APS5_TRACE_SECONDS":"15:90"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 15:90","first_present":825,"ms":90005.641},"presents":5385,"frame_ms":{"p50":16.682,"p90":16.964,"p99":19.411,"max":92.534},"gpu_busy_ms_per_present":2.579,"worker_busy_pct":{"queue worker 0x0":4.713},"top_phases_ms_per_frame":{"VideoOut.Flip":12.453,"VideoOut.Flip.vblank_wait":9.368,"VideoOut.Flip.present":2.817,"Driver.Present":2.812,"Driver.Present.acquire_image":1.627,"Vulkan.Acquire":1.625,"Vulkan.Acquire.acquire_fence_wait":1.484,"Driver.Packet":0.780},"trace_dropped":false,"trace":"aps5-trace-8e73ff3adac1-24228.json.gz"}

tools/performance_compare.py on them: mean frame 30.757 to 16.714 ms, p99 21.269 to 19.411 ms, max 13769.879 to 92.534 ms. The traces are not attached, because these runs come from a commercial title.

Tested

New test (Linux only): video_out_frame_dump_queue already holds frame_000.bmp as a FIFO that nobody reads until all four 3840x2160 presents have completed. It runs only off Windows (mkfifo), on the GPU readback path. video_out_frame_dump_cpu_queue runs the same executable with APS5_NO_GPU_DUMP=1 and APS5_DUMP_SCALE=4. On main the first present blocks in the BMP write once the pipe is full, so the flip cannot complete within the test's 15 s wait, and the test fails with "the flip did not complete". With this change all four presents complete. Run on both sides on Linux (WSL2, lavapipe, X11 display driver), 3 runs each: main cd0591c8f4 plus this test entry failed 3 of 3 with the flip did not complete, this change at 6289faa256 passed 3 of 3 (details in this comment). With the default offscreen driver, which the Linux CI job uses, the test skips on both sides.

As a stand-in, a Linux (WSL2, g++ 13.3) probe compiled the text of FrameDumpWriter, QueueFrameDump and WriteFrameBmp from this change, main's WriteFrameBmp, and the real FrameDumpIo.hpp, then held frame_000.bmp as a FIFO the way the test does:

  • main's WriteFrameBmp of a 3840x2160 frame at scale 4 had not returned after 3 s, and it returned once the FIFO was read.
  • QueueFrameDump of the same frame returned after 1.9 to 2.0 ms (three runs) while the writer stayed blocked.
  • Both dumps matched the source pixels.

Current head 52f67778cc: this change rebased onto main 6f58a046b1 after #9602 merged. The only conflict was #9602's log line above the dumpWriter.Enqueue call, kept as ProfilePrint_nid_no_patch; git range-diff against 6289faa256 shows no other difference. On this head (RX 6700 XT, AMD driver 32.0.21045.16010, Windows 11 26200; the flip tests configured with ANYPS5_VIDEO_OUT_TEST_DRIVER=windows, since the default offscreen driver skips them):

  • The 20 related tests (agc_frame_dump_io, agc_screenshot, the 16 video_out_flip_* tests, video_out_hdr_probe and video_out_hdr_present) pass 3 of 3, none skipped.
  • video_out_hdr_present with APS5_NO_GPU_DUMP=1 passes 3 of 3 and prints no display read back on the GPU line, so its dumps take the CPU path through the writer.
  • Under the Khronos validation layer, the 20 tests and the APS5_NO_GPU_DUMP=1 run pass with 0 VUID- lines; VK_LOADER_DEBUG=layer shows the layer inserted in 16 of the 20 test processes and in the APS5_NO_GPU_DUMP=1 run, and no "was not found" line.

Earlier, Windows, RX 6700 XT (main 379b1dca32 and this change on it, each built from a clean commit in the same tree; the change was built and tested at 8e73ff3ada. The previous head 6289faa256 was the same change minus one comment line in VulkanDevice.cpp, rebased onto main cd0591c8f4, where the files it touches were unchanged):

  • The related tests pass 18 of 18 on both sides: agc_frame_dump_io, agc_screenshot, video_out_hdr_present, video_out_hdr_probe and the 14 video_out_flip_* tests.
  • video_out_hdr_present with APS5_NO_GPU_DUMP=1 passes 3 of 3 on both sides. Here every dump takes the CPU path (no display read back on the GPU line is printed), so on this change the dumps go through the writer. The test reads the BMPs back after shutdown and finds each of its three buffers (tiled, linear, DCC-cleared) with a largest difference of 0 from the CPU conversion.
  • Under the Khronos validation layer, both sets pass on both sides with 0 VUID- lines; VK_LOADER_DEBUG=layer shows the layer inserted in 14 of the 18 related test processes and in the APS5_NO_GPU_DUMP=1 run, the same on both sides, and no "was not found" line.

tools/check_conventions.py --base origin/main passes, and so does the check of this title and body.

Not tested: Linux locally; the HDR10 passthrough branches (no HDR output here); other GPUs.

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: none
  • Unblocks: none
  • GPUs tested: AMD Radeon RX 6700 XT (gfx1031), AMD proprietary driver 26.10.1 (32.0.21045.16010), Windows 11 26200
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4993246450 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10513). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-24T06:47:09Z. --- ### What With `APS5_DUMP_FRAMES`, `VulkanDevice::PresentDisplayBuffer` (`Execution/src/VulkanDevice.cpp`) reads most dumped frames back on the GPU and hands them to the frame dump writer thread (`FrameDumpWriter`). The frames it takes from the CPU were written with `WriteFrameBmp` on the presenter instead: every dumped frame with `APS5_NO_GPU_DUMP=1`, and on an HDR10 swapchain the linear display buffers and the tiled ones not shown from a resident image. That write ran inside `Driver::Present` with the GPU mutex held. These frames are now reduced by the dump scale on the presenter, as `WriteFrameBmp` did, and queued with `FrameDumpWriter::Enqueue`, which writes them in order on the writer thread. Every queued frame is now already reduced, so `WriteFrameBmp` writes it as it is, and the writer's per-frame scale (always 1 for GPU readbacks) is gone. What stays the same: - The dump index is taken before `present()`: file names and numbering are unchanged, and a dropped presentation keeps its CPU dump, as before. - The queue holds the reduced frames, as it does for GPU readbacks since #4320 (a 1920x1080 frame at the default `APS5_DUMP_SCALE=4` is 518 KB), and the presenter waits only once 64 MiB are queued (#8807). - The writer skips frames once the BMP output is disabled, and writes the queued ones when the device is torn down, as for GPU dumps. What differs from GPU readbacks: - GPU readbacks are usually queued after the GPU mutex is released (`RetirePresents` runs before `Driver::Present` takes it; only its fallbacks in `present()` and `ensureHdrScaler`, and `WaitIdle` with `APS5_SYNC_FLIP`, retire under it), while a CPU dump is always queued inside `Present`. So when the 64 MiB limit is reached, the presenter still waits with the GPU mutex held. At the default scale that starts once 129 frames of 1920x1080 are queued; at `APS5_DUMP_SCALE=1` and 3840x2160, from the third. - CPU dumps still queued are lost when the process ends without tearing the device down (a guest `_Exit`, an abort, a crash), as GPU dumps already are. Before, each one was on disk when `Present` returned. **Screenshots:** `takeScreenshot` takes a requested screenshot (#4891) only while the writer has nothing queued. A present's CPU dump is queued after that check, so the dump of the same frame does not hold the screenshot back. A screenshot moves to a later present only while earlier frames are still being written, which GPU dumps already do. **Overlap:** #9602 (also mine) merged first. It changed the GPU readback's log line directly above the `dumpWriter.Enqueue` call this change edits, so this head is rebased onto `main` `6f58a046b1`, keeping #9602's `ProfilePrint_nid_no_patch` line; that line was the only conflict. #9673 also edits `VulkanDevice.cpp` (`ResidentPresentable`); a three-way merge of the file with its head `3840ec60b1` has no conflict. ### Why VideoOut completes the flip only after `Driver::Present` returns, so every CPU-path dump write was on the guest's frame time. The queue workers waited for the GPU mutex for as long as the write took. On a slow or busy disk, one write stopped the title for seconds. A trace on `main` `4997726a5f`, PPSA14363 (METAL GEAR SOLID Master Collection Vol. 1, own dump) at 1920x1080 with `APS5_NO_GPU_DUMP=1` and `APS5_DUMP_FRAMES_EVERY=60`, while a parallel build (about 14 compile jobs on the same disk) and a League of Legends match were running, has its five longest presents at 16.0 s, 8.2 s, 3.2 s, 1.0 s and 0.84 s. All of each one is spent in `Driver.Present.present_display_buffer`, while the queue worker sits in `GpuMutex.wait.flush`. The traced display buffer decode inside each of those presents takes 11 to 17 ms. The untraced rest is the write of one 518 KB BMP. The three synchronous calls are unchanged on current `main`: `VulkanDevice.cpp:3331`, `:3333` and `:3393` at `6f58a046b1`. **PPSA14363, `main` against this change under disk load.** `main` `379b1dca32` and this change (`8e73ff3ada`, see Tested), each built from a clean commit in the same tree; the same prepared run folder with only `libSceAgcDriver.prx` swapped (hash-checked). Each run starts the launcher and runs 120 s without input, with `APS5_DUMP_FRAMES=3000`, `APS5_DUMP_FRAMES_EVERY=60` and `APS5_NO_GPU_DUMP=1`, and captures `APS5_TRACE_SECONDS=15:90`, no other `APS5_TRACE_*` or `APS5_PROFILE_*` switch. A warm-up run came first. Disk load: two processes stream 4 GiB files and one makes 64 KB writes to a file, flushing each, on the same disk as the run folder, started 10 s before the run; in a 45 s calibration without the title, writing one 518 KB file took up to 42.4 s. Exclusive GPU, no build or test running; a League of Legends match was running during the warm-up, A1, B1 and B2, only its client during A2, and only the Riot Client service during the two unloaded runs. | `APS5_TRACE_SECONDS=15:90` window | `main` A1 | `main` A2 | change B1 | change B2 | `main`, no load | change, no load | |---|---|---|---|---|---|---| | presents | 1800 | 2983 | 5388 | 5385 | 5388 | 5393 | | frame p99 | 31.5 ms | 21.3 ms | 19.4 ms | 19.4 ms | 17.7 ms | 17.6 ms | | frame max | 26462 ms | 13770 ms | 61.6 ms | 92.5 ms | 86.3 ms | 60.1 ms | | complete CPU dumps in the 120 s run | 41 (+1 cut off) | 59 (+1 cut off) | 116 | 116 | 117 | 117 | On `main`, the loaded runs spend 36.2 ms (A1) and 14.4 ms (A2) per frame of the window in `Driver.Present.present_display_buffer` while the queue worker waits in `GpuMutex.wait.flush` (35.5 and 13.8 ms per frame); with the change neither phase appears in the top phases. Without disk load both sides present 5388-5393 frames. On `main` under load the window opens at an earlier present (420-437 against 815-825), because the stalls began before 15 s; its measured length is 94.5 and 91.7 s. Summary lines of A2 and B2, `main` first: ```json {"commit":"379b1dca32ec","dirty":false,"env":{"APS5_DUMP_FRAMES":"3000","APS5_DUMP_FRAMES_EVERY":"60","APS5_NO_GPU_DUMP":"1","APS5_TRACE_SECONDS":"15:90"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 15:90","first_present":437,"ms":91748.440},"presents":2983,"frame_ms":{"p50":16.684,"p90":17.085,"p99":21.269,"max":13769.879},"gpu_busy_ms_per_present":1.366,"worker_busy_pct":{"queue worker 0x0":1.909},"top_phases_ms_per_frame":{"VideoOut.Flip":18.582,"VideoOut.Flip.present":16.112,"Driver.Present":16.108,"Driver.Present.present_display_buffer":14.393,"GpuMutex.wait.flush":13.819,"VideoOut.Flip.vblank_wait":2.255,"Driver.Present.acquire_image":1.266,"Vulkan.Acquire":1.264},"trace_dropped":false,"trace":"aps5-trace-379b1dca32ec-23128.json.gz"} ``` ```json {"commit":"8e73ff3adac1","dirty":false,"env":{"APS5_DUMP_FRAMES":"3000","APS5_DUMP_FRAMES_EVERY":"60","APS5_NO_GPU_DUMP":"1","APS5_TRACE_SECONDS":"15:90"},"gpu":"AMD Radeon RX 6700 XT","driver":"AMD proprietary driver 26.10.1 (AMD proprietary shader compiler)","os":"Windows 10.0.26200","cpu":"AMD Ryzen 5 5600X 6-Core Processor","cpu_threads":12,"memory_mib":32690,"title_id":"PPSA14363","title":"METAL GEAR SOLID - Master Collection Version","content_version":"03.000.000","resolution":"1920x1080","window":{"spec":"seconds 15:90","first_present":825,"ms":90005.641},"presents":5385,"frame_ms":{"p50":16.682,"p90":16.964,"p99":19.411,"max":92.534},"gpu_busy_ms_per_present":2.579,"worker_busy_pct":{"queue worker 0x0":4.713},"top_phases_ms_per_frame":{"VideoOut.Flip":12.453,"VideoOut.Flip.vblank_wait":9.368,"VideoOut.Flip.present":2.817,"Driver.Present":2.812,"Driver.Present.acquire_image":1.627,"Vulkan.Acquire":1.625,"Vulkan.Acquire.acquire_fence_wait":1.484,"Driver.Packet":0.780},"trace_dropped":false,"trace":"aps5-trace-8e73ff3adac1-24228.json.gz"} ``` `tools/performance_compare.py` on them: mean frame 30.757 to 16.714 ms, p99 21.269 to 19.411 ms, max 13769.879 to 92.534 ms. The traces are not attached, because these runs come from a commercial title. ### Tested **New test (Linux only):** `video_out_frame_dump_queue` already holds `frame_000.bmp` as a FIFO that nobody reads until all four 3840x2160 presents have completed. It runs only off Windows (`mkfifo`), on the GPU readback path. `video_out_frame_dump_cpu_queue` runs the same executable with `APS5_NO_GPU_DUMP=1` and `APS5_DUMP_SCALE=4`. On `main` the first present blocks in the BMP write once the pipe is full, so the flip cannot complete within the test's 15 s wait, and the test fails with "the flip did not complete". With this change all four presents complete. Run on both sides on Linux (WSL2, lavapipe, X11 display driver), 3 runs each: `main` `cd0591c8f4` plus this test entry failed 3 of 3 with `the flip did not complete`, this change at `6289faa256` passed 3 of 3 (details in [this comment](https://github.com/boykopovar/AnyPS5/pull/10513#issuecomment-6384810615)). With the default `offscreen` driver, which the Linux CI job uses, the test skips on both sides. As a stand-in, a Linux (WSL2, g++ 13.3) probe compiled the text of `FrameDumpWriter`, `QueueFrameDump` and `WriteFrameBmp` from this change, `main`'s `WriteFrameBmp`, and the real `FrameDumpIo.hpp`, then held `frame_000.bmp` as a FIFO the way the test does: - `main`'s `WriteFrameBmp` of a 3840x2160 frame at scale 4 had not returned after 3 s, and it returned once the FIFO was read. - `QueueFrameDump` of the same frame returned after 1.9 to 2.0 ms (three runs) while the writer stayed blocked. - Both dumps matched the source pixels. **Current head `52f67778cc`:** this change rebased onto `main` `6f58a046b1` after #9602 merged. The only conflict was #9602's log line above the `dumpWriter.Enqueue` call, kept as `ProfilePrint_nid_no_patch`; `git range-diff` against `6289faa256` shows no other difference. On this head (RX 6700 XT, AMD driver 32.0.21045.16010, Windows 11 26200; the flip tests configured with `ANYPS5_VIDEO_OUT_TEST_DRIVER=windows`, since the default `offscreen` driver skips them): - The 20 related tests (`agc_frame_dump_io`, `agc_screenshot`, the 16 `video_out_flip_*` tests, `video_out_hdr_probe` and `video_out_hdr_present`) pass 3 of 3, none skipped. - `video_out_hdr_present` with `APS5_NO_GPU_DUMP=1` passes 3 of 3 and prints no `display read back on the GPU` line, so its dumps take the CPU path through the writer. - Under the Khronos validation layer, the 20 tests and the `APS5_NO_GPU_DUMP=1` run pass with 0 `VUID-` lines; `VK_LOADER_DEBUG=layer` shows the layer inserted in 16 of the 20 test processes and in the `APS5_NO_GPU_DUMP=1` run, and no "was not found" line. **Earlier, Windows, RX 6700 XT** (`main` `379b1dca32` and this change on it, each built from a clean commit in the same tree; the change was built and tested at `8e73ff3ada`. The previous head `6289faa256` was the same change minus one comment line in `VulkanDevice.cpp`, rebased onto `main` `cd0591c8f4`, where the files it touches were unchanged): - The related tests pass 18 of 18 on both sides: `agc_frame_dump_io`, `agc_screenshot`, `video_out_hdr_present`, `video_out_hdr_probe` and the 14 `video_out_flip_*` tests. - `video_out_hdr_present` with `APS5_NO_GPU_DUMP=1` passes 3 of 3 on both sides. Here every dump takes the CPU path (no `display read back on the GPU` line is printed), so on this change the dumps go through the writer. The test reads the BMPs back after shutdown and finds each of its three buffers (tiled, linear, DCC-cleared) with a largest difference of 0 from the CPU conversion. - Under the Khronos validation layer, both sets pass on both sides with 0 `VUID-` lines; `VK_LOADER_DEBUG=layer` shows the layer inserted in 14 of the 18 related test processes and in the `APS5_NO_GPU_DUMP=1` run, the same on both sides, and no "was not found" line. `tools/check_conventions.py --base origin/main` passes, and so does the check of this title and body. **Not tested:** Linux locally; the HDR10 passthrough branches (no HDR output here); other GPUs. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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: none - [x] Unblocks: none - [x] GPUs tested: AMD Radeon RX 6700 XT (gfx1031), AMD proprietary driver 26.10.1 (32.0.21045.16010), Windows 11 26200 - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-24 11:14:16 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T11:14:16Z.

Review: APPROVED


Reviewed the CPU dump path: it reduces pixels before enqueueing, then uses the existing FIFO writer, preserving the previous sample positions, numbering, and dropped-present behavior. The tests and report cover BMP equivalence, HDR CPU paths, and a measured presentation trace; the large-frame queue wait with the GPU mutex held is called out explicitly. The newly added Linux FIFO test has not yet been run by the author; the WSL probe is a useful stand-in but does not replace that integration test. I have not run the GPU/display tests locally, and hosted product jobs are skipped, so the hardware and performance results remain the author-reported Windows RX 6700 XT results.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5638044762 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/10513#pullrequestreview-5638044762). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-24T11:14:16Z. **Review:** APPROVED --- Reviewed the CPU dump path: it reduces pixels before enqueueing, then uses the existing FIFO writer, preserving the previous sample positions, numbering, and dropped-present behavior. The tests and report cover BMP equivalence, HDR CPU paths, and a measured presentation trace; the large-frame queue wait with the GPU mutex held is called out explicitly. The newly added Linux FIFO test has not yet been run by the author; the WSL probe is a useful stand-in but does not replace that integration test. I have not run the GPU/display tests locally, and hosted product jobs are skipped, so the hardware and performance results remain the author-reported Windows RX 6700 XT results.
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!10513
No description provided.