Repository navigation
feat(videoout): composite the overlay bus over the main output - #10507
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adriadam10
left a comment
There was a problem hiding this comment.
Thanks, the blend, layout transitions and refusals read correctly, and the new tests pin behaviour that main lacks. 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.- Add that bound to the
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.
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
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.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Bound, now in the The staging buffer cannot be shared across slots: it is written by the CPU while the next slot is recorded, when the previous slot's copy may still be on the GPU (one presentation trails by default). It is already sized once per overlay extent. The device-local image could be shared, ordered on the present queue, which would save one 33 MB image at 4K; I can do that here if you want it. PPSA01670 on Windows 11, RTX 5070 Ti, 150 s from boot to the brightness calibration screen (3840x2160 overlay), the same base (
Run-to-run spread was under 50 MiB on each side. The first run with the PR, straight after the rebuild, peaked at 17,087 MiB private and 7,682 MiB VRAM; the four runs after it did not repeat that, so I left it out of the medians. The differences match the non-resident path: two slots of 33 MB images, two 33 MB staging buffers and the 33 MB detiled copy. |
MarcZX10
left a comment
There was a problem hiding this comment.
I reviewed the exact head 5515884 and 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.
|
Correction to my review text: the current checklist says |
|
Thanks, updated the checklist: I checked #10420 by hand since the bot could not: in @EagleBearerYS @stuart-russell for your information; nothing is needed on your side. |
|
@Raghav314: #9508 changes the same lines as this PR in |
|
@Celegans12 @EagleBearerYS @MiguelAdolfsen @TibixDev: #1395 changes the same lines as this PR in |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Windows / AMD run of this PR on DEATHLOOP (PPSA01670, 01.405.000), against #10414 alone as the description does, same machine and dump. Builds
Host: Windows 11 Pro 26200, AMD Radeon RX 9070 XT (
In the main menu (from about 100 s on), #10414 alone shows 60-66 presents per 10 s and this PR 62-66, so the overlay composite costs no visible frame rate here. The screens above are from Not run: the focused AGC/VideoOut tests with the validation layer (only the game runs above). The same dumped frames 32-43 of run 1, #10414 alone (top) and with this PR (bottom): |
|
@milescoviello: #10807 and this PR both add a test call at the same line of |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A Windows run of this head on a second NVIDIA generation and an AMD device, to go with your RTX 5070 Ti: Windows 11 Home 10.0.26200, WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release.
AI-assisted: yes (Claude Code) |
|
@EagleBearerYS #11207 and this PR both change |
Dismissing a stale review: the requested changes were addressed after it (new head) and the merge queue blocks on it. Please request changes again if anything is still open.
|
Re-checked against current main: the commits are unchanged, and the merges of |

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.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.*.was 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 fix(agc): place the presentation source in host memory when device memory runs out #10807): only the last lines ofPresentationPass.cpp'smainmet; bothoverlayPlaneTestsand fix(agc): place the presentation source in host memory when device memory runs out #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 perf(agc): wait for the display keys' writer before a present takes the device lock's time #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; fix(agc): start the context at its reset state for color targets and viewports #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); feat(agc): GPU descriptor heap on VK_EXT_descriptor_heap (APS5_GPU_HEAP) #9508 edits the same lines too (merge order only); feat(agc): add experimental depth clear and copy recognition #1395, perf(agc): refresh only the layers a use of an array color target covers #6202, feat(agc): look up table images at run time through a device image table on the GPU heap (APS5_GPU_PATH) #7642, feat(agc): serve lane-keyed, pointer and runtime image-table columns #10193, fix(agc): place the presentation source in host memory when device memory runs out #10807, feat(libSceImeDialog): type with the controller on an on-screen keyboard #11207 edit the same lines too (merge order only)