Repository navigation
feat(libSceVideoOut): limit the guest display to the host resolution - #11948
oneandonlydean merged 1 commit into
Conversation
|
@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 |
|
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.
|
563ad31 to
516fb89
Compare
|
@oneandonlydean fixed at |
|
Windows result for head Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release,
The tree also carried the open PRs #11873, #11705, #11943, #11721, #11708, #11703, #11702, #11701; their tests were unaffected. The 1125 pre-existing AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine. |
516fb89 to
0486c9a
Compare
|
@maskym fixed at |
|
Retested head Host: Windows 11 26300, Intel i7-12700K, NVIDIA GeForce RTX 2070 SUPER, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, The object compiled from The tree also carried the open PRs #12062, #12132, #12070, #11680, #11679, #11678, #11677, #11675, #11674, #11605, #11604, #11600; the 1129 pre-existing AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine. |
|
@maskym thanks, the Windows link result is now in Tested: all three tests pass 2 runs each on |
35a1b23 to
3e3e8e1
Compare
|
@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. |
3e3e8e1 to
9c75851
Compare
|
@oneandonlydean refreshed onto current |
XairRrR
left a comment
There was a problem hiding this comment.
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-failureResults
| 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
-
The "max width/height" values are parsed but never used.
VideoOutDriver.hpp:62-85parsesANYPS5_VIDEO_OUT_MAX_WIDTHandANYPS5_VIDEO_OUT_MAX_HEIGHTas integers. ThenVideoOutHostResolutionLimited()only checks whether either one is non-zero, andOutput.cpp:305never compares the numbers with anything.- Example: a user with a 4K display who sets
ANYPS5_VIDEO_OUT_MAX_WIDTH=3840gets the same rewrite of0x8029001Eto 0 as someone who sets1920. PPSA12544 then drops to its non-4K path, which is the opposite of what a "max 3840" setting suggests. ENVIRONMENT.md:572-573lists both asinteger, 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_RESOLUTIONalready carries a host output size, so you could reuse it rather than add a second size knob.
- Example: a user with a 4K display who sets
-
The debt entry names the wrong error code.
docs/dev/debt/libSceVideoOut.md:34says thatsceVideoOutConfigureOutputanswersVIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE. The code returnsVIDEO_OUT_ERROR_UNAVAILABLE_OUTPUT_MODE(0x80290019) for a support result of 0 (Output.cpp:317), and the new test assertsUNAVAILABLE_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
0xd000000aand 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.
- The same function already has a debt entry at line 20. It records that PPSA12544 probes
-
GPUs testeddoes 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 amain-versus-change comparison under the validation layer.- maskym's Windows run on the earlier head
35a1b236a1and 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.
- maskym's Windows run on the earlier head
Non-blocking
- Helpers are in a widely included header. The three helpers and four new standard includes (
<charconv>,<cstdlib>,<string_view>,<system_error>) sit inVideoOutDriver.hpp, which seven other files incoreinclude. OnlyOutput.cppuses them. Moving them there asstaticfunctions keeps the header unchanged. - Malformed values are silently ignored. A value such as
1920pxor1920turns the fallback off without any message. The neighbouring variablesAPS5_OUTPUT_RESOLUTIONandANYPS5_LANGUAGEthrow 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
0xd000000awith 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
- 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. UpdateENVIRONMENT.mdand the test to match. - Correct the error code in the debt entry and the description to
UNAVAILABLE_OUTPUT_MODE(0x80290019), and merge the text into the existingsceVideoOutIsOutputSupportedentry. - Fill
GPUs testedwith the GPU model, driver and OS, and add amain-versus-change validation-layer comparison.
9c75851 to
e9521cd
Compare
XairRrR
left a comment
There was a problem hiding this comment.
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 head9c758516fd, the only change is line 34 ofdocs/dev/debt/libSceVideoOut.md:VIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODEbecomesVIDEO_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 samemainas 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/mainI 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
- The max width/height values are never used. Still open. The code is unchanged:
VideoOutHostResolutionLimited()still only checks for non-zero, andOutput.cpp:305never compares the values with anything.ANYPS5_VIDEO_OUT_MAX_WIDTH=3840still behaves like1920. - Wrong error code in the debt entry. Partly resolved.
- The debt entry now names
UNAVAILABLE_OUTPUT_MODE (0x80290019), which matchesOutput.cpp:317. - Still open: the first paragraph of the description still says
sceVideoOutConfigureOutputanswersVIDEO_OUT_ERROR_UNSUPPORTED_OUTPUT_MODE. - Still open: the text is still a second entry for
sceVideoOutIsOutputSupportedand is not folded into the line-20 entry.
- The debt entry now names
GPUs testeddoes not name a GPU. Still open. It still reads "AMD Ryzen 7 5700 host". CONTRIBUTING.md:72 asks for amain-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
- The new sentence is wrong for mode 15.
docs/dev/debt/libSceVideoOut.md:34says "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_patchreturns 0 (Output.cpp:56), andConfigureOutputanswersUNAVAILABLE_OUTPUT_MODE.- The line-20 entry already records this behaviour, so the sentence is not needed.
- Suggested fix: drop the sentence.
- The entry now goes over the debt length limit. With the new sentence, the entry is 1037 characters, and
check_conventions.pynow 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
- Make the variables mean what their names and
ENVIRONMENT.mdsay. Either use one presence variable for the unknown-mode rewrite, or make the configured size (orAPS5_OUTPUT_RESOLUTION) decide whether the fallback applies. Update the test to match. - Fix the description's first paragraph to say
UNAVAILABLE_OUTPUT_MODE. Fold the debt text into the existingsceVideoOutIsOutputSupportedentry at line 20 and drop the mode-15-incorrect sentence. That also clears thedebt-lengthwarning. - Fill
GPUs testedwith your GPU model, driver and OS, and add themain-versus-change validation-layer comparison from that GPU.
❌ NVIDIA GPU test: failedPR head
Failing testsThis 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.
public_headers: Failed (also failed when re-run alone), assertion and diagnosticsFailing on main too (3, not counted against this PR)Validated but not compared (64, not in the main baseline's validation pass)Validation IDs already present on main (4 IDs in 321 tests)Skipped (71)ReproduceAutomated 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. |
e9521cd to
dfd5385
Compare
|
@XairRrR thanks for the detailed review and the validation-layer comparison. I addressed your three blocking findings on head :
Evidence:
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 ? |
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.
dfd5385 to
65e1a51
Compare
|
@XairRrR the public-headers failure on Final verification on this head:
To summarize the completed findings:
Could you re-review |
❌ NVIDIA GPU test: failedPR head
Failing testsThis 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.
public_headers: Failed (also failed when re-run alone), assertion and diagnosticsFailing on main too (1, not counted against this PR)Validated but not compared (64, not in the main baseline's validation pass)Validation IDs already present on main (4 IDs in 357 tests)Skipped (71)ReproduceAutomated 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. |
✅ NVIDIA GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (2, not counted against this PR)Validation IDs already present on main (5 IDs in 605 tests)Skipped (7)ReproduceAutomated 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. |
|
Retested head Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release,
AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine. |
XairRrR
left a comment
There was a problem hiding this comment.
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 replacese9521cd7c2. Compared with that head:- The helpers moved out of
VideoOutDriver.hppinto an anonymous namespace inOutput.cpp. That header is now untouched. ParseVideoOutHostDimensionthrowsstd::runtime_errornaming the variable when a value is empty, malformed or zero.VideoOutHostResolutionLimited()is true only forwidth < 3840orheight < 2160.- New tests
width_only,four_kandmalformed. - The test's duplicate
extern "C"declarations are replaced by includingBuffer.hpp. This fixes thepublic_headersfailure that TechLevelZero's NVIDIA CI reported one9521cd. - The
docs/dev/debt/libSceVideoOut.mdentry is removed. - The
ENVIRONMENT.mdrows now describe the below-4K rule and the throwing values.
- The helpers moved out of
- Description: the first paragraph now says
UNAVAILABLE_OUTPUT_MODE(0x80290019).GPUs testednames a GTX 1660 SUPER (driver 615.78.08, Linux 7.3.0-4-cachyos) and claims a validation-layer comparison betweenmainand the change. - Discussion since then:
- The author's two replies.
- TechLevelZero's NVIDIA CI passed on
65e1a51merged onto93dbd0f. 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_onlyandwidth_onlyto fail:mainreturns0x8029001Ewhere the test expects 0.malformedto fail: nothing onmainthrows.four_kanddisabledto pass, since they checkmain's behaviour.
This is reasoning only, not a run.
Previous findings
- The max width/height values were never used. Resolved.
core/libs/prx/libSceVideoOut/src/Output.cpp:51-54compares each value with 3840 and 2160.- The
four_kcase checks that 3840x2160 keeps answeringUNKNOWN_OUTPUT_MODE(core/libs/tests/GuestVideoOutHostResolutionLimit.cpp:89-92).
- 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 matchesOutput.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.
- The first paragraph of the description now says
GPUs testeddid 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 betweenmainand the change with the layer loaded and 0VUID-. TechLevelZero's NVIDIA CI on this head also reports no new validation IDs.- 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-lengthwarning: no longer apply, because the debt entry was removed.
- Helpers in the widely included header: resolved; they are file-local in
New findings
Blocking
None.
Non-blocking
- The commit message describes code that is no longer in the PR.
- The body of
65e1a512a8still says the variables "clamp every buffer attribute the guest registers". It also sayssceVideoOutConfigureOutputanswersVIDEO_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.
- The body of
- Bad values throw only when an unknown mode is queried, but
ENVIRONMENT.mdsays 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-610says "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), asANYPS5_PAD_PORT0_STATEdoes, or change the rows to say "makes a query for an unknown output mode throw".
- At
- 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 nocontrolstest. - Suggested fix: say which head each piece of evidence is for, or drop the line.
- It says "XairRrR separately verified a clean trial merge … and a passing negative control". That was for
Not verified
- I could not run the six
guest_video_out_host_resolution_*tests orguest_video_out_output_modehere: 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
- Reword the commit message to match what the code now does (non-blocking finding 1).
- Either make a bad value throw on any output-mode query, or narrow the
ENVIRONMENT.mdwording (non-blocking finding 2). - 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.




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_WIDTHis set below 3840, orANYPS5_VIDEO_OUT_MAX_HEIGHTis set below 2160, an unknown output mode is reported as unsupported (0), sosceVideoOutConfigureOutputanswersVIDEO_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_testswith the host display and Vulkan device, not skipped:sceVideoOutIsOutputSupportedandsceVideoOutConfigureOutput; a below-4K configured size leavesConfigureOutputreturningUNAVAILABLE_OUTPUT_MODE(0x80290019).VideoOutOutputSupport_nid_no_patchkeeps its real meaning: mode 1 is 1, mode 15 is 0 below 120 Hz and 1 at 120 Hz, mode 4 isUNSUPPORTED_OUTPUT_MODE, an unknown mode isUNKNOWN_OUTPUT_MODE, and an unknown mode returnsUNKNOWN_OUTPUT_MODEboth before and after setting 3840x2160.1920pxthrows and names the variable.sceVideoOutSubmitChangeBufferAttribute2keep the requested 3840x2160 attributes, including width-only and height-only cases.video_out_output_mode_policyandguest_video_out_output_modepass before and after this change.staticinOutput.cpp;VideoOutDriver.hppis unchanged.VUID-from 00xDisaster runs: on the change treevideo_out_output_mode_policyandguest_video_out_output_modepassed, and on the same machine againstmainthe 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 reportsRES: 1920x1080 / 1920x1080and the title presents gameplay at 120 FPS / 8.4 ms. The four screenshots from that run are in the PR thread (limit-001.pngthroughlimit-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_onlyand_disabledpassed 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
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)VUID-on both.