feat(libSceVideoOut): limit the guest display to the host resolution #11948

Merged
00xDisaster merged 1 commit from upstream-pr/11948 into main 2026-11-05 00:00:08 +00:00
00xDisaster commented 2026-10-27 13:43:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by 00xDisaster on 2026-10-27T13:43:22Z.


What

Let the host ask the guest video out to fall back to the host resolution instead of presenting a 4K buffer in a smaller window. When ANYPS5_VIDEO_OUT_MAX_WIDTH is set below 3840, or ANYPS5_VIDEO_OUT_MAX_HEIGHT is set below 2160, an unknown output mode is reported as unsupported (0), so sceVideoOutConfigureOutput answers VIDEO_OUT_ERROR_UNAVAILABLE_OUTPUT_MODE (0x80290019), and a title can choose a mode the host supports. A value of 3840x2160 or above does not enable the fallback, a value of 0 or a malformed value makes output-mode queries throw, and either axis alone can enable it.

The buffer attributes and registered buffer sizes are left untouched. A title that keeps a 3840x2160 buffer still has that full buffer presented; the setting only affects output-mode selection, and it is off by default.

Tested

Linux 7.3.0-4-cachyos, GCC 16.2.1. Built guest_video_out_host_resolution_limit_tests with the host display and Vulkan device, not skipped:

guest_video_out_host_resolution_limit .........   Passed    0.40 sec
guest_video_out_host_resolution_height_only ...   Passed    0.40 sec
guest_video_out_host_resolution_width_only ....   Passed    0.40 sec
guest_video_out_host_resolution_four_k .......   Passed    0.38 sec
guest_video_out_host_resolution_malformed ....   Passed    0.38 sec
guest_video_out_host_resolution_disabled ......   Passed    0.38 sec
  • The both-axis, height-only and width-only cases check the unknown-mode fallback through both sceVideoOutIsOutputSupported and sceVideoOutConfigureOutput; a below-4K configured size leaves ConfigureOutput returning UNAVAILABLE_OUTPUT_MODE (0x80290019).
  • The four-K, disabled and controls cases check that VideoOutOutputSupport_nid_no_patch keeps its real meaning: mode 1 is 1, mode 15 is 0 below 120 Hz and 1 at 120 Hz, mode 4 is UNSUPPORTED_OUTPUT_MODE, an unknown mode is UNKNOWN_OUTPUT_MODE, and an unknown mode returns UNKNOWN_OUTPUT_MODE both before and after setting 3840x2160.
  • The malformed case checks that a value such as 1920px throws and names the variable.
  • Both setters, direct registration and sceVideoOutSubmitChangeBufferAttribute2 keep the requested 3840x2160 attributes, including width-only and height-only cases.
  • video_out_output_mode_policy and guest_video_out_output_mode pass before and after this change.
  • The helpers and their four standard includes are now static in Output.cpp; VideoOutDriver.hpp is unchanged.
  • Validation-layer runs, Khronos validation layer loaded, no VUID- from 00xDisaster runs: on the change tree video_out_output_mode_policy and guest_video_out_output_mode passed, and on the same machine against main the same two tests passed. I also reran the six host-resolution tests and all passed.

I captured four screenshots in a PPSA12544 run (Hollow Knight: Silksong, dumped by me and relinked from 0486c9a181) with both limits set. The overlay reports RES: 1920x1080 / 1920x1080 and the title presents gameplay at 120 FPS / 8.4 ms. The four screenshots from that run are in the PR thread (limit-001.png through limit-004.png); I intentionally did not upload them because image uploads are user-side.

Windows 11 26300, WinLibs GCC 15.2.0, Release (maskym, independent run): the test linked after #undef main; guest_video_out_host_resolution_limit, _height_only and _disabled passed 2 runs each under the Khronos validation layer, with no new VUID. The host display was 2560x1440 at 165 Hz. Not run on a PS5.
XairRrR separately verified a clean trial merge on an RTX 4070 Ti SUPER with no VUID- on either tree and a passing negative control.

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: NVIDIA GeForce GTX 1660 SUPER, vendor 0x10de, driver 615.78.08, Linux 7.3.0-4-cachyos (00xDisaster); NVIDIA GeForce RTX 4070 Ti SUPER, driver 615.78.08 (XairRrR). Change and control tests ran under VK_LAYER_KHRONOS_validation; 0 VUID- on both.
  • AI-assisted: no
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5034921237 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11948). Originally posted by [00xDisaster](https://github.com/00xDisaster) on 2026-10-27T13:43:22Z. --- ### What Let the host ask the guest video out to fall back to the host resolution instead of presenting a 4K buffer in a smaller window. When `ANYPS5_VIDEO_OUT_MAX_WIDTH` is set below 3840, or `ANYPS5_VIDEO_OUT_MAX_HEIGHT` is set below 2160, an unknown output mode is reported as unsupported (0), so `sceVideoOutConfigureOutput` answers `VIDEO_OUT_ERROR_UNAVAILABLE_OUTPUT_MODE` (0x80290019), and a title can choose a mode the host supports. A value of 3840x2160 or above does not enable the fallback, a value of 0 or a malformed value makes output-mode queries throw, and either axis alone can enable it. The buffer attributes and registered buffer sizes are left untouched. A title that keeps a 3840x2160 buffer still has that full buffer presented; the setting only affects output-mode selection, and it is off by default. ### Tested Linux 7.3.0-4-cachyos, GCC 16.2.1. Built `guest_video_out_host_resolution_limit_tests` with the host display and Vulkan device, not skipped: ``` guest_video_out_host_resolution_limit ......... Passed 0.40 sec guest_video_out_host_resolution_height_only ... Passed 0.40 sec guest_video_out_host_resolution_width_only .... Passed 0.40 sec guest_video_out_host_resolution_four_k ....... Passed 0.38 sec guest_video_out_host_resolution_malformed .... Passed 0.38 sec guest_video_out_host_resolution_disabled ...... Passed 0.38 sec ``` - The both-axis, height-only and width-only cases check the unknown-mode fallback through both `sceVideoOutIsOutputSupported` and `sceVideoOutConfigureOutput`; a below-4K configured size leaves `ConfigureOutput` returning `UNAVAILABLE_OUTPUT_MODE` (0x80290019). - The four-K, disabled and controls cases check that `VideoOutOutputSupport_nid_no_patch` keeps its real meaning: mode 1 is 1, mode 15 is 0 below 120 Hz and 1 at 120 Hz, mode 4 is `UNSUPPORTED_OUTPUT_MODE`, an unknown mode is `UNKNOWN_OUTPUT_MODE`, and an unknown mode returns `UNKNOWN_OUTPUT_MODE` both before and after setting 3840x2160. - The malformed case checks that a value such as `1920px` throws and names the variable. - Both setters, direct registration and `sceVideoOutSubmitChangeBufferAttribute2` keep the requested 3840x2160 attributes, including width-only and height-only cases. - `video_out_output_mode_policy` and `guest_video_out_output_mode` pass before and after this change. - The helpers and their four standard includes are now `static` in `Output.cpp`; `VideoOutDriver.hpp` is unchanged. - Validation-layer runs, Khronos validation layer loaded, no `VUID-` from 00xDisaster runs: on the change tree `video_out_output_mode_policy` and `guest_video_out_output_mode` passed, and on the same machine against `main` the same two tests passed. I also reran the six host-resolution tests and all passed. I captured four screenshots in a PPSA12544 run (Hollow Knight: Silksong, dumped by me and relinked from `0486c9a181`) with both limits set. The overlay reports `RES: 1920x1080 / 1920x1080` and the title presents gameplay at 120 FPS / 8.4 ms. The four screenshots from that run are in the PR thread (`limit-001.png` through `limit-004.png`); I intentionally did not upload them because image uploads are user-side. Windows 11 26300, WinLibs GCC 15.2.0, Release (maskym, independent run): the test linked after `#undef main`; `guest_video_out_host_resolution_limit`, `_height_only` and `_disabled` passed 2 runs each under the Khronos validation layer, with no new VUID. The host display was 2560x1440 at 165 Hz. Not run on a PS5. XairRrR separately verified a clean trial merge on an RTX 4070 Ti SUPER with no `VUID-` on either tree and a passing negative control. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce GTX 1660 SUPER, vendor 0x10de, driver 615.78.08, Linux 7.3.0-4-cachyos (00xDisaster); NVIDIA GeForce RTX 4070 Ti SUPER, driver 615.78.08 (XairRrR). Change and control tests ran under VK_LAYER_KHRONOS_validation; 0 `VUID-` on both. - [x] AI-assisted: no
XairRrR commented 2026-10-29 11:30:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T11:30:46Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The merge is clean, it builds, and the focused tests pass under the Khronos validation layer with no VUID-. The negative control fails as it should. I am requesting changes because the two new "max" variables never use their values, the debt entry names the wrong error code, and the GPUs tested line does not name a GPU.

What I ran

  • PR head: 9c758516fd0b50c20f9d446d7f643a7d091ff589
  • main: ba5b5330b37724bca4b99f30faab504653635a04
  • Trial merge of the head into main (no conflicts): 86aabf3caf1a846d627d9ce4d2cb1e55c3d22ed0
  • Host: Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (vendor 0x10de, device 0x2705, driver 615.78.08), Release, Ninja, in a clean worktree.
git fetch origin main pull/11948/head:refs/review/11948
git checkout --detach origin/main
git merge --no-ff --no-edit refs/review/11948
git diff --check origin/main...refs/review/11948
python3 tools/check_conventions.py --base origin/main
cmake --build build -j10 --target guest_video_out_host_resolution_limit_tests libs
cmake --build build -j10 --target guest_video_out_output_mode_tests video_out_output_mode_policy_tests
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \
  ctest --test-dir build -R '^(guest_video_out_host_resolution|video_out_output_mode_policy$|guest_video_out_output_mode$)' -V -j4 --output-on-failure

# same machine and GPU, on main
git checkout --detach origin/main
cmake --build build -j10 --target guest_video_out_output_mode_tests video_out_output_mode_policy_tests
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \
  ctest --test-dir build -R '^(video_out_output_mode_policy|guest_video_out_output_mode)$' -V -j4 --output-on-failure

Results

Check Result
Merge into main clean
git diff --check clean
tools/check_conventions.py --base origin/main All conventions checks passed.
Build (libs, new test, output-mode tests) OK, no warnings
guest_video_out_host_resolution_limit Passed (0.40 s), not skipped
guest_video_out_host_resolution_height_only Passed (0.40 s), not skipped
guest_video_out_host_resolution_disabled Passed (0.38 s), not skipped
video_out_output_mode_policy, guest_video_out_output_mode Passed on the merge and on main
Validation layer loaded yes, loader logs Insert instance layer "VK_LAYER_KHRONOS_validation" in each Vulkan test on both trees
was not found but was requested by env var VK_INSTANCE_LAYERS absent from both logs
VUID- lines 0 on the merge, 0 on main
Merged tree, ctest summary
1/5 Test #2321: video_out_output_mode_policy ..................   Passed    0.00 sec
2/5 Test #2349: guest_video_out_output_mode ...................   Passed    0.44 sec
3/5 Test #2350: guest_video_out_host_resolution_limit .........   Passed    0.40 sec
4/5 Test #2351: guest_video_out_host_resolution_height_only ...   Passed    0.40 sec
5/5 Test #2352: guest_video_out_host_resolution_disabled ......   Passed    0.38 sec
100% tests passed out of 5
main, ctest summary
1/2 Test #2321: video_out_output_mode_policy .....   Passed    0.00 sec
2/2 Test #2349: guest_video_out_output_mode ......   Passed    0.42 sec
100% tests passed out of 2

Negative control

I restored core/libs/prx/libSceVideoOut/src/Output.cpp and core/libs/prx/libSceVideoOut/include/VideoOutDriver.hpp from main, kept the new test, and rebuilt it:

1/3 Test #2351: guest_video_out_host_resolution_height_only ...Subprocess aborted***Exception:   0.84 sec
2/3 Test #2350: guest_video_out_host_resolution_limit .........Subprocess aborted***Exception:   0.82 sec
3/3 Test #2352: guest_video_out_host_resolution_disabled ......   Passed    0.38 sec

The two enabled cases fail without the change. The disabled case passes on main, as expected for a control. I then restored the merged files.

Findings

Blocking

  1. The "max width/height" values are parsed but never used. VideoOutDriver.hpp:62-85 parses ANYPS5_VIDEO_OUT_MAX_WIDTH and ANYPS5_VIDEO_OUT_MAX_HEIGHT as integers. Then VideoOutHostResolutionLimited() only checks whether either one is non-zero, and Output.cpp:305 never compares the numbers with anything.

    • Example: a user with a 4K display who sets ANYPS5_VIDEO_OUT_MAX_WIDTH=3840 gets the same rewrite of 0x8029001E to 0 as someone who sets 1920. PPSA12544 then drops to its non-4K path, which is the opposite of what a "max 3840" setting suggests.
    • ENVIRONMENT.md:572-573 lists both as integer, but the behaviour is a single on/off switch.
    • Suggested fix, either:
      • replace both variables with one presence variable named after what it does, e.g. "report unknown output modes as unsupported";
      • or use the value: apply the fallback only when the configured size is below 3840x2160. The existing APS5_OUTPUT_RESOLUTION already carries a host output size, so you could reuse it rather than add a second size knob.
  2. The debt entry names the wrong error code. docs/dev/debt/libSceVideoOut.md:34 says that sceVideoOutConfigureOutput answers VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE. The code returns VIDEO_OUT_ERROR_UNAVAILABLE_OUTPUT_MODE (0x80290019) for a support result of 0 (Output.cpp:317), and the new test asserts UNAVAILABLE_OUTPUT_MODE (GuestVideoOutHostResolutionLimit.cpp:96). The first paragraph of the PR description has the same mistake.

    • The same function already has a debt entry at line 20. It records that PPSA12544 probes 0xd000000a and that the console answers 0x8029001E.
    • Suggested fix: correct the code name and fold this text into the line-20 entry, so the function has one entry rather than two.
  3. GPUs tested does not name a GPU. It reads "AMD Ryzen 7 5700 host", which is a CPU without integrated graphics. For VideoOut changes, CONTRIBUTING.md:72 requires the vendor, model, driver and OS of each GPU the tests ran on, plus a main-versus-change comparison under the validation layer.

    • maskym's Windows run on the earlier head 35a1b236a1 and my NVIDIA run above cover part of this.
    • Suggested fix: name the GPU and driver the author's own runs used, and add that comparison.

Non-blocking

  • Helpers are in a widely included header. The three helpers and four new standard includes (<charconv>, <cstdlib>, <string_view>, <system_error>) sit in VideoOutDriver.hpp, which seven other files in core include. Only Output.cpp uses them. Moving them there as static functions keeps the header unchanged.
  • Malformed values are silently ignored. A value such as 1920px or 1920 turns the fallback off without any message. The neighbouring variables APS5_OUTPUT_RESOLUTION and ANYPS5_LANGUAGE throw on a malformed value and name the variable. Doing the same here would avoid a silently ignored setting. This becomes moot if finding 1 turns the setting into a presence variable.
  • Width-only is not tested. The test covers both axes, height only, and neither. It does not cover width only, although the code and docs say either axis enables the fallback.
  • One checklist line was reworded. In the PR body, the first line says "implements the same behaviour" where the template says "implements the same functions". The rules ask to keep the template lines as they are.

Not verified

  • The PPSA12544 presented-frame claim: I did not run any title.
  • Windows: I did not build there. maskym reported a passing run on 35a1b236a1, not on the current head.
  • The console's answer for 0xd000000a with a display below 4K: the description also says this is not measured.
  • Other GPU vendors: I only ran on NVIDIA.

To get this to a good state

  1. Make the variables mean what their names and docs say. Either use one presence variable for the unknown-mode rewrite, or make the configured size, or APS5_OUTPUT_RESOLUTION, decide whether the fallback applies. Update ENVIRONMENT.md and the test to match.
  2. Correct the error code in the debt entry and the description to UNAVAILABLE_OUTPUT_MODE (0x80290019), and merge the text into the existing sceVideoOutIsOutputSupported entry.
  3. Fill GPUs tested with the GPU model, driver and OS, and add a main-versus-change validation-layer comparison.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5696961806 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11948#pullrequestreview-5696961806). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-29T11:30:46Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The merge is clean, it builds, and the focused tests pass under the Khronos validation layer with no `VUID-`. The negative control fails as it should. I am requesting changes because the two new "max" variables never use their values, the debt entry names the wrong error code, and the `GPUs tested` line does not name a GPU. ## What I ran - PR head: `9c758516fd0b50c20f9d446d7f643a7d091ff589` - `main`: `ba5b5330b37724bca4b99f30faab504653635a04` - Trial merge of the head into `main` (no conflicts): `86aabf3caf1a846d627d9ce4d2cb1e55c3d22ed0` - Host: Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (vendor 0x10de, device 0x2705, driver 615.78.08), Release, Ninja, in a clean worktree. ```sh git fetch origin main pull/11948/head:refs/review/11948 git checkout --detach origin/main git merge --no-ff --no-edit refs/review/11948 git diff --check origin/main...refs/review/11948 python3 tools/check_conventions.py --base origin/main cmake --build build -j10 --target guest_video_out_host_resolution_limit_tests libs cmake --build build -j10 --target guest_video_out_output_mode_tests video_out_output_mode_policy_tests VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \ ctest --test-dir build -R '^(guest_video_out_host_resolution|video_out_output_mode_policy$|guest_video_out_output_mode$)' -V -j4 --output-on-failure # same machine and GPU, on main git checkout --detach origin/main cmake --build build -j10 --target guest_video_out_output_mode_tests video_out_output_mode_policy_tests VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_NO_SHADER_CACHE=1 ANYPS5_REQUIRE_VULKAN=1 VK_LOADER_DEBUG=error,warn,layer \ ctest --test-dir build -R '^(video_out_output_mode_policy|guest_video_out_output_mode)$' -V -j4 --output-on-failure ``` ## Results | Check | Result | |---|---| | Merge into `main` | clean | | `git diff --check` | clean | | `tools/check_conventions.py --base origin/main` | `All conventions checks passed.` | | Build (`libs`, new test, output-mode tests) | OK, no warnings | | `guest_video_out_host_resolution_limit` | Passed (0.40 s), not skipped | | `guest_video_out_host_resolution_height_only` | Passed (0.40 s), not skipped | | `guest_video_out_host_resolution_disabled` | Passed (0.38 s), not skipped | | `video_out_output_mode_policy`, `guest_video_out_output_mode` | Passed on the merge and on `main` | | Validation layer loaded | yes, loader logs `Insert instance layer "VK_LAYER_KHRONOS_validation"` in each Vulkan test on both trees | | `was not found but was requested by env var VK_INSTANCE_LAYERS` | absent from both logs | | `VUID-` lines | 0 on the merge, 0 on `main` | <details><summary>Merged tree, ctest summary</summary> ``` 1/5 Test #2321: video_out_output_mode_policy .................. Passed 0.00 sec 2/5 Test #2349: guest_video_out_output_mode ................... Passed 0.44 sec 3/5 Test #2350: guest_video_out_host_resolution_limit ......... Passed 0.40 sec 4/5 Test #2351: guest_video_out_host_resolution_height_only ... Passed 0.40 sec 5/5 Test #2352: guest_video_out_host_resolution_disabled ...... Passed 0.38 sec 100% tests passed out of 5 ``` </details> <details><summary><code>main</code>, ctest summary</summary> ``` 1/2 Test #2321: video_out_output_mode_policy ..... Passed 0.00 sec 2/2 Test #2349: guest_video_out_output_mode ...... Passed 0.42 sec 100% tests passed out of 2 ``` </details> ## Negative control I restored `core/libs/prx/libSceVideoOut/src/Output.cpp` and `core/libs/prx/libSceVideoOut/include/VideoOutDriver.hpp` from `main`, kept the new test, and rebuilt it: ``` 1/3 Test #2351: guest_video_out_host_resolution_height_only ...Subprocess aborted***Exception: 0.84 sec 2/3 Test #2350: guest_video_out_host_resolution_limit .........Subprocess aborted***Exception: 0.82 sec 3/3 Test #2352: guest_video_out_host_resolution_disabled ...... Passed 0.38 sec ``` The two enabled cases fail without the change. The disabled case passes on `main`, as expected for a control. I then restored the merged files. ## Findings ### Blocking 1. **The "max width/height" values are parsed but never used.** [`VideoOutDriver.hpp:62-85`](https://github.com/boykopovar/AnyPS5/blob/9c758516fd0b50c20f9d446d7f643a7d091ff589/core/libs/prx/libSceVideoOut/include/VideoOutDriver.hpp#L62-L85) parses `ANYPS5_VIDEO_OUT_MAX_WIDTH` and `ANYPS5_VIDEO_OUT_MAX_HEIGHT` as integers. Then `VideoOutHostResolutionLimited()` only checks whether either one is non-zero, and [`Output.cpp:305`](https://github.com/boykopovar/AnyPS5/blob/9c758516fd0b50c20f9d446d7f643a7d091ff589/core/libs/prx/libSceVideoOut/src/Output.cpp#L303-L306) never compares the numbers with anything. - Example: a user with a 4K display who sets `ANYPS5_VIDEO_OUT_MAX_WIDTH=3840` gets the same rewrite of `0x8029001E` to 0 as someone who sets `1920`. PPSA12544 then drops to its non-4K path, which is the opposite of what a "max 3840" setting suggests. - [`ENVIRONMENT.md:572-573`](https://github.com/boykopovar/AnyPS5/blob/9c758516fd0b50c20f9d446d7f643a7d091ff589/docs/dev/ENVIRONMENT.md#L572-L573) lists both as `integer`, but the behaviour is a single on/off switch. - Suggested fix, either: - replace both variables with one presence variable named after what it does, e.g. "report unknown output modes as unsupported"; - or use the value: apply the fallback only when the configured size is below 3840x2160. The existing [`APS5_OUTPUT_RESOLUTION`](https://github.com/boykopovar/AnyPS5/blob/ba5b5330b37724bca4b99f30faab504653635a04/core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp#L52-L66) already carries a host output size, so you could reuse it rather than add a second size knob. 2. **The debt entry names the wrong error code.** [`docs/dev/debt/libSceVideoOut.md:34`](https://github.com/boykopovar/AnyPS5/blob/9c758516fd0b50c20f9d446d7f643a7d091ff589/docs/dev/debt/libSceVideoOut.md#L34) says that `sceVideoOutConfigureOutput` answers `VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE`. The code returns `VIDEO_OUT_ERROR_UNAVAILABLE_OUTPUT_MODE` (0x80290019) for a support result of 0 ([`Output.cpp:317`](https://github.com/boykopovar/AnyPS5/blob/9c758516fd0b50c20f9d446d7f643a7d091ff589/core/libs/prx/libSceVideoOut/src/Output.cpp#L311-L317)), and the new test asserts `UNAVAILABLE_OUTPUT_MODE` (`GuestVideoOutHostResolutionLimit.cpp:96`). The first paragraph of the PR description has the same mistake. - The same function already has a debt entry at [line 20](https://github.com/boykopovar/AnyPS5/blob/9c758516fd0b50c20f9d446d7f643a7d091ff589/docs/dev/debt/libSceVideoOut.md#L20). It records that PPSA12544 probes `0xd000000a` and that the console answers 0x8029001E. - Suggested fix: correct the code name and fold this text into the line-20 entry, so the function has one entry rather than two. 3. **`GPUs tested` does not name a GPU.** It reads "AMD Ryzen 7 5700 host", which is a CPU without integrated graphics. For VideoOut changes, [CONTRIBUTING.md:72](https://github.com/boykopovar/AnyPS5/blob/ba5b5330b37724bca4b99f30faab504653635a04/CONTRIBUTING.md#L72) requires the vendor, model, driver and OS of each GPU the tests ran on, plus a `main`-versus-change comparison under the validation layer. - maskym's Windows run on the earlier head `35a1b236a1` and my NVIDIA run above cover part of this. - Suggested fix: name the GPU and driver the author's own runs used, and add that comparison. ### Non-blocking - **Helpers are in a widely included header.** The three helpers and four new standard includes (`<charconv>`, `<cstdlib>`, `<string_view>`, `<system_error>`) sit in `VideoOutDriver.hpp`, which seven other files in `core` include. Only `Output.cpp` uses them. Moving them there as `static` functions keeps the header unchanged. - **Malformed values are silently ignored.** A value such as `1920px` or ` 1920` turns the fallback off without any message. The neighbouring variables `APS5_OUTPUT_RESOLUTION` and `ANYPS5_LANGUAGE` throw on a malformed value and name the variable. Doing the same here would avoid a silently ignored setting. This becomes moot if finding 1 turns the setting into a presence variable. - **Width-only is not tested.** The test covers both axes, height only, and neither. It does not cover width only, although the code and docs say either axis enables the fallback. - **One checklist line was reworded.** In the PR body, the first line says "implements the same behaviour" where the template says "implements the same functions". The rules ask to keep the template lines as they are. ## Not verified - The PPSA12544 presented-frame claim: I did not run any title. - Windows: I did not build there. maskym reported a passing run on `35a1b236a1`, not on the current head. - The console's answer for `0xd000000a` with a display below 4K: the description also says this is not measured. - Other GPU vendors: I only ran on NVIDIA. ## To get this to a good state 1. Make the variables mean what their names and docs say. Either use one presence variable for the unknown-mode rewrite, or make the configured size, or `APS5_OUTPUT_RESOLUTION`, decide whether the fallback applies. Update `ENVIRONMENT.md` and the test to match. 2. Correct the error code in the debt entry and the description to `UNAVAILABLE_OUTPUT_MODE` (0x80290019), and merge the text into the existing `sceVideoOutIsOutputSupported` entry. 3. Fill `GPUs tested` with the GPU model, driver and OS, and add a `main`-versus-change validation-layer comparison.
XairRrR commented 2026-10-29 11:51:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T11:51:29Z.

Review: CHANGES_REQUESTED


Re-checked — changes still requested

The new head e9521cd7c2 changes only the debt entry, which now names UNAVAILABLE_OUTPUT_MODE. The code, the test and the PR description are unchanged, so two of my three blocking findings are still open.

What changed since my last review

  • One force-pushed commit, e9521cd7c2. Against the previously reviewed head 9c758516fd, the only change is line 34 of docs/dev/debt/libSceVideoOut.md:
    • VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE becomes VIDEO_OUT_ERROR_UNAVAILABLE_OUTPUT_MODE (0x80290019);
    • a new sentence says a known-but-unsupported mode still answers VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE (0x80290016).
  • The description was last edited at 11:26 UTC, before my previous review at 11:30 UTC. No author comments since then.

What I ran

  • PR head: e9521cd7c2f550fc6536299a0343d2bc4e42a44a
  • main: ba5b5330b37724bca4b99f30faab504653635a04 (the same main as my previous review)
  • Trial merge, no conflicts: a5bb83b95e0b569ae5ab8e500a2f21b88aea74ef
  • Host: Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08), in a clean worktree.
git fetch origin main pull/11948/head:refs/review/11948
git diff 9c758516fd0b50c20f9d446d7f643a7d091ff589 refs/review/11948
git checkout --detach origin/main
git merge --no-ff --no-edit refs/review/11948
git diff 86aabf3caf1a846d627d9ce4d2cb1e55c3d22ed0 HEAD --stat   # previous trial merge vs this one
git merge-tree --write-tree origin/main refs/review/11948
git diff --check origin/main...refs/review/11948
python3 tools/check_conventions.py --base origin/main

I did not rebuild or rerun the tests. The diff between this trial merge and the previous one is only docs/dev/debt/libSceVideoOut.md (1 line), so the build, the focused validation-layer runs (0 VUID- on both trees) and the negative control from my previous review still apply to the same code.

Check Result
Merge into main clean
git diff --check clean
tools/check_conventions.py --base origin/main 0 errors, 1 new warning (see below)
check_conventions.py output
docs/dev/debt/libSceVideoOut.md:34: warning: [debt-length] Technical debt entry over 1000 characters: state the gap first (what differs from the console, what is unverified, what throws) and keep only the behaviour it needs: 1037 characters
1 findings, 0 errors; GitHub shows at most 10 error annotations, the job summary lists all

Previous findings

  1. The max width/height values are never used. Still open. The code is unchanged: VideoOutHostResolutionLimited() still only checks for non-zero, and Output.cpp:305 never compares the values with anything. ANYPS5_VIDEO_OUT_MAX_WIDTH=3840 still behaves like 1920.
  2. Wrong error code in the debt entry. Partly resolved.
    • The debt entry now names UNAVAILABLE_OUTPUT_MODE (0x80290019), which matches Output.cpp:317.
    • Still open: the first paragraph of the description still says sceVideoOutConfigureOutput answers VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE.
    • Still open: the text is still a second entry for sceVideoOutIsOutputSupported and is not folded into the line-20 entry.
  3. GPUs tested does not name a GPU. Still open. It still reads "AMD Ryzen 7 5700 host". CONTRIBUTING.md:72 asks for a main-versus-change validation-layer comparison for VideoOut changes. The description still has none from the author's own GPU.

Of the previous non-blocking points, the helpers in the widely included header, the silently ignored malformed values, the missing width-only test and the reworded checklist line are all unchanged.

New findings

Blocking

None.

Non-blocking

  1. The new sentence is wrong for mode 15. docs/dev/debt/libSceVideoOut.md:34 says "A known-but-unsupported mode still answers VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE (0x80290016)". That is true for modes 4, 7, 8, 0xC-0xE, 0x10, 0x11 and 0x13 (Output.cpp:37-39). Mode 15 on a display below 120 Hz is also a known mode the host does not support. For it, VideoOutOutputSupport_nid_no_patch returns 0 (Output.cpp:56), and ConfigureOutput answers UNAVAILABLE_OUTPUT_MODE.
    • The line-20 entry already records this behaviour, so the sentence is not needed.
    • Suggested fix: drop the sentence.
  2. The entry now goes over the debt length limit. With the new sentence, the entry is 1037 characters, and check_conventions.py now warns [debt-length] on line 34. The previous head passed without a warning.
    • Suggested fix: drop the sentence from point 1, or merge the entry into line 20 as finding 2 asks. Either one also removes the warning.

Not verified

  • No rebuild or test rerun on this head, because the code is unchanged (see What I ran).
  • The PPSA12544 presented-frame claim and Windows results, as before. maskym's Windows run was on 35a1b236a1.

To get this to a good state

  1. Make the variables mean what their names and ENVIRONMENT.md say. Either use one presence variable for the unknown-mode rewrite, or make the configured size (or APS5_OUTPUT_RESOLUTION) decide whether the fallback applies. Update the test to match.
  2. Fix the description's first paragraph to say UNAVAILABLE_OUTPUT_MODE. Fold the debt text into the existing sceVideoOutIsOutputSupported entry at line 20 and drop the mode-15-incorrect sentence. That also clears the debt-length warning.
  3. Fill GPUs tested with your GPU model, driver and OS, and add the main-versus-change validation-layer comparison from that GPU.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5697206436 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11948#pullrequestreview-5697206436). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-29T11:51:29Z. **Review:** CHANGES_REQUESTED --- # Re-checked — changes still requested The new head `e9521cd7c2` changes only the debt entry, which now names `UNAVAILABLE_OUTPUT_MODE`. The code, the test and the PR description are unchanged, so two of my three blocking findings are still open. ## What changed since my last review - One force-pushed commit, `e9521cd7c2`. Against the previously reviewed head `9c758516fd`, the only change is line 34 of `docs/dev/debt/libSceVideoOut.md`: - `VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE` becomes `VIDEO_OUT_ERROR_UNAVAILABLE_OUTPUT_MODE (0x80290019)`; - a new sentence says a known-but-unsupported mode still answers `VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE (0x80290016)`. - The description was last edited at 11:26 UTC, before my previous review at 11:30 UTC. No author comments since then. ## What I ran - PR head: `e9521cd7c2f550fc6536299a0343d2bc4e42a44a` - `main`: `ba5b5330b37724bca4b99f30faab504653635a04` (the same `main` as my previous review) - Trial merge, no conflicts: `a5bb83b95e0b569ae5ab8e500a2f21b88aea74ef` - Host: Arch Linux 7.2.11-zen, GCC 16.2.1, Intel Core i9-14900KF, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.78.08), in a clean worktree. ```sh git fetch origin main pull/11948/head:refs/review/11948 git diff 9c758516fd0b50c20f9d446d7f643a7d091ff589 refs/review/11948 git checkout --detach origin/main git merge --no-ff --no-edit refs/review/11948 git diff 86aabf3caf1a846d627d9ce4d2cb1e55c3d22ed0 HEAD --stat # previous trial merge vs this one git merge-tree --write-tree origin/main refs/review/11948 git diff --check origin/main...refs/review/11948 python3 tools/check_conventions.py --base origin/main ``` I did not rebuild or rerun the tests. The diff between this trial merge and the previous one is only `docs/dev/debt/libSceVideoOut.md` (1 line), so the build, the focused validation-layer runs (0 `VUID-` on both trees) and the negative control from my previous review still apply to the same code. | Check | Result | |---|---| | Merge into `main` | clean | | `git diff --check` | clean | | `tools/check_conventions.py --base origin/main` | 0 errors, 1 new warning (see below) | <details><summary><code>check_conventions.py</code> output</summary> ``` docs/dev/debt/libSceVideoOut.md:34: warning: [debt-length] Technical debt entry over 1000 characters: state the gap first (what differs from the console, what is unverified, what throws) and keep only the behaviour it needs: 1037 characters 1 findings, 0 errors; GitHub shows at most 10 error annotations, the job summary lists all ``` </details> ## Previous findings 1. **The max width/height values are never used.** Still open. The code is unchanged: [`VideoOutHostResolutionLimited()`](https://github.com/boykopovar/AnyPS5/blob/e9521cd7c2f550fc6536299a0343d2bc4e42a44a/core/libs/prx/libSceVideoOut/include/VideoOutDriver.hpp#L82-L85) still only checks for non-zero, and [`Output.cpp:305`](https://github.com/boykopovar/AnyPS5/blob/e9521cd7c2f550fc6536299a0343d2bc4e42a44a/core/libs/prx/libSceVideoOut/src/Output.cpp#L303-L306) never compares the values with anything. `ANYPS5_VIDEO_OUT_MAX_WIDTH=3840` still behaves like `1920`. 2. **Wrong error code in the debt entry.** Partly resolved. - The debt entry now names `UNAVAILABLE_OUTPUT_MODE (0x80290019)`, which matches [`Output.cpp:317`](https://github.com/boykopovar/AnyPS5/blob/e9521cd7c2f550fc6536299a0343d2bc4e42a44a/core/libs/prx/libSceVideoOut/src/Output.cpp#L311-L317). - Still open: the first paragraph of the description still says `sceVideoOutConfigureOutput` answers `VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE`. - Still open: the text is still a second entry for `sceVideoOutIsOutputSupported` and is not folded into the [line-20 entry](https://github.com/boykopovar/AnyPS5/blob/e9521cd7c2f550fc6536299a0343d2bc4e42a44a/docs/dev/debt/libSceVideoOut.md#L20). 3. **`GPUs tested` does not name a GPU.** Still open. It still reads "AMD Ryzen 7 5700 host". [CONTRIBUTING.md:72](https://github.com/boykopovar/AnyPS5/blob/ba5b5330b37724bca4b99f30faab504653635a04/CONTRIBUTING.md#L72) asks for a `main`-versus-change validation-layer comparison for VideoOut changes. The description still has none from the author's own GPU. Of the previous non-blocking points, the helpers in the widely included header, the silently ignored malformed values, the missing width-only test and the reworded checklist line are all unchanged. ## New findings ### Blocking None. ### Non-blocking 1. **The new sentence is wrong for mode 15.** [`docs/dev/debt/libSceVideoOut.md:34`](https://github.com/boykopovar/AnyPS5/blob/e9521cd7c2f550fc6536299a0343d2bc4e42a44a/docs/dev/debt/libSceVideoOut.md#L34) says "A known-but-unsupported mode still answers VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE (0x80290016)". That is true for modes 4, 7, 8, 0xC-0xE, 0x10, 0x11 and 0x13 ([`Output.cpp:37-39`](https://github.com/boykopovar/AnyPS5/blob/e9521cd7c2f550fc6536299a0343d2bc4e42a44a/core/libs/prx/libSceVideoOut/src/Output.cpp#L37-L39)). Mode 15 on a display below 120 Hz is also a known mode the host does not support. For it, `VideoOutOutputSupport_nid_no_patch` returns 0 ([`Output.cpp:56`](https://github.com/boykopovar/AnyPS5/blob/e9521cd7c2f550fc6536299a0343d2bc4e42a44a/core/libs/prx/libSceVideoOut/src/Output.cpp#L54-L58)), and `ConfigureOutput` answers `UNAVAILABLE_OUTPUT_MODE`. - The line-20 entry already records this behaviour, so the sentence is not needed. - Suggested fix: drop the sentence. 2. **The entry now goes over the debt length limit.** With the new sentence, the entry is 1037 characters, and `check_conventions.py` now warns `[debt-length]` on line 34. The previous head passed without a warning. - Suggested fix: drop the sentence from point 1, or merge the entry into line 20 as finding 2 asks. Either one also removes the warning. ## Not verified - No rebuild or test rerun on this head, because the code is unchanged (see What I ran). - The PPSA12544 presented-frame claim and Windows results, as before. maskym's Windows run was on `35a1b236a1`. ## To get this to a good state 1. Make the variables mean what their names and `ENVIRONMENT.md` say. Either use one presence variable for the unknown-mode rewrite, or make the configured size (or `APS5_OUTPUT_RESOLUTION`) decide whether the fallback applies. Update the test to match. 2. Fix the description's first paragraph to say `UNAVAILABLE_OUTPUT_MODE`. Fold the debt text into the existing `sceVideoOutIsOutputSupported` entry at line 20 and drop the mode-15-incorrect sentence. That also clears the `debt-length` warning. 3. Fill `GPUs tested` with your GPU model, driver and OS, and add the `main`-versus-change validation-layer comparison from that GPU.
XairRrR commented 2026-11-02 20:19:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T20:19:33Z.

Review: COMMENTED


Re-checked — comments

Head 65e1a512a8 fixes all three blocking findings from my last review. The fallback now turns on only for a size below 3840x2160, malformed or zero values throw, the helpers are file-local in Output.cpp, the separate debt entry is gone, and GPUs tested names a GPU. I found nothing blocking. I'm not approving because the six new tests skip on this machine (there is no display), so I could not run them or the negative control myself.

What changed since my last review

  • One force-pushed commit, 65e1a512a8, which replaces e9521cd7c2. Compared with that head:
    • The helpers moved out of VideoOutDriver.hpp into an anonymous namespace in Output.cpp. That header is now untouched.
    • ParseVideoOutHostDimension throws std::runtime_error naming the variable when a value is empty, malformed or zero.
    • VideoOutHostResolutionLimited() is true only for width < 3840 or height < 2160.
    • New tests width_only, four_k and malformed.
    • The test's duplicate extern "C" declarations are replaced by including Buffer.hpp. This fixes the public_headers failure that TechLevelZero's NVIDIA CI reported on e9521cd.
    • The docs/dev/debt/libSceVideoOut.md entry is removed.
    • The ENVIRONMENT.md rows now describe the below-4K rule and the throwing values.
  • Description: the first paragraph now says UNAVAILABLE_OUTPUT_MODE (0x80290019). GPUs tested names a GTX 1660 SUPER (driver 615.78.08, Linux 7.3.0-4-cachyos) and claims a validation-layer comparison between main and the change.
  • Discussion since then:
    • The author's two replies.
    • TechLevelZero's NVIDIA CI passed on 65e1a51 merged onto 93dbd0f. Its skip list does not include the new tests, so they ran there.
    • maskym reports 6/6 passing on Windows over three runs.

What I ran

  • PR head: 65e1a512a84131803d38b617429f90d80e2254f0
  • main: 096c45570f516de76a43bbe1b97781381c84f55f
  • Merged tree: 8669e02e1f02c21b916ae3da22d3ed02c4416034
  • Machine: Debian 13 VM, 2× Xeon Gold 6136, GCC 14.2.0, Vulkan through lavapipe (Mesa 26.1.6), no GPU and no display.
git diff --check 096c45570f516de76a43bbe1b97781381c84f55f...65e1a512a84131803d38b617429f90d80e2254f0
python3 tools/check_conventions.py --base 096c45570f516de76a43bbe1b97781381c84f55f
ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(guest_video_out_host_resolution|video_out_output_mode_policy|guest_video_out_output_mode)"
build/tests/guest_video_out_host_resolution_limit_tests
SDL_VIDEODRIVER=offscreen build/tests/guest_video_out_host_resolution_limit_tests
Check Result
Merge into main clean
Build (script, Release, GCC, Ninja) ok
git diff --check clean
check_conventions.py all checks passed
Selected tests (script, 2297 run) 0 new failures, 0 timeouts; the known main failures guest_interfaces, guest_socket_options_multicast, unwrap_self, vector_constant_factor_tininess are not the PR's
Validation layer (script, 39 tests) layer loaded in 39 of 39, 0 new VUID-
video_out_output_mode_policy passed
guest_video_out_host_resolution_* (6 tests), guest_video_out_output_mode skipped (exit 77, no display)
Why the tests skip here
skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
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

There is no Xvfb or other virtual display in the sandbox.

Negative control

I did not run it. With Output.cpp restored from main, the tests would still exit 77 at sceVideoOutOpen before any assertion runs, so the result would show nothing.

Reading the test against main's Output.cpp, I expect:

  • limit, height_only and width_only to fail: main returns 0x8029001E where the test expects 0.
  • malformed to fail: nothing on main throws.
  • four_k and disabled to pass, since they check main's behaviour.

This is reasoning only, not a run.

Previous findings

  1. The max width/height values were never used. Resolved.
    • core/libs/prx/libSceVideoOut/src/Output.cpp:51-54 compares each value with 3840 and 2160.
    • The four_k case checks that 3840x2160 keeps answering UNKNOWN_OUTPUT_MODE (core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:89-92).
  2. Wrong error code in the description and debt text, and a second debt entry. Resolved.
    • The first paragraph of the description now says VIDEO_OUT_ERROR_UNAVAILABLE_OUTPUT_MODE (0x80290019). That matches Output.cpp:388.
    • The extra debt entry is removed, so there is nothing left to fold into the line-20 entry. The option is opt-in and documented in ENVIRONMENT.md, and no code comment needs a debt entry.
  3. GPUs tested did not name a GPU. Resolved, author-reported. It names an NVIDIA GeForce GTX 1660 SUPER (0x10de, driver 615.78.08, Linux 7.3.0-4-cachyos) and states the comparison between main and the change with the layer loaded and 0 VUID-. TechLevelZero's NVIDIA CI on this head also reports no new validation IDs.
  4. Previous non-blocking points:
    • Helpers in the widely included header: resolved; they are file-local in Output.cpp:23-56.
    • Malformed values silently ignored: resolved; they now throw with the variable's name.
    • No width-only test: resolved.
    • Mode-15 sentence and debt-length warning: no longer apply, because the debt entry was removed.

New findings

Blocking

None.

Non-blocking

  1. The commit message describes code that is no longer in the PR.
    • The body of 65e1a512a8 still says the variables "clamp every buffer attribute the guest registers". It also says sceVideoOutConfigureOutput answers VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE, and that "an unset, empty, malformed or zero value disables that axis".
    • All three are wrong for this head: there is no clamp, the answer is UNAVAILABLE_OUTPUT_MODE, and empty, malformed or zero values throw.
    • If the PR is merged by rebase, this text goes into main's history.
    • Suggested fix: reword the commit body to match the description, then force-push.
  2. Bad values throw only when an unknown mode is queried, but ENVIRONMENT.md says every query throws.
    • At Output.cpp:376, result == VIDEO_OUT_ERROR_UNKNOWN_OUTPUT_MODE && VideoOutHostResolutionLimited() short-circuits. A malformed value is only read, and only throws, when a title asks for an unknown mode.
    • ENVIRONMENT.md:609-610 says "a malformed or zero value makes output-mode queries throw".
    • A title that only queries modes 1 and 15 runs with a bad value and never reports it.
    • Suggested fix: either read the limit unconditionally in sceVideoOutIsOutputSupported (or when the video out starts), as ANYPS5_PAD_PORT0_STATE does, or change the rows to say "makes a query for an unknown output mode throw".
  3. The description still cites old verification.
    • It says "XairRrR separately verified a clean trial merge … and a passing negative control". That was for 9c758516fd/e9521cd7c2, before the threshold and throw logic existed.
    • It also lists four-K, disabled and controls cases, but there is no controls test.
    • Suggested fix: say which head each piece of evidence is for, or drop the line.

Not verified

  • I could not run the six guest_video_out_host_resolution_* tests or guest_video_out_output_mode here: they skip without a display. Their passing results come from the author, from maskym (Windows, 6/6 over three runs) and from TechLevelZero's NVIDIA CI on this head.
  • The negative control, for the same reason.
  • The PPSA12544 presented-frame claim (RES: 1920x1080): it comes from screenshots, and I did not launch a title.
  • Behaviour on a PS5.

To get this to a good state

  1. Reword the commit message to match what the code now does (non-blocking finding 1).
  2. Either make a bad value throw on any output-mode query, or narrow the ENVIRONMENT.md wording (non-blocking finding 2).
  3. Optionally, update the description's verification lines to name the head each piece of evidence is for.

A run of the six tests on a machine with a display, together with the negative control, would let this be approved.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5742777330 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11948#pullrequestreview-5742777330). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-02T20:19:33Z. **Review:** COMMENTED --- # Re-checked — comments Head `65e1a512a8` fixes all three blocking findings from my last review. The fallback now turns on only for a size below 3840x2160, malformed or zero values throw, the helpers are file-local in `Output.cpp`, the separate debt entry is gone, and `GPUs tested` names a GPU. I found nothing blocking. I'm not approving because the six new tests skip on this machine (there is no display), so I could not run them or the negative control myself. ## What changed since my last review - One force-pushed commit, `65e1a512a8`, which replaces `e9521cd7c2`. Compared with that head: - The helpers moved out of `VideoOutDriver.hpp` into an anonymous namespace in `Output.cpp`. That header is now untouched. - `ParseVideoOutHostDimension` throws `std::runtime_error` naming the variable when a value is empty, malformed or zero. - `VideoOutHostResolutionLimited()` is true only for `width < 3840` or `height < 2160`. - New tests `width_only`, `four_k` and `malformed`. - The test's duplicate `extern "C"` declarations are replaced by including `Buffer.hpp`. This fixes the `public_headers` failure that TechLevelZero's NVIDIA CI reported on `e9521cd`. - The `docs/dev/debt/libSceVideoOut.md` entry is removed. - The `ENVIRONMENT.md` rows now describe the below-4K rule and the throwing values. - Description: the first paragraph now says `UNAVAILABLE_OUTPUT_MODE` (0x80290019). `GPUs tested` names a GTX 1660 SUPER (driver 615.78.08, Linux 7.3.0-4-cachyos) and claims a validation-layer comparison between `main` and the change. - Discussion since then: - The author's two replies. - TechLevelZero's NVIDIA CI passed on `65e1a51` merged onto `93dbd0f`. Its skip list does not include the new tests, so they ran there. - maskym reports 6/6 passing on Windows over three runs. ## What I ran - PR head: `65e1a512a84131803d38b617429f90d80e2254f0` - `main`: `096c45570f516de76a43bbe1b97781381c84f55f` - Merged tree: `8669e02e1f02c21b916ae3da22d3ed02c4416034` - Machine: Debian 13 VM, 2× Xeon Gold 6136, GCC 14.2.0, Vulkan through lavapipe (Mesa 26.1.6), no GPU and no display. ```sh git diff --check 096c45570f516de76a43bbe1b97781381c84f55f...65e1a512a84131803d38b617429f90d80e2254f0 python3 tools/check_conventions.py --base 096c45570f516de76a43bbe1b97781381c84f55f ctest --test-dir build -j8 --test-load 32 --output-on-failure -R "^(guest_video_out_host_resolution|video_out_output_mode_policy|guest_video_out_output_mode)" build/tests/guest_video_out_host_resolution_limit_tests SDL_VIDEODRIVER=offscreen build/tests/guest_video_out_host_resolution_limit_tests ``` | Check | Result | |---|---| | Merge into `main` | clean | | Build (script, Release, GCC, Ninja) | ok | | `git diff --check` | clean | | `check_conventions.py` | all checks passed | | Selected tests (script, 2297 run) | 0 new failures, 0 timeouts; the known `main` failures `guest_interfaces`, `guest_socket_options_multicast`, `unwrap_self`, `vector_constant_factor_tininess` are not the PR's | | Validation layer (script, 39 tests) | layer loaded in 39 of 39, 0 new `VUID-` | | `video_out_output_mode_policy` | passed | | `guest_video_out_host_resolution_*` (6 tests), `guest_video_out_output_mode` | **skipped** (exit 77, no display) | <details><summary>Why the tests skip here</summary> ``` skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available 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 ``` There is no Xvfb or other virtual display in the sandbox. </details> ### Negative control I did not run it. With `Output.cpp` restored from `main`, the tests would still exit 77 at `sceVideoOutOpen` before any assertion runs, so the result would show nothing. Reading the test against `main`'s `Output.cpp`, I expect: - `limit`, `height_only` and `width_only` to fail: `main` returns `0x8029001E` where the test expects 0. - `malformed` to fail: nothing on `main` throws. - `four_k` and `disabled` to pass, since they check `main`'s behaviour. This is reasoning only, not a run. ## Previous findings 1. **The max width/height values were never used.** Resolved. - `core/libs/prx/libSceVideoOut/src/Output.cpp:51-54` compares each value with 3840 and 2160. - The `four_k` case checks that 3840x2160 keeps answering `UNKNOWN_OUTPUT_MODE` (`core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:89-92`). 2. **Wrong error code in the description and debt text, and a second debt entry.** Resolved. - The first paragraph of the description now says `VIDEO_OUT_ERROR_UNAVAILABLE_OUTPUT_MODE` (0x80290019). That matches `Output.cpp:388`. - The extra debt entry is removed, so there is nothing left to fold into the line-20 entry. The option is opt-in and documented in `ENVIRONMENT.md`, and no code comment needs a debt entry. 3. **`GPUs tested` did not name a GPU.** Resolved, author-reported. It names an NVIDIA GeForce GTX 1660 SUPER (0x10de, driver 615.78.08, Linux 7.3.0-4-cachyos) and states the comparison between `main` and the change with the layer loaded and 0 `VUID-`. TechLevelZero's NVIDIA CI on this head also reports no new validation IDs. 4. Previous non-blocking points: - *Helpers in the widely included header*: resolved; they are file-local in `Output.cpp:23-56`. - *Malformed values silently ignored*: resolved; they now throw with the variable's name. - *No width-only test*: resolved. - *Mode-15 sentence and `debt-length` warning*: no longer apply, because the debt entry was removed. ## New findings ### Blocking None. ### Non-blocking 1. **The commit message describes code that is no longer in the PR.** - The body of `65e1a512a8` still says the variables "clamp every buffer attribute the guest registers". It also says `sceVideoOutConfigureOutput` answers `VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE`, and that "an unset, empty, malformed or zero value disables that axis". - All three are wrong for this head: there is no clamp, the answer is `UNAVAILABLE_OUTPUT_MODE`, and empty, malformed or zero values throw. - If the PR is merged by rebase, this text goes into `main`'s history. - Suggested fix: reword the commit body to match the description, then force-push. 2. **Bad values throw only when an unknown mode is queried, but `ENVIRONMENT.md` says every query throws.** - At `Output.cpp:376`, `result == VIDEO_OUT_ERROR_UNKNOWN_OUTPUT_MODE && VideoOutHostResolutionLimited()` short-circuits. A malformed value is only read, and only throws, when a title asks for an unknown mode. - `ENVIRONMENT.md:609-610` says "a malformed or zero value makes output-mode queries throw". - A title that only queries modes 1 and 15 runs with a bad value and never reports it. - Suggested fix: either read the limit unconditionally in `sceVideoOutIsOutputSupported` (or when the video out starts), as `ANYPS5_PAD_PORT0_STATE` does, or change the rows to say "makes a query for an unknown output mode throw". 3. **The description still cites old verification.** - It says "XairRrR separately verified a clean trial merge … and a passing negative control". That was for `9c758516fd`/`e9521cd7c2`, before the threshold and throw logic existed. - It also lists `four-K, disabled and controls cases`, but there is no `controls` test. - Suggested fix: say which head each piece of evidence is for, or drop the line. ## Not verified - I could not run the six `guest_video_out_host_resolution_*` tests or `guest_video_out_output_mode` here: they skip without a display. Their passing results come from the author, from maskym (Windows, 6/6 over three runs) and from TechLevelZero's NVIDIA CI on this head. - The negative control, for the same reason. - The PPSA12544 presented-frame claim (`RES: 1920x1080`): it comes from screenshots, and I did not launch a title. - Behaviour on a PS5. ## To get this to a good state 1. Reword the commit message to match what the code now does (non-blocking finding 1). 2. Either make a bad value throw on any output-mode query, or narrow the `ENVIRONMENT.md` wording (non-blocking finding 2). 3. Optionally, update the description's verification lines to name the head each piece of evidence is for. A run of the six tests on a machine with a display, together with the negative control, would let this be approved. <!-- anyps5-bots job=1909 head=65e1a512a84131803d38b617429f90d80e2254f0 -->
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!11948
No description provided.