feat(videoout): composite the overlay bus over the main output #10507
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/10507"
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 orezraey on 2026-10-24T05:50:20Z.
What
A title that opens a second VideoOut port on
SCE_VIDEO_OUT_BUS_TYPE_OVERLAYdraws its UI there, but overlay flips only completed (#2142): their buffers were never shown. PPSA01670 (DEATHLOOP) draws every menu, prompt, dialog, subtitle and cursor on the overlay bus, so it ran with no visible UI at all. Its title screen showed a blurred background with an invisible "not signed into PlayStation Network" dialog over it.The buffer the overlay port displays is now blended over every main-bus presentation:
overlay + main * (1 - overlay alpha), applied to the encoded 8-bit values. Each plane is scaled to fit the window on its own.0x8000000022000000overlay held 527,020 translucent texels, and none had a color channel above its alpha. A straight-alpha plane would have many.How it is drawn:
PresentationPassgetsRecordOverlay. It is the existing decode shader with a load-and-blend render pass and a scissor to the plane's rectangle.BindTexels, a per-slot upload image for an overlay whose results are not resident on the GPU. Either path draws onto the swapchain image after the main plane and before the F10 overlay.AgcDriverPresentBuffer/PresentCleargain aplaneargument).APS5_DUMP_FRAMES) and screenshots blend the same plane into the image they read back (the presentation dump, the direct-blit dump and the scaler source), so a dump shows what the window shows.PresentationPass::RecordDumpis split intoRecordDumpImageandRecordDumpReadbackfor this.Not done, recorded in the
libSceVideoOutdebt entry:APS5_NO_GPU_DUMP, HDR10) and the frame recorder hold the main plane only.Tested
Windows 11 26200, NVIDIA GeForce RTX 5070 Ti (driver 616.64), MinGW build.
agc_driver_presentation_pass: new overlay cases cover 8-bit BGRA and RGBA overlays over a main plane and over a cleared destination, through both a resident image and uploaded texels, at five window sizes (exact, letterboxed both ways, scaled down and up). They match the CPU blend of the plane presented alone with the destination by at most 0 levels. Outside the plane's rectangle they are unchanged. The test also covers refusals: 10-bit and PQ overlays, an HDR10 destination, discarded contents, and short texels.948e969ba0):agc_driver_presentation_passblends an overlay into the presentation dump at strides 1 and 3 and into the scaler source, and matches the CPU blend by at most 0 levels. In PPSA01670, 600 dumped boot frames now show the logos and copyright screen drawn on the overlay instead of only the key art under it.video_out_flip_overlay: a main flip composites the overlay only once the overlay port has a displayed buffer. It does not composite after the overlay flips to black, after its buffers are unregistered, or after the port closes.mainand on this change, same machine: run withANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, usingagc_resident_present|agc_driver_presentation_pass|agc_performance_overlay|agc_screenshot|agc_driver_flip|agc_driver_flip_compute|agc_driver_present_mode|video_out_flip_.*|video_out_hdr_present|guest_video_out_hdr|guest_screenshot.*.948e969ba0as well). Neither log containswas not found but was requested by env var VK_INSTANCE_LAYERS.mainlogs 0VUID-lines, and so does this change. An earlier revision of this change loggedVUID-vkCmdBeginRenderPass-initialLayout-00899(a load-from-TRANSFER_DSTview without that usage); that is fixed here.655d0f3f32(main5b85225ef3merged in, with #10807): only the last lines ofPresentationPass.cpp'smainmet; bothoverlayPlaneTestsand #10807'ssourceImageOutsideDeviceMemoryTestsrun, with one success message. The 31 focused tests above pass three runs in a row on Windows (same GPU) with validation; neither log containswas not found but was requested by env var VK_INSTANCE_LAYERS, and none logs aVUID-line.655d0f3f32: the same 31 tests pass three runs in a row; WSL has no Vulkan driver, so 22 of them skip and 9 run.f34c280578(main14c99b52acmerged in, with #10160):VulkanDevicemet main's display-key writer sync (96bccd4c94,a3af6b1149);PresentStatisticskeeps bothplanesandkeyWriterWaits/keyWriterWaitMs, andPresentDisplayBufferkeeps theplaneparameter with the sync before it. The 31 focused tests pass three runs in a row on Windows (same GPU) with validation; neither log containswas not found but was requested by env var VK_INSTANCE_LAYERS, and none logs aVUID-line. On WSL Ubuntu (GCC) the same 31 pass three runs in a row (22 skip without a Vulkan driver, 9 run).ctest -E "^agc_|^select_tests$", 1096 of 1096 pass.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)PresentationPassorVulkanDevice.cpp/.hpp; #10420 was closed unmerged and its replacements do not touch these files; this PR goes after them and is refreshed over each one as it merges); #9508 edits the same lines too (merge order only); #1395, #6202, #7642, #10193, #10807, #11207 edit the same lines too (merge order only)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-24T06:05:39Z.
Review: CHANGES_REQUESTED
Thanks, the blend, layout transitions and refusals read correctly, and the new tests pin behaviour that
mainlacks. One thing is missing before merge (memory is bounded and measured, per CONTRIBUTING / the memory rules):core/libs/prx/libSceAgcDriver/Execution/src/PresentationPass.cpp:286-315(ensureUploadImage) keeps, per present slot, an R32_UINT device-local image plus a host-visible staging buffer, both the overlay's size, andVulkanDevice.cpp:3652keeps a secondPresentationPassalive. At 3840x2160 that is about 33 MB + 33 MB per slot, overFlipInFlight() + 1slots, and it is only freed when the device or swapchain is torn down. The non-resident path also detiles the whole overlay on the CPU each present. Please state the bound (what frees it, slot count) and give peak RSS / VRAM before and after on PPSA01670 or an equivalent 4K overlay workload. If the staging buffer can be shared across slots or sized once, say so, or do it.Overlay output busline indocs/dev/debt/libSceVideoOut.md.Everything else I checked (premultiplied blend factors, render-pass dependencies, refusal paths, debt entry) is fine; the Build run of the head will cover the Linux/Windows tests.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-24T11:17:35Z.
Review: DISMISSED
I reviewed the exact head
5515884034and the reported GPU validation and focused test evidence are strong. One contribution-rule item is missing: the current checklist says , while the overlap report identifies open PRs #10043, #10160, and #10487 changing the same lines this patch changes in the presentation pass/Vulkan device. #10420 also has an unresolved base conflict and is listed among the comparisons the bot could not complete. CONTRIBUTING.md requires the authors to agree on merge order for overlapping PRs and declare it in . Please coordinate the order and update the checklist (including resolving the #10420 overlap manually). This is a merge-order bookkeeping blocker; I found no additional code defect in this review.