feat(videoout): implement sceVideoOutDeleteOutputModeEvent #3305

Merged
CouchRiv merged 1 commit from upstream-pr/3305 into main 2026-10-11 07:28:09 +00:00
CouchRiv commented 2026-10-11 06:45:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by CouchRiv on 2026-10-11T06:45:48Z.


What

Titles that import sceVideoOutDeleteOutputModeEvent (vwtVpHQKelI) stop at load on main because libSceVideoOut does not export it. #1794 lists the NID, without a name, among the unresolved imports. The name comes from the NID formula (tools/nid_names.py) and is also in the free ps5-payload-dev SDK.

sceVideoOutAddOutputModeEvent already registers an output mode event on an event queue. This adds the matching removal, written like sceVideoOutDeleteFlipEvent and the vblank deletes: it drops the registration for that queue and the kernel event filter. Deleting a registration that does not exist returns 0, and a null queue or an invalid handle throws.

This does not get such a title past the loader on its own: the same report lists other unresolved imports, among them one in libSceVideoOut whose name is not known yet.

Tested

Linux (CachyOS), GCC; RTX 4070 Ti (NVIDIA), Radeon 610M (RADV) and lavapipe (Mesa 26.2.4).

  • video_out_flip_controls now also checks that the unsubscription clears the registration, that a second delete returns 0, and that a null queue and an invalid handle throw. It needs a window: with SDL_VIDEODRIVER=offscreen ctest skips it, so I ran video_out_flip_tests in all five modes with SDL_VIDEODRIVER=x11 on a desktop session with NVIDIA: all pass. On RADV the swapchain cannot be created on that desktop (vkCreateSwapchainKHR fails in every mode, also for tests this PR does not touch), so RADV is not covered for this test.
  • guest_video_out_output_mode, guest_video_out_wqhd_detection and guest_video_out_resolution_status: pass on NVIDIA and lavapipe.
  • nm -D on the built libSceVideoOut shows the export vwtVpHQKelI.
  • python3 tools/check_conventions.py --base origin/main passes.
  • Not run with a title; Windows and macOS not run.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4817172345 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3305). Originally posted by [CouchRiv](https://github.com/CouchRiv) on 2026-10-11T06:45:48Z. --- ### What Titles that import `sceVideoOutDeleteOutputModeEvent` (`vwtVpHQKelI`) stop at load on `main` because `libSceVideoOut` does not export it. #1794 lists the NID, without a name, among the unresolved imports. The name comes from the NID formula (`tools/nid_names.py`) and is also in the free [ps5-payload-dev SDK](https://github.com/ps5-payload-dev/sdk/blob/master/sce_stubs/libSceVideoOut.c). `sceVideoOutAddOutputModeEvent` already registers an output mode event on an event queue. This adds the matching removal, written like `sceVideoOutDeleteFlipEvent` and the vblank deletes: it drops the registration for that queue and the kernel event filter. Deleting a registration that does not exist returns 0, and a null queue or an invalid handle throws. This does not get such a title past the loader on its own: the same report lists other unresolved imports, among them one in `libSceVideoOut` whose name is not known yet. ### Tested Linux (CachyOS), GCC; RTX 4070 Ti (NVIDIA), Radeon 610M (RADV) and lavapipe (Mesa 26.2.4). - `video_out_flip_controls` now also checks that the unsubscription clears the registration, that a second delete returns 0, and that a null queue and an invalid handle throw. It needs a window: with `SDL_VIDEODRIVER=offscreen` ctest skips it, so I ran `video_out_flip_tests` in all five modes with `SDL_VIDEODRIVER=x11` on a desktop session with NVIDIA: all pass. On RADV the swapchain cannot be created on that desktop (`vkCreateSwapchainKHR` fails in every mode, also for tests this PR does not touch), so RADV is not covered for this test. - `guest_video_out_output_mode`, `guest_video_out_wqhd_detection` and `guest_video_out_resolution_status`: pass on NVIDIA and lavapipe. - `nm -D` on the built libSceVideoOut shows the export `vwtVpHQKelI`. - `python3 tools/check_conventions.py --base origin/main` passes. - Not run with a title; Windows and macOS not run. ### 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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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] AI-assisted: yes
github-actions[bot] commented 2026-10-11 06:46:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T06:46:07Z.


Progress report (1690db9 → b6cc4fe)

➖ System libraries: 85.96% (+0.0%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceVideoOut sceVideoOutDeleteOutputModeEvent
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106369981 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3305#issuecomment-6106369981). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T06:46:07Z. --- <!-- progress-report --> ### Progress report (1690db9 → b6cc4fe) ➖ **System libraries**: 85.96% (+0.0%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libSceVideoOut | `sceVideoOutDeleteOutputModeEvent` | </details>
adriadam10 commented 2026-10-11 07:28:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T07:28:06Z.


Checked the diff against the sibling sceVideoOutDelete*Event exports (same deleteVideoOutEvent path, SET_MODE list), the NID/name pair (vwtVpHQKelI) and overlap with open PRs (none). The new asserts in video_out_flip_controls need a window, so they could not be run here; relying on the NVIDIA runs in the description. Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106676713 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3305#issuecomment-6106676713). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T07:28:06Z. --- Checked the diff against the sibling `sceVideoOutDelete*Event` exports (same `deleteVideoOutEvent` path, SET_MODE list), the NID/name pair (`vwtVpHQKelI`) and overlap with open PRs (none). The new asserts in `video_out_flip_controls` need a window, so they could not be run here; relying on the NVIDIA runs in the description. Merging once CI is green.
Mouhand-Kaddo commented 2026-10-11 07:31:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Mouhand-Kaddo on 2026-10-11T07:31:36Z.


Additional platform validation of standalone PR head b6cc4fe7f9e3521dc4653fbc6f2a83ec4454d886 (2026-10-11):

Windows: partial: controls not run — Windows 11, WinLibs GCC 15.2.0 UCRT/POSIX/SEH r7; CMake 4.3.1 / Ninja; Release, BUILD_TESTING=ON.

3 checks, 0 failures, 0 CTest skips. Built the selected targets and dependencies; this is focused validation, not a full build or full-suite run.

Checks: guest_video_out_wqhd_detection, guest_video_out_resolution_status, guest_video_out_output_mode.

Command after building: ctest --test-dir <build> --verbose --no-tests=error --timeout 30 -R "^(video_out_flip_controls|guest_video_out_(output_mode|wqhd_detection|resolution_status))$".

Vulkan: native AMD Radeon RX 6900 XT, driver 32.0.21045.5002.

The three existing video-output checks ran and passed. video_out_flip_controls was Not Run because my validation runner omitted the shared video_out_flip_tests target. The PR merged before the corrected rerun, so I left it alone; the new deletion assertions have no Windows execution result from this run.

No title/gameplay validation. These results cover the standalone head, not a merge with current main.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106702947 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3305#issuecomment-6106702947). Originally posted by [Mouhand-Kaddo](https://github.com/Mouhand-Kaddo) on 2026-10-11T07:31:36Z. --- <!-- anyps5-platform-validation:b6cc4fe7f9e3521dc4653fbc6f2a83ec4454d886 --> Additional platform validation of standalone PR head `b6cc4fe7f9e3521dc4653fbc6f2a83ec4454d886` (2026-10-11): **Windows: partial: controls not run** — Windows 11, WinLibs GCC 15.2.0 UCRT/POSIX/SEH r7; CMake 4.3.1 / Ninja; Release, `BUILD_TESTING=ON`. 3 checks, 0 failures, 0 CTest skips. Built the selected targets and dependencies; this is focused validation, not a full build or full-suite run. Checks: `guest_video_out_wqhd_detection`, `guest_video_out_resolution_status`, `guest_video_out_output_mode`. Command after building: `ctest --test-dir <build> --verbose --no-tests=error --timeout 30 -R "^(video_out_flip_controls|guest_video_out_(output_mode|wqhd_detection|resolution_status))$"`. Vulkan: native AMD Radeon RX 6900 XT, driver 32.0.21045.5002. The three existing video-output checks ran and passed. video_out_flip_controls was Not Run because my validation runner omitted the shared video_out_flip_tests target. The PR merged before the corrected rerun, so I left it alone; the new deletion assertions have no Windows execution result from this run. No title/gameplay validation. These results cover the standalone head, not a merge with current main.
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!3305
No description provided.