Repository navigation
fix(libSceVideoOut): overlay-bus flips no longer replace the main output - #2142
Conversation
0469e5f to
4b1cdad
Compare
|
Checked on Linux, this head rebased on Added by us on your branch:
Merging once CI is green. |
4b1cdad to
16eaf96
Compare
A title that opens a main and an overlay port flips both, and every flip was presented as a whole frame, so the window alternated between the two buses: PPSA01736 shows its intro on the main bus and an empty overlay, and the intro blinked black on every other frame. Overlay flips now complete and signal their events without being shown. Compositing the overlay over the main output is not implemented. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Rebased on current Checked on Linux: build and the libSceVideoOut ctest tests pass; the Added by us on your branch:
Merging once CI is green. |
16eaf96 to
9883944
Compare
…-overlay-bus-flips fix(libSceVideoOut): overlay-bus flips no longer replace the main output
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 Fix video_out_flip_tests termination and run in ctest #1048 or fix(libSceVideoOut): propagate shutdown driver error and register flip tests #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 repository