fix(videoout): dump linear display buffers #4930

Merged
MarcZX10 merged 1 commit from upstream-pr/4930 into main 2026-10-14 02:37:10 +00:00
MarcZX10 commented 2026-10-13 05:06:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T05:06:00Z.


What

PresentDisplayBuffer returns early for linear (tilingMode == 1) display buffers before it reaches the APS5_DUMP_FRAMES scheduling code. Those presented frames are therefore omitted from the regular BMP dump output.

Keep the existing linear readback and presentation path, and apply the same dump limit, interval, scale, and queued GPU readback used for tiled buffers. Extend video_out_frame_dump_queue to alternate tiled and linear buffers and verify every dumped pixel. This follows up on the frame-dump side finding in #3093.

The open #4891 also changes this presentation function for on-demand screenshots. Its screenshot request and this PR's regular APS5_DUMP_FRAMES behavior are separate; the changes touch the same linear branch but do not depend on one another.

Tested

  • Debian 12, GCC 12.2, Release/Ninja: video_out_frame_dump_queue_tests built successfully.
  • Under Xvfb with SDL's X11 driver and the installed Vulkan ICDs, video_out_frame_dump_queue passed (1/1).
  • tools/check_conventions.py --base upstream/main, tools/check_test_registration.py build-frame-dump-linear, and git diff --check upstream/main...HEAD passed.
  • No title run was needed for this debug-output path.

Checklist

  • Based on current main; no other open PR implements regular frame dumps for linear buffers (#4891 adds on-demand screenshots)
  • 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
  • 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
  • Unblocks: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4838637857 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4930). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-13T05:06:00Z. --- ### What `PresentDisplayBuffer` returns early for linear (`tilingMode == 1`) display buffers before it reaches the `APS5_DUMP_FRAMES` scheduling code. Those presented frames are therefore omitted from the regular BMP dump output. Keep the existing linear readback and presentation path, and apply the same dump limit, interval, scale, and queued GPU readback used for tiled buffers. Extend `video_out_frame_dump_queue` to alternate tiled and linear buffers and verify every dumped pixel. This follows up on the frame-dump side finding in #3093. The open #4891 also changes this presentation function for on-demand screenshots. Its screenshot request and this PR's regular `APS5_DUMP_FRAMES` behavior are separate; the changes touch the same linear branch but do not depend on one another. ### Tested - Debian 12, GCC 12.2, Release/Ninja: `video_out_frame_dump_queue_tests` built successfully. - Under Xvfb with SDL's X11 driver and the installed Vulkan ICDs, `video_out_frame_dump_queue` passed (1/1). - `tools/check_conventions.py --base upstream/main`, `tools/check_test_registration.py build-frame-dump-linear`, and `git diff --check upstream/main...HEAD` passed. - No title run was needed for this debug-output path. ### Checklist - [x] Based on current `main`; no other open PR implements regular frame dumps for linear buffers (#4891 adds on-demand screenshots) - [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) - [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] Unblocks: none - [x] AI-assisted: yes
nicolasfalesy commented 2026-10-13 08:41:41 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by nicolasfalesy on 2026-10-13T08:41:41Z.


Linux test with a display (Arch, Intel Arc B390 on Mesa 26.2.2 ANV, Xwayland, GCC 16.2.1, Release), this PR merged onto main 7e181fcc3 together with #4863, #4040 and #4930 (clean merges): video_out_frame_dump_queue passes when run with its ctest environment (APS5_DUMP_FRAMES=4 APS5_DUMP_SCALE=4) on a real X display instead of the offscreen driver. With this PR's VulkanDevice.cpp change reverted it fails with a queued frame dump was not written, so the test guards the change on Linux. The five video_out_flip_tests modes (lifetime, reopen, controls, overlay, unopened) also pass on the display with the three PRs merged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6141731748 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4930#issuecomment-6141731748). Originally posted by [nicolasfalesy](https://github.com/nicolasfalesy) on 2026-10-13T08:41:41Z. --- Linux test with a display (Arch, Intel Arc B390 on Mesa 26.2.2 ANV, Xwayland, GCC 16.2.1, Release), this PR merged onto `main` 7e181fcc3 together with #4863, #4040 and #4930 (clean merges): `video_out_frame_dump_queue` passes when run with its ctest environment (`APS5_DUMP_FRAMES=4 APS5_DUMP_SCALE=4`) on a real X display instead of the offscreen driver. With this PR's `VulkanDevice.cpp` change reverted it fails with `a queued frame dump was not written`, so the test guards the change on Linux. The five `video_out_flip_tests` modes (lifetime, reopen, controls, overlay, unopened) also pass on the display with the three PRs merged.
github-actions[bot] commented 2026-10-14 00:17:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T00:17:43Z.


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
#4891 core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp L2575
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6157983316 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4930#issuecomment-6157983316). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-14T00:17:43Z. --- <!-- pr-overlap --> 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 | |---|---|---|---| | #4891 | `core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp` [L2575](https://github.com/boykopovar/AnyPS5/blob/0df6e295c52e7cd6afa394ed35513bd252045c74/core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp#L2575) | | |
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!4930
No description provided.