Repository navigation
feat(libSceVideoOut): validate ANYPS5_FULLSCREEN, restore the windowed size and hide the cursor in fullscreen - #12930
Conversation
|
@MarcZX10 thanks. The parser, the toggle/restore state machine and the cursor policy read well, and the tests are registered. Before this can land there's one compatibility point and a few failure paths:
Smaller: the error text names the variable but not the value ( I checked the other open VideoOut/input PRs (#12569, #12702, #12536, #11948, #12379): none touches these source files. Their only conflicts against |
|
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.
|
7534a30 to
17da518
Compare
Re-checked — new head, all five points addressedHead 17da518 keeps the documented What I ran
Results
Negative controlEach break was made in a scratch copy, the intended test failed, and it was restored:
Not verifiedWindows (the subclass failure path itself), macOS, a desktop window manager or Wayland (Xvfb has no window manager, so the explicit size restore is covered only by the fake window), a hardware GPU (llvmpipe through Xvfb), multi-monitor use of I will re-run all of this on any new head. AI-assisted: yes |
There was a problem hiding this comment.
The state machine and the parser are in good shape, and oneandonlydean's points are addressed. One thing is not covered by any of the runs listed.
The swapchain path is untested on a real GPU. The description says the existing surface-extent handling in VulkanDevice.cpp "already covers a fullscreen transition", but every run is llvmpipe on Xvfb, which has no window manager. There is no compositor, no real present mode and no extent change at all. On a real driver a borderless toggle changes the surface extent, and the present then returns VK_SUBOPTIMAL_KHR or VK_ERROR_OUT_OF_DATE_KHR. The title can be in the middle of a flip when that happens, and the recreate drains the queue.
Please run F11 in and out on a real GPU and desktop session (Windows or Wayland/X11 with a WM) with VK_LAYER_KHRONOS_validation, and report two things:
- no
VUID-lines, in particular for swapchain image extents after the toggle; - the number of recreates per toggle and the frame time across the toggle from
tools/trace_digest.py.
Without that, GPUs tested: llvmpipe via Xvfb only should state that the claim "no swapchain change needed" is unverified, because a missing recreate shows up as a stretched or frozen image rather than a test failure.
Re-checked — new head, swapchain claim stated as unverifiedThanks @CnRJay: every run of this PR is llvmpipe on Xvfb, which has no window manager, compositor or real present mode, so it cannot show how the swapchain behaves when the surface extent changes on a toggle. What changedThe head is unchanged ( Not verified
To get this to a good stateA run of F11 in and out on hardware, reporting those three points, would settle it. If someone can run it, a short report on this head is welcome and I will re-run the same commands on any new head. |
✅ NVIDIA GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Validation IDs already present on main (3 IDs in 123 tests)Skipped (8)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. |
Re-checked — fullscreen swapchain path remains unverifiedCorrection to my earlier wording: the latest report is a real NVIDIA GPU run, but its attached test log does not include any of this PR's What I ran
Results
Not verifiedA real SDL/Vulkan presentation session under a desktop window manager, including F11 enter/exit, the resulting surface extent and validation-layer output, remains unverified. To get this to a good statePlease provide a real desktop-session run that toggles fullscreen while presenting through Vulkan and records the surface extent and validation output, or keep this behavior explicitly marked unverified. I will recheck the exact evidence before changing my review status. Sources |
|
A run of this PR's three tests on a real Windows display, since the runs so far are llvmpipe on Xvfb: Windows 11 Pro 10.0.22631, AMD Radeon RX 9070 XT (driver 32.0.32015.7029), MSYS2 UCRT64 g++ 16.1.0, Release, the bundled SDL2 with
Why: this SDL2 build has With only the test changed locally, its three This says nothing about Vulkan validation or the swapchain present path; I did not check those here. AI-assisted: yes (Claude Code) |
17da518 to
d9cf3ce
Compare
|
At |
Re-checked — new head, fullscreen setting now reaches Windows getenvThe environment mismatch is real: on Windows the bundled SDL's Head Checked: Not run: the window tests on a Windows display. That needs a Windows run with a display on this head; I can't run one here, so this is still open until that run passes. |
✅ NVIDIA GPU test: passedPR head
Intermittent validation messages (1, seen once in the parallel run, not reproduced when the test was re-run alone 2 times; not counted against this PR)Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (1, not counted against this PR)Validation IDs already present on main (5 IDs in 363 tests)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. |
|
@MarcZX10 the |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — Windows display run still missing; hosted Windows check skipped the window test
oneandonlydean asks for a Windows run of video_out_host_fullscreen_window with a display required; the hosted Windows job at this head skipped that test and did not set the variable that makes a missing display fail.
What I ran
Live head: 140a77e (OPEN, same as the batch file). Read the comments and reviews with gh api. Read files with git -C /marc/AnyPS5 show 140a77e4…:<path>. Read the Windows job log via gh api (job 124782472623, run 41284117161). Read the hosted check rollup with gh pr view. Nothing was built or run.
Results
| Check | Result | Note |
|---|---|---|
| windows | SUCCESS | run 41284117161; 2581 ctest, 0 failed; video_out_host_fullscreen_window Skipped |
| conventions, library-portability | SUCCESS | hosted, at this head |
Findings
- oneandonlydean, 2026-11-01 09:56 UTC: attach a Windows run of
video_out_host_fullscreen_windowwith the display required, and record OS, SDL and Vulkan. Confirmed missing. The window test is registered at CMakeLists.txt L112-L113 and exits 77 (skip) when no display is present.DisplayRequired()readsANYPS5_REQUIRE_DISPLAYorANYPS5_REQUIRE_VULKAN(HostFullscreen.cpp L205-L207). The hosted Windows job log shows the window test Skipped and neither variable set. - The env helper change the reviewer accepted:
_putenv_son Windows and a readback check are at HostFullscreen.cpp L303-L311. - The PR body (line 26) still lists Windows and a real display as NOT RUN.
Sources
AnyPS5/core/libs/prx/libSceVideoOut/CMakeLists.txt
Lines 112 to 113 in 140a77e
AnyPS5/core/libs/prx/libSceVideoOut/tests/HostFullscreen.cpp
Lines 205 to 207 in 140a77e
AnyPS5/core/libs/prx/libSceVideoOut/tests/HostFullscreen.cpp
Lines 303 to 311 in 140a77e
Not verified
- The reviewer's requested run itself: not done here, and I cannot run it.
- Whether a real Windows desktop with SDL and Vulkan passes the test: unknown.
- Nothing was built or run here.
Native Windows display validationThe requested Tested sources
Environment: Windows 11 Pro 10.0.26300, Ryzen 7 5700X3D, NVIDIA GeForce RTX 4070 SUPER (driver 621.01 / 32.0.16.2101), WinLibs GCC 15.2.0 r7 UCRT POSIX SEH, CMake/CTest 4.3.1, Ninja 1.13.2. Release,
Common cases: All runs used Verbose CTest output confirms 18 successful executions on main and 27 on the integration, zero failures, skips or timeouts. JUnit and The submitted window test does not present Vulkan frames. To check that boundary separately, an external copy of the existing Build and test commands (paths abbreviated)The required environment above applied to every CTest invocation. The extracted official SDK layer was supplied through Scope: focused native Windows testing on one GPU/display configuration. Swapchain recreation counts and frame-time traces were not measured. Multi-monitor behavior, a title opening AI-assisted: yes (Codex). The reported builds, tests and diagnostic were executed locally. |
…e meaning fullscreen The documented contract is that a non-empty value other than 0 opens the window fullscreen. Rejecting true, yes, on or 2 would turn a working setup into a startup error. 0 and windowed are windowed, 1 and borderless are borderless, and every other non-empty value is borderless and reported as unrecognised to the caller so it can warn. The parser no longer throws; the window test that expected an error for an invalid value goes with it.
HostFullscreenWarning builds the one-line message that names the variable and the offending value, so a typo is easy to find.
… spelling The display window prints the warning on stderr once, when it is created with a value other than 0, 1, windowed or borderless, and still opens borderless as the documented contract says.
Checks that each previously fullscreen spelling is flagged and stays borderless, that recognised spellings and unset are not flagged, and that the warning is one line naming the variable and the value.
Release shows the cursor the policy hid, and SDL_ShowCursor can fail. Destroy is noexcept, so a throw there would terminate the process and skip releasing the subclass and the window. Release now swallows a failed restore and forgets that it hid the cursor, so it does not retry.
…ndow Release must return normally when ShowCursor throws, must not retry, and the policy must be able to hide the cursor again afterwards.
…hose fullscreen state was never built create() assigns the SDL window before the icon, the Windows subclass and the fullscreen state, any of which can throw. VideoOutDriver catches that and calls Destroy, which dereferenced the missing state. Destroy now releases only what exists, UpdateTitle skips the cursor refresh without it, and toggling reports that the window is not ready.
…tory, inject a failed create The real-window test no longer turns every window failure into a skip: it skips only for a missing Vulkan window or video driver and fails when ANYPS5_REQUIRE_DISPLAY or ANYPS5_REQUIRE_VULKAN is set, and a control pins that other failures are not skipped. The fixture creates its own uniquely named directory and removes only that. A new run opens a window whose icon0.png is corrupt, so creation throws after the SDL window exists and before the fullscreen state is built, and checks that Destroy releases the window.
…EEN value A value such as yes still opens the window fullscreen.
…ngs still mean fullscreen
…n has no surface extension On a Windows runner whose Vulkan installation has no VK_KHR_surface extension, SDL reports 'Installed Vulkan doesn't implement the VK_KHR_surface extension'. DisplayWindow passes that through, and the test's skip check recognised only the 'Vulkan support' message, so Open() aborted instead of skipping. The skip check now also accepts the surface message when no display is required, and SkipPolicyTest pins both sides of it. The previous classifier fails the new surface case; the new one passes all six cases of that check.
…ironment reads it The host fullscreen test set ANYPS5_FULLSCREEN with SDL_setenv. On Windows the bundled SDL writes that only through SetEnvironmentVariableA, which does not change the C runtime environment that std::getenv reads in DisplayWindow.cpp, so the three window cases never tested the value they named. The test now writes the setting with _putenv_s on Windows and reads it back before each case, so a setting that does not reach the process fails the test instead of passing silently.
7e4b036 to
93e0673
Compare
✅ AMD GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (8 IDs in 465 tests)Skipped (7)ReproduceAutomated build and test on a contributor's AMD 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 (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (1, not counted against this PR)Validation IDs already present on main (13 IDs in 468 tests)Skipped (4)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. |
✅ AMD 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 (4, not counted against this PR)Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)Validation IDs already present on main (8 IDs in 468 tests)Skipped (7)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
Hi Main moved and this branch conflicted in |
✅ AMD GPU test: passedPR head
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (4, not counted against this PR)Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)Validation IDs already present on main (4 IDs in 487 tests)Skipped (8)ReproduceAutomated build and test on a contributor's AMD 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 (1, not counted against this PR)Validation IDs already present on main (9 IDs in 487 tests)Skipped (4)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. |
|
Windows run with a real display, for head
No title was run. AI-assisted: yes. Claude Code ran the builds and tests and drafted this comment; a separate review agent checked it. The numbers are from the runs on this machine. |
… Vulkan is required ANYPS5_REQUIRE_VULKAN=1 only says a Vulkan device must exist; the offscreen video driver the GPU test legs use has no Vulkan window surface, so these two tests aborted instead of skipping. Like the other video out tests, they now treat only ANYPS5_REQUIRE_DISPLAY as requiring a window. Co-authored-by: MarcZX10 <67475268+MarcZX10@users.noreply.github.com>
|
Hi @MarcZX10, thanks for this. To get it moving we pushed one commit on top of your branch, and you're credited on it. Our GPU test run aborted The commit drops that one clause, so both tests exit 77 and show as skipped under the offscreen driver, as the sibling tests do, and still fail when |
✅ NVIDIA GPU test: passedPR head
Failing on main too (1, not counted against this PR)Validation IDs already present on main (9 IDs in 549 tests)Skipped (2)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. |
What
F11 and
ANYPS5_FULLSCREENalready exist on main (DisplayWindow::ToggleFullscreen, bound throughInputControl::ToggleFullscreen). Gaps found and closed here:ANYPS5_FULLSCREENnow has explicit spellings:0/windowedand1/borderless(unset and empty stay windowed). Any other non-empty value (true,yes,2, ...) keeps its documented meaning, fullscreen, and prints a one-line warning on stderr naming the value. No value stops the game.HostFullscreenStateremembers it on entering (or the creation size for a fullscreen start) and asks for it again only when the window did not return to it.MouseIsOpen_nid_no_patch), shown again when a title opens one or fullscreen ends, and restored when the window is destroyed. It is only touched on a change.IHostFullscreenWindowso the state machine runs without a display.Teardown is safe for a partly built window (
Destroy()guards the missing fullscreen state and never throws, a failed cursor restore is ignored).Not offered: exclusive fullscreen (debt entry: not measured with the swapchain).
ANYPS5_DISPLAY_INDEXis unchanged: the window is created centered on that display, and fullscreen goes to the display the window is on. No new key and no swapchain change: the existing surface-extent handling inVulkanDevice.cppalready covers a fullscreen transition.Commits: parser, then its test; state machine, then its test; routing of
DisplayWindowthrough it; cursor policy, its test, its wiring; docs (usage, environment, two debt entries, one each); window-level test on a real SDL window and its cursor check.Overlaps with open PRs: none edit
DisplayWindow.cppexcept possibly through the shared files. #12569 and #12702 touchPadInput.cpp,KeyboardMouse.cppandInputMapping(this PR touches none of them, and adds no key); #12536 touchesVideoOutDriver.cppandVulkanDevice.cpp(not touched here); #11948 touchesVideoOutDriver.hppandOutput.cpp(not touched); all of them plus this PR editcore/libs/prx/libSceVideoOut/CMakeLists.txt,docs/dev/ENVIRONMENT.md,docs/user/USAGE.mdand, for #11948,docs/dev/debt/libSceVideoOut.md, so expect trivial textual conflicts there.Tested
Linux x86-64 (Debian, kernel 6.1), GCC via the repo's verify build.
video_out_host_fullscreen(parser, toggle, size restore, adoption, refused transition, cursor policy over a fake window): pass.video_out_host_fullscreen_window(real SDL window: windowed, borderless, a legacy value, F11 in and out, windowed size back,SDL_ShowCursorstate), configured with-DANYPS5_VIDEO_OUT_TEST_DRIVER=x11underANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation xvfb-run -a ctest: pass. Under the defaultoffscreendriver it skips (77) because that driver has no Vulkan window.video_out_flip_*(19) andvideo_out_telemetry*: branch 21/21 with the 2 new ones, baseline (upstream/main in a second tree) 19/19, same per-test results. VUID- lines: 0 on branch and baseline; the "layer not found" message: 0.DisplayWindownot parsing the variable (window test fails),DisplayWindownot refreshing the cursor (window test fails).check_conventions.py --base upstream/main,git diff --check, public-headers audit,env_reference.py --check: clean.NOT RUN: Windows, macOS, a desktop window manager or Wayland, a real display or hardware GPU (GPUs tested below is llvmpipe through Xvfb), multi-monitor use of
ANYPS5_DISPLAY_INDEXwith fullscreen, a game that opens a mouse.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)VulkanDevice.cppneeds no swapchain change for a fullscreen toggle is unverified on a real driver and desktop session)