feat(libSceVideoOut): validate ANYPS5_FULLSCREEN, restore the windowed size and hide the cursor in fullscreen #12930
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/12930"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T15:07:03Z.
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)Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-10-29T18:54:27Z.
Review: COMMENTED
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 returnsVK_SUBOPTIMAL_KHRorVK_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:VUID-lines, in particular for swapchain image extents after the toggle;tools/trace_digest.py.Without that,
GPUs tested: llvmpipe via Xvfb onlyshould 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.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T04:58:15Z.
Review: COMMENTED
Reviewed — Windows display run still missing; hosted Windows check skipped the window test
oneandonlydean asks for a Windows run of
video_out_host_fullscreen_windowwith 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: 140a77e430fca41a8dd6e1d59b54915526a61b0d (OPEN, same as the batch file). Read the comments and reviews with
gh api. Read files withgit -C /marc/AnyPS5 show 140a77e4…:<path>. Read the Windows job log viagh api(job 124782472623, run 41284117161). Read the hosted check rollup withgh pr view. Nothing was built or run.Results
video_out_host_fullscreen_windowSkippedFindings
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._putenv_son Windows and a readback check are at HostFullscreen.cpp L303-L311.Sources
github.com/boykopovar/AnyPS5@140a77e430/core/libs/prx/libSceVideoOut/CMakeLists.txt (L112-L113)github.com/boykopovar/AnyPS5@140a77e430/core/libs/prx/libSceVideoOut/tests/HostFullscreen.cpp (L205-L207)github.com/boykopovar/AnyPS5@140a77e430/core/libs/prx/libSceVideoOut/tests/HostFullscreen.cpp (L303-L311)Not verified