fix(libSceVideoOut): overlay-bus flips no longer replace the main output #2142
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2142"
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 MathiasDevelopes on 2026-10-09T09:55:50Z.
What
sceVideoOutOpenaccepts the overlay bus (busType1), and each bus gets its own port.[VideoOutDriver::processFlip](https://github.com/boykopovar/AnyPS5/blob/main/core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp)presented every flip on every port as a whole frame in the one window. A title that flips both a main and an overlay port therefore made the window alternate between the two buses.Planet Coaster (PPSA01736) opens both. Traced with temporary logging in
sceVideoOutOpenandsceVideoOutRegisterBuffers2:It shows its intro on the main bus and leaves the overlay empty, and it flips both every frame. Without this change, the intro blinks black on every other frame. In 373 presented frames dumped with
APS5_DUMP_FRAMES, the picture switched between black and image 178 times, and every black frame was a flip of the overlay buffers at0x329000000/0x329a00000.Overlay-bus flips now complete like main-bus flips. They still wait for their vblank and flip rate, and they signal the flip event, flip status, flip arg and buffer reuse as before. They no longer reach the presenter. The port remembers its bus type from
sceVideoOutOpen. Main and sub bus flips are presented as before.Because an overlay flip is not presented, it is marked GPU-complete without waiting for the GPU work that rendered into its buffer, which the present path does for a shown buffer. The buffer is never read for display, so the only effect is that the title may get the buffer back for reuse earlier than after a real present.
Compositing the overlay over the main output is not implemented. It is recorded in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#functional), so a title that draws UI on the overlay will not show it yet. No public reference I found describes how the PS5 composites the overlay bus. [shadPS4](https://github.com/shadps4-emu/shadPS4/blob/main/src/core/libraries/videoout/video_out.cpp) supports only the main bus and asserts on any other.
Tested
Windows 11, MinGW-w64 15.2.0, RTX 3060.
video_out_flip_tests overlaycase. It opens a main and an overlay port, flips the main port and waits for a present, then flips the overlay twice. Both overlay flips complete with the right flip arg and buffer, andVulkanDevice::PresentCounts().presentsdoes not change. A later main-bus flip is presented again. Without the change, it fails withan overlay-bus flip replaced the main output.present,backtobackandcontrolsmodes still pass.video_out_flip_testsopens a real window and is not registered with ctest (it is inKNOWN_UNRUN), so I ran these modes by hand. If #1048 or #1575 registers the flip tests, theoverlaymode should be added there. The default lifetime mode crashes on unmodified main as well.tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-09T09:55:56Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T06:13:40Z.
Checked on Linux, this head rebased on
main: build and the libSceVideoOut ctest tests.video_out_flip_overlayskips on the offscreen driver (no Vulkan window), so the new case is only exercised on a machine with a display; the code path (overlay ports mark the flip GPU-complete, signal events as before, skip the presenter) reads correct.Added by us on your branch:
Overlay output busTechnicalDebt line off the end of the Functional section, to avoid adjacency conflicts with other PRs.Merging once CI is green.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T06:50:37Z.
Rebased on current
main(conflicts inVideoOutDriver.cpp, the flip test list andTechnicalDebt.md). The overlay branch ofprocessFlipkeeps theCheckAlive()/Closed()handling main now has, andoverlayjoins the registered flip modes.Checked on Linux: build and the libSceVideoOut ctest tests pass; the
video_out_flip_*cases skip on the offscreen driver (no Vulkan window).Added by us on your branch:
main.Overlay output busTechnicalDebt line stays off the end of the Functional section.Merging once CI is green.