Skip to content

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

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
00xDisaster:feat/video-out-host-policy-current
Nov 5, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
00xDisaster:feat/video-out-host-policy-current

Conversation

@00xDisaster

@00xDisaster 00xDisaster commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

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

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@00xDisaster Thanks, the output-mode fallback reads right, and with both variables unset nothing changes. One problem with the attribute clamp: a title that ignores the fallback still renders its 3840x2160 frames into memory it sized itself, but the presenter now reads that buffer as 1920x1080. For a linear buffer pitch_in_pixel is 0, so DisplayBuffer.cpp takes the pitch from the clamped width (lines 44/139/178) and each displayed row samples the wrong bytes. A tiled buffer's layout also depends on width. The new test checks only the stored numbers, not what is presented. Could you either drop the clamp in CommitBufferGroup/sceVideoOutSubmitChangeBufferAttribute2 (and in the SetBufferAttribute helpers, unless a title is shown to size its render targets from them) and keep only the fallback, or show a presented frame from a title with the limit set (PPSA12544 would do)?

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

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

Pull request Shared files not compared
PR 1896 docs/dev/ENVIRONMENT.md
PR 4040 core/libs/prx/libSceVideoOut/src/Output.cpp
PR 4472 docs/dev/ENVIRONMENT.md
PR 5021 core/libs/prx/libSceVideoOut/CMakeLists.txt
PR 6186 docs/dev/ENVIRONMENT.md
PR 6924 docs/dev/ENVIRONMENT.md
PR 7449 docs/dev/ENVIRONMENT.md
PR 7457 docs/dev/ENVIRONMENT.md
PR 7514 docs/dev/ENVIRONMENT.md
PR 7604 docs/dev/ENVIRONMENT.md
PR 7642 docs/dev/ENVIRONMENT.md
PR 7643 docs/dev/ENVIRONMENT.md
PR 8004 docs/dev/ENVIRONMENT.md
PR 8246 docs/dev/ENVIRONMENT.md
PR 8484 docs/dev/ENVIRONMENT.md
PR 9012 docs/dev/ENVIRONMENT.md
PR 9289 docs/dev/ENVIRONMENT.md
PR 9345 docs/dev/ENVIRONMENT.md
PR 9356 docs/dev/ENVIRONMENT.md
PR 9387 docs/dev/ENVIRONMENT.md
PR 9508 docs/dev/ENVIRONMENT.md
PR 9676 docs/dev/ENVIRONMENT.md
PR 9712 docs/dev/ENVIRONMENT.md
PR 9852 docs/dev/ENVIRONMENT.md
PR 9875 docs/dev/ENVIRONMENT.md
PR 10193 docs/dev/ENVIRONMENT.md
PR 10442 docs/dev/ENVIRONMENT.md
PR 10678 docs/dev/ENVIRONMENT.md
PR 10757 docs/dev/ENVIRONMENT.md
PR 10894 docs/dev/ENVIRONMENT.md
PR 11436 docs/dev/ENVIRONMENT.md
PR 12324 docs/dev/ENVIRONMENT.md
PR 12746 docs/dev/ENVIRONMENT.md
PR 12849 docs/dev/ENVIRONMENT.md
PR 13486 core/libs/prx/libSceVideoOut/CMakeLists.txt
core/libs/prx/libSceVideoOut/src/Output.cpp
docs/dev/ENVIRONMENT.md
PR 13793 docs/dev/ENVIRONMENT.md
PR 13809 docs/dev/ENVIRONMENT.md
PR 13863 docs/dev/ENVIRONMENT.md
PR 13920 docs/dev/ENVIRONMENT.md
PR 13928 docs/dev/ENVIRONMENT.md
PR 13929 docs/dev/ENVIRONMENT.md
PR 14051 docs/dev/ENVIRONMENT.md
PR 14262 docs/dev/ENVIRONMENT.md
PR 14299 docs/dev/ENVIRONMENT.md
PR 14943 docs/dev/ENVIRONMENT.md
PR 15059 docs/dev/ENVIRONMENT.md
PR 15136 docs/dev/ENVIRONMENT.md
PR 15169 docs/dev/ENVIRONMENT.md
PR 15529 docs/dev/ENVIRONMENT.md
PR 15548 docs/dev/ENVIRONMENT.md
PR 15570 docs/dev/ENVIRONMENT.md

@00xDisaster
00xDisaster force-pushed the feat/video-out-host-policy-current branch from 563ad31 to 516fb89 Compare October 27, 2026 14:43
@00xDisaster

Copy link
Copy Markdown
Contributor Author

@oneandonlydean fixed at 516fb894fd: I dropped the buffer clamp from both attribute setters, CommitBufferGroup and sceVideoOutSubmitChangeBufferAttribute2. The limit now only makes an unknown output mode report unsupported so the title can fall back; registered 3840x2160 buffers stay 3840x2160. The focused test now checks both setters, direct registration and sceVideoOutSubmitChangeBufferAttribute2 preserve 3840x2160, and adds a disabled case where unknown modes still return 0x8029001E. All three tests pass, as do conventions, test registration and git diff --check. Could you take another look?

@maskym

maskym commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Windows result for head 516fb894fd, merged into main 2ee8e9751a: the new test does not compile on Windows.

Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja.

cmake --build build stops at guest_video_out_host_resolution_limit_tests:

core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:40:17: error: 'unsetenv' was not declared in this scope; did you mean 'getenv'?
core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:42:17: error: 'setenv' was not declared in this scope; did you mean 'getenv'?
core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:45:17: error: 'unsetenv' was not declared in this scope; did you mean 'getenv'?
core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:47:17: error: 'setenv' was not declared in this scope; did you mean 'getenv'?

setenv/unsetenv are POSIX; MinGW's CRT has neither. The other tests in core/libs/tests switch on _WIN32 and call _putenv_s(name, value) (an empty value removes the variable), for example GuestCallTrace.cpp lines 89-93 and GuestAudioIn.cpp lines 28-32. With the executable not built, guest_video_out_host_resolution_limit, _height_only and _disabled are reported as Not Run, so the library change itself has no Windows result yet; I can rerun once the test builds.

The tree also carried the open PRs #11873, #11705, #11943, #11721, #11708, #11703, #11702, #11701; their tests were unaffected. The 1125 pre-existing agc*/video_out* tests of the tree pass on an NVIDIA RTX 2070 SUPER with the Khronos validation layer, with no VUID- error beyond the one main already reports. Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@00xDisaster

Copy link
Copy Markdown
Contributor Author

@maskym fixed at 0486c9a181: the test now uses a _WIN32 branch with _putenv_s (an empty value removes the variable) and keeps setenv/unsetenv only on POSIX. The three tests still pass locally, and conventions plus git diff --check are clean. Could you rerun the Windows build on this head?

@00xDisaster

Copy link
Copy Markdown
Contributor Author

@oneandonlydean
limit-001
limit-002
limit-003
limit-004

@maskym

maskym commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Retested head 0486c9a181 on Windows, merged into main f759e165d9: the _putenv_s branch compiles now, but the test executable fails to link.

Host: Windows 11 26300, Intel i7-12700K, NVIDIA GeForce RTX 2070 SUPER, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja.

FAILED: tests/guest_video_out_host_resolution_limit_tests.exe
libmingw32.a(lib64_libmingw32_a-crtexewin.o):crtexewin.c: undefined reference to `WinMain'

The object compiled from GuestVideoOutHostResolutionLimit.cpp exports SDL_main, not main (objdump -t): prx/libSceVideoOut/include/VideoOutDriver.hpp includes SDL.h, and on Windows SDL_main.h defines main as SDL_main unless SDL_MAIN_HANDLED is set, so the CRT finds no main and asks for WinMain. The other tests that include that header undo the rename after their includes: #undef main at prx/libSceVideoOut/tests/Flip.cpp line 28, HdrPresent.cpp line 23, FrameDumpQueue.cpp line 26, MouseInput.cpp, PadSdl.cpp, Telemetry.cpp and HdrProbe.cpp. Adding the same #undef main after the includes of the new test (or #define SDL_MAIN_HANDLED before them, as libSceAgcDriver/tests/Visual.cpp does) should let it link; guest_video_out_host_resolution_limit, _height_only and _disabled are still Not Run here, so the library change has no Windows result yet. Happy to rerun on the next head.

The tree also carried the open PRs #12062, #12132, #12070, #11680, #11679, #11678, #11677, #11675, #11674, #11605, #11604, #11600; the 1129 pre-existing agc*/video_out* tests pass on this GPU with the Khronos validation layer and no VUID- beyond the one main already reports. Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@00xDisaster

Copy link
Copy Markdown
Contributor Author

@maskym thanks, the Windows link result is now in Tested: all three tests pass 2 runs each on 35a1b236a1, with no new VUID. The PPSA12544 presented-frame evidence is also recorded in the body and the four screenshots are attached above. This head is ready for another look.

@00xDisaster
00xDisaster force-pushed the feat/video-out-host-policy-current branch from 35a1b23 to 3e3e8e1 Compare October 28, 2026 13:45
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 28, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@00xDisaster Please refresh onto current main: the trial merge conflicts in src/Output.cpp at sceVideoOutIsOutputSupported. Main now returns the support result directly via VideoOutOutputSupport, including a real unsupported0; preserve that result and ConfigureOutput unavailable-mode handling/precedence while retaining the opt-in unknown-mode fallback. Do not simply keep the old branch which converts validation0 to 1 after main has changed the helper's meaning. The buffer-attribute clamp remains removed; no request to restore it. Re-run existing limit/height-only and output-support controls on the resolved head.

@00xDisaster
00xDisaster force-pushed the feat/video-out-host-policy-current branch from 3e3e8e1 to 9c75851 Compare October 29, 2026 11:02
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 29, 2026
@00xDisaster

Copy link
Copy Markdown
Contributor Author

@oneandonlydean refreshed onto current main (49025cb436), new head 9c758516fd. I resolved Output.cpp by preserving current main semantics: sceVideoOutIsOutputSupported returns VideoOutOutputSupport_nid_no_patch directly, so a real unsupported mode is 0; the opt-in limit only rewrites an unknown mode (0x8029001E) to 0. sceVideoOutConfigureOutput keeps main precedence: negative errors pass through, then the attribute3 0x40 check, then UNAVAILABLE_OUTPUT_MODE for 0. The buffer-attribute clamp stays removed. I reran the three limit tests, video_out_output_mode_policy and guest_video_out_output_mode; all pass, and conventions plus git diff --check are clean. The body now records the new controls and the PPSA12544 presented-frame evidence.

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed — changes requested

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.

@00xDisaster
00xDisaster force-pushed the feat/video-out-host-policy-current branch from 9c75851 to e9521cd Compare October 29, 2026 11:49

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-checked — changes still requested

The new head 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.

@TechLevelZero

Copy link
Copy Markdown
Contributor

❌ NVIDIA GPU test: failed

PR head e9521cd merged onto main ba5b533 · tested 2026-10-29 12:24 UTC · 19 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ❌ 1,200 passed · 4 failed (1 new: 1 fail on main with the PR's tests too, 3 also fail on main) · 71 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 1,275 of 2,891 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (659 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_bda_device 54.2 s

Failing tests

This PR changes test files, so each failing test was also built and run on main with only the PR's test changes applied. ✅ there means the failure comes from the PR's other changes; ❌ means the test fails on main too, so this run does not show the PR caused it.

Test With this PR Same test on main ba5b533 (main + this PR's test changes only)
public_headers ❌ failed ❌ also fails
public_headers: Failed (also failed when re-run alone), assertion and diagnostics
ctest: Failed

RuntimeError: sceVideoOutRegisterBuffers2: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Buffer.hpp:12, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:25
sceVideoOutSetBufferAttribute: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Buffer.hpp:11, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:24
sceVideoOutSetBufferAttribute2: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Buffer.hpp:13, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:23
sceVideoOutSubmitChangeBufferAttribute2: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Buffer.hpp:16, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:26
sceVideoOutIsOutputSupported: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Output.hpp:15, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:21
sceVideoOutConfigureOutput: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Output.hpp:14, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:22
sceVideoOutInitializeOutputOptions: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Output.hpp:16, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:20
sceVideoOutOpen: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Output.hpp:12, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:18
sceVideoOutClose: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Output.hpp:13, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:19
Failing on main too (3, not counted against this PR)
agc_driver_image_table
agc_submit_progress
agc_submit_progress_no_timeline
Validated but not compared (64, not in the main baseline's validation pass)
public_headers
public_headers_compile_0
public_headers_compile_1
public_headers_compile_10
public_headers_compile_11
public_headers_compile_12
public_headers_compile_13
public_headers_compile_15
public_headers_compile_16
public_headers_compile_17
public_headers_compile_18
public_headers_compile_19
public_headers_compile_2
public_headers_compile_20
public_headers_compile_21
public_headers_compile_22
public_headers_compile_23
public_headers_compile_24
public_headers_compile_25
public_headers_compile_26
public_headers_compile_27
public_headers_compile_28
public_headers_compile_29
public_headers_compile_3
public_headers_compile_30
public_headers_compile_31
public_headers_compile_32
public_headers_compile_33
public_headers_compile_34
public_headers_compile_35
public_headers_compile_36
public_headers_compile_37
public_headers_compile_38
public_headers_compile_39
public_headers_compile_4
public_headers_compile_40
public_headers_compile_41
public_headers_compile_42
public_headers_compile_43
public_headers_compile_44
public_headers_compile_45
public_headers_compile_46
public_headers_compile_47
public_headers_compile_48
public_headers_compile_49
public_headers_compile_5
public_headers_compile_50
public_headers_compile_51
public_headers_compile_52
public_headers_compile_53
public_headers_compile_54
public_headers_compile_55
public_headers_compile_56
public_headers_compile_57
public_headers_compile_58
public_headers_compile_59
public_headers_compile_6
public_headers_compile_60
public_headers_compile_61
public_headers_compile_62
public_headers_compile_63
public_headers_compile_7
public_headers_compile_8
public_headers_compile_9
Validation IDs already present on main (4 IDs in 321 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (321 tests): agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, and 313 more
VUID-vkCmdCopyImage-srcImage-01548 (6 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (6 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (71)
usage: check_skips.py [-h] [--job {linux,windows}] [--list] [--require-tests]
                      junit
check_skips.py: error: /home/ben/anyps5-gpu-ci/data/runs/pr-11948/e9521cd7c2f5-ba5b5330b377/ctest.xml: testcase 'public_headers_compile_0' is notrun and was not run
Reproduce
git fetch origin e9521cd7c2f550fc6536299a0343d2bc4e42a44a ba5b5330b37724bca4b99f30faab504653635a04
git checkout ba5b5330b37724bca4b99f30faab504653635a04 && git merge --no-ff e9521cd7c2f550fc6536299a0343d2bc4e42a44a
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1
# the failing tests, on this merge and on main:
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(public_headers)$' --parallel 1 -V

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

@00xDisaster

Copy link
Copy Markdown
Contributor Author

@XairRrR thanks for the detailed review and the validation-layer comparison. I addressed your three blocking findings on head :

  1. The configured size is now used. returns true only when or ; a 3840x2160 limit does not enable the fallback. A malformed value such as or a zero now throws and names the variable, like . The four helpers and their four includes are in , so is unchanged.
  2. The description and a new width-only, four-K and malformed test now say (0x80290019) for a fallback result. I removed the extra entry from the diff; the existing line-20 debt entry remains untouched and tells the function's measured behaviour. and the PR body now describe the below-4K rule, the malformed/zero behaviour and the renamed error code.
  3. GPUs tested now names an NVIDIA GeForce GTX 1660 SUPER, vendor 0x10de, device 0x21c4, driver 615.78.08, on Linux 7.3.0-4-cachyos. The change tree passed all 8 focused tests (4 host-resolution configurations plus the two output-mode tests) with ; I reran them after the rebase and attached no . On () the same two output-mode control tests also passed with the layer, with no . Your RTX 4070 Ti SUPER run remains the second-vendor evidence.

Evidence:

  • change tree, 8/8 passed, 0 , loaded:
    • , , , , ,
    • ,
  • main tree, 2/2 passed, 0 :
    • ,
  • Linux 7.3.0-4-cachyos, GCC 16.2.1, CMake Debug/Release, Ninja, in a clean worktree.
  • passed and is clean.
  • The negative-control behaviour from your run still applies to the same logical code.

I also fixed the checklist wording to match the template (), and reworded .

Windows: I could not run there; maskym's earlier run remains the only Windows evidence for the old head, so please rerun Windows if the two new cases matter there. PPSA12544 presented-frame evidence is available separately; I have not uploaded the four screenshots yet.

Could you re-review head ?

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 30, 2026
The guest video out had no way to tell a title that the display it presents
is smaller than the one the title assumes: the buffer attribute the title
writes was taken as it was, so a title that renders 3840x2160 and presents it
in a 1920x1080 window pays for the 4K render and shows it letterboxed.

ANYPS5_VIDEO_OUT_MAX_WIDTH and ANYPS5_VIDEO_OUT_MAX_HEIGHT clamp every buffer
attribute the guest registers, through the set-attribute helpers or directly
through sceVideoOutRegisterBuffers2 or sceVideoOutRegisterBuffers, and answer
an output mode the host does not implement as unsupported when either limit
is set, so the title registers a buffer the host can show and renders at that
size. sceVideoOutConfigureOutput now treats that unsupported answer as
VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE instead of proceeding to configure
the mode. Each limit is a positive decimal integer; an unset, empty, malformed
or zero value disables that axis. The two axes clamp independently, so a
buffer whose aspect ratio is not 16:9 can change its presented aspect ratio.
@00xDisaster
00xDisaster force-pushed the feat/video-out-host-policy-current branch from dfd5385 to 65e1a51 Compare October 30, 2026 23:56
@00xDisaster

Copy link
Copy Markdown
Contributor Author

@XairRrR the public-headers failure on e9521cd is fixed by removing the duplicate extern "C" declarations from the test and including the header that provides them (Buffer.hpp). The current head is 65e1a512a8.

Final verification on this head:

  • guest_video_out_host_resolution_limit, _height_only, _width_only, _four_k, _malformed, and _disabled all pass (-j4, 0 failures).
  • video_out_output_mode_policy passes.
  • git diff --check and tools/check_conventions.py --base upstream/main pass.
  • The diff is Output.cpp, VideoOutDriver.hpp, the test, CMakeLists.txt and ENVIRONMENT.md; there is no ENVIRONMENT.md-only change.
  • No buffer clamp remains.

To summarize the completed findings:

  1. Values below 3840x2160 enable the fallback; malformed or zero values throw and name the variable.
  2. The body and control still say UNAVAILABLE_OUTPUT_MODE (0x80290019) for the fallback; real unsupported modes still return UNSUPPORTED_OUTPUT_MODE.
  3. GPUs tested names the GTX 1660 SUPER, vendor 0x10de, driver 615.78.08 on Linux 7.3.0-4-cachyos, with the main-vs-change validation-layer control test evidence.

Could you re-review 65e1a512a8?

@TechLevelZero

Copy link
Copy Markdown
Contributor

❌ NVIDIA GPU test: failed

PR head dfd5385 merged onto main e8efeed · tested 2026-10-31 00:17 UTC · 37 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ❌ 1,306 passed · 2 failed (1 new: 1 fail on main with the PR's tests too, 1 also fail on main) · 71 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 1,379 of 3,041 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (709 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_bda_device 52.8 s

Failing tests

This PR changes test files, so each failing test was also built and run on main with only the PR's test changes applied. ✅ there means the failure comes from the PR's other changes; ❌ means the test fails on main too, so this run does not show the PR caused it.

Test With this PR Same test on main e8efeed (main + this PR's test changes only)
public_headers ❌ failed ❌ also fails
public_headers: Failed (also failed when re-run alone), assertion and diagnostics
ctest: Failed

RuntimeError: sceVideoOutSubmitChangeBufferAttribute2: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Buffer.hpp:16, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:26
sceVideoOutSetBufferAttribute: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Buffer.hpp:11, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:24
sceVideoOutRegisterBuffers2: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Buffer.hpp:12, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:25
sceVideoOutSetBufferAttribute2: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Buffer.hpp:13, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:23
sceVideoOutOpen: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Output.hpp:12, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:18
sceVideoOutIsOutputSupported: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Output.hpp:15, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:21
sceVideoOutConfigureOutput: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Output.hpp:14, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:22
sceVideoOutClose: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Output.hpp:13, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:19
sceVideoOutInitializeOutputOptions: expected exactly one header declaration; found 2: core/libs/prx/libSceVideoOut/include/Output.hpp:16, core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:20
Failing on main too (1, not counted against this PR)
agc_driver_image_table
Validated but not compared (64, not in the main baseline's validation pass)
public_headers
public_headers_compile_0
public_headers_compile_1
public_headers_compile_10
public_headers_compile_11
public_headers_compile_12
public_headers_compile_13
public_headers_compile_14
public_headers_compile_16
public_headers_compile_17
public_headers_compile_18
public_headers_compile_19
public_headers_compile_2
public_headers_compile_20
public_headers_compile_21
public_headers_compile_22
public_headers_compile_23
public_headers_compile_24
public_headers_compile_25
public_headers_compile_26
public_headers_compile_27
public_headers_compile_28
public_headers_compile_29
public_headers_compile_3
public_headers_compile_30
public_headers_compile_31
public_headers_compile_32
public_headers_compile_33
public_headers_compile_34
public_headers_compile_35
public_headers_compile_36
public_headers_compile_37
public_headers_compile_38
public_headers_compile_39
public_headers_compile_4
public_headers_compile_40
public_headers_compile_41
public_headers_compile_42
public_headers_compile_43
public_headers_compile_44
public_headers_compile_45
public_headers_compile_46
public_headers_compile_47
public_headers_compile_48
public_headers_compile_49
public_headers_compile_5
public_headers_compile_50
public_headers_compile_51
public_headers_compile_52
public_headers_compile_53
public_headers_compile_54
public_headers_compile_55
public_headers_compile_56
public_headers_compile_57
public_headers_compile_58
public_headers_compile_59
public_headers_compile_6
public_headers_compile_60
public_headers_compile_61
public_headers_compile_62
public_headers_compile_63
public_headers_compile_7
public_headers_compile_8
public_headers_compile_9
Validation IDs already present on main (4 IDs in 357 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (357 tests): agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, and 349 more
VUID-vkCmdCopyImage-srcImage-01548 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_plane_sampling_evicting, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (8 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_sampling, agc_driver_depth_plane_sampling_evicting, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (71)
usage: check_skips.py [-h] [--job {linux,windows}] [--list] [--require-tests]
                      junit
check_skips.py: error: /home/ben/anyps5-gpu-ci/data/runs/pr-11948/dfd538501c1f-e8efeed58af4/ctest.xml: testcase 'public_headers_compile_0' is notrun and was not run
Reproduce
git fetch origin dfd538501c1f4ce0fd495001ea630b0ec4cf0252 e8efeed58af48d0682ab2e0eab72cfaf996e4886
git checkout e8efeed58af48d0682ab2e0eab72cfaf996e4886 && git merge --no-ff dfd538501c1f4ce0fd495001ea630b0ec4cf0252
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1
# the failing tests, on this merge and on main:
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(public_headers)$' --parallel 1 -V

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

@TechLevelZero

TechLevelZero commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

✅ NVIDIA GPU test: passed

PR head 65e1a51 merged onto main 93dbd0f · tested 2026-11-02 06:57 UTC · 21 min

GPU NVIDIA RTX 2000 Ada Generation, driver 595.99.02, Vulkan 1.4.329
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-38-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 1,627 passed · 3 failed (0 new, 2 also fail on main, 1 unstable on main) · 7 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 1,637 of 3,165 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (743 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_bda_device 78.1 s, ⚠️ agc_driver_lookup_log_fits_build 52.7 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 1 of the last 10 main runs
Failing on main too (2, not counted against this PR)
agc_driver_image_table
guest_mmap_executable
Validation IDs already present on main (5 IDs in 605 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (605 tests): agc_compute_pipeline_replay, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_array_layer_target_cpu, and 597 more
VUID-vkCmdCopyImage-srcImage-01548 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-vkCmdCopyImage-srcImage-01551 (13 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_sampling, and 5 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (7)
agc_driver_msaa_dcc_compared_import_2: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_4: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_msaa_dcc_compared_import_8: skipped, the device reports host imports that keep write protection, so the write-watch probe compares none of them
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_stencil_ref_export: skipped, the device lacks VK_EXT_shader_stencil_export
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
Reproduce
git fetch origin 65e1a512a84131803d38b617429f90d80e2254f0 93dbd0f82aea684e95f15f06e7d42c0064af18cf
git checkout 93dbd0f82aea684e95f15f06e7d42c0064af18cf && git merge --no-ff 65e1a512a84131803d38b617429f90d80e2254f0
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 32 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 4 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

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

@maskym

maskym commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Retested head 65e1a512a8 on Windows (its own commits changed since my earlier run), merged alone into main a4eca2a056.

Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja. Build clean.

guest_video_out_host_resolution_disabled, guest_video_out_host_resolution_four_k, guest_video_out_host_resolution_height_only, guest_video_out_host_resolution_limit, guest_video_out_host_resolution_malformed, guest_video_out_host_resolution_width_only: 6/6 pass, three runs. Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@XairRrR XairRrR left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-checked — 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.

@oneandonlydean
oneandonlydean merged commit c42e3a0 into boykopovar:main Nov 5, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants