feat(agc,videoout): save the displayed frame as a PNG with a screenshot key #4891
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4891"
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 dantdmdarealguy on 2026-10-13T02:05:32Z.
What
Adds a screenshot key. F12 in the game window saves the next displayed frame as a PNG at the display buffer's resolution, without the window's scaling, letterbox or performance overlay. Files go to
anyps5-screenshots/beside the executable, or toANYPS5_SCREENSHOTS, and are named<title ID>-<YYYYMMDD-HHMMSS>.png. The key is a newScreenshotaction inanyps5-input.ini. LikeToggleFullscreenandTogglePerformanceOverlay, it accepts onlyKEY:sources.Today the only way to capture a frame is
APS5_DUMP_FRAMES, which writes downscaled BMPs of the first N frames from start-up. That doesn't help with a frame at a particular moment (a rendering bug, a compatibility report), and CONTRIBUTING asks for screenshots in PRs.How it works:
Pad::KeyboardMouse::HandleEventreturns ascreenshotrequest on the key-down, next totoggleFullscreenandtogglePerformanceOverlay: keyboard only, no key repeat.PadInput::HandleEventcalls the newAgcDriverRequestScreenshot_nid_postfix()when the event's window is the game window. That call sets an atomic flag (AgcDriver::Screenshot).VulkanDevice::PresentDisplayBuffertakes the flag and reuses the GPU frame-dump readback thatAPS5_DUMP_FRAMESrecords in the presentation command buffer, at scale 1 on every present path:PresentationPass::RecordDump(..., 1, ...)andDumpExtent(width, height, 1)DumpExtent(width, height, 1)slot.dumpScale = 1tilingMode == 1)WriteFrameDumptakes the full-resolution readback before the frame-dump downscale. Encoding runs after the slot's fence on the existingFrameDumpWriterthread, so the presenter never blocks on it.On an HDR10 swapchain,
presentrefuses GPU dumps through the scaler, andAPS5_DUMP_FRAMESalready reads those frames back on the CPU. The screenshot does the same: the linear path, or a tiled display with no resident image, readsReadDisplayBuffer(or the DCC clear colour) and queues it after a successful present. A resident PQ display on HDR10 goes through the drawn path. In both cases a PQ frame is saved after the same PQ to SDR conversion that frame dumps use.A request stays pending while the writer still has queued frames, so repeated presses can't overflow the writer's 64 MiB queue (one 4K frame is 33 MiB). A frame dropped because the swapchain is out of date puts the request back. On a frame that
APS5_DUMP_FRAMESalso dumps on the GPU, the screenshot waits for the next frame. A BMP write failure turns off the optional BMP dumps (FrameDumpOutput) but not screenshots.Encoding uses the existing
decoder_png(Decoder::Png::Encode, already used by libScePngEnc) as 8-bit RGB. Alpha is dropped because the presented image is opaque.A screenshot that can't be written (for example, an unwritable directory) stops the process through the writer's existing failure path, following "every function either does what it is supposed to or throws".
Replaces #2501, which the intake pause closed and GitHub won't reopen. Rebased on current
mainas one commit.No guest-visible behaviour changes.
sceShareCaptureScreenshotis untouched.Tested
Windows 11 Pro, Intel Core i9-14900K, 128 GB RAM, NVIDIA GeForce RTX 5080 (driver 32.0.16.1714), WinLibs GCC 15.2.0, full Release build (
BUILD_TESTING=ON) onmain6b8228b2b:cmake --buildof everything and of thelibstarget succeed, with no warnings in the touched files.tools/check_test_registration.pyandtools/check_conventions.py --base origin/mainpass.ctest -R "agc_screenshot|pad_input_mapping|pad_sdl|pad_keyboard_mouse|patched_libraries|video_out|agc_driver_mesh": 36/36 pass. Thevideo_out_flip_*tests andguest_video_out_wqhd_detection_no_vulkanskip, the same as onmain(35/35 there;mainhas noagc_screenshot).agc_screenshot(new) covers:ANYPS5_SCREENSHOTSwith a directory that doesn't exist yetDecoder::Png::DecodeIt doesn't build on
main, which has noAgcDriver::Screenshot.pad_keyboard_mouse: F12 down asks for a screenshot and nothing else; a repeated F12 and F12 up ask for nothing.pad_input_mapping: F12 is the defaultScreenshotkey,Screenshot = KEY:F9moves it, andMOUSE:andWHEEL:sources are refused. Built againstmain's sources, both test files fail to compile ('Screenshot' is not a member of 'Pad::InputControl','struct Pad::InputRequests' has no member named 'screenshot').patched_librariespasses, so the patchedlibSceVideoOut.prxloads with its newAgcDriverRequestScreenshot_nid_postfiximport.decoder_pngis linked intolibSceAgcDriverwith--exclude-libs, solibSceVideoOutkeeps its own PNG decoder.Drawn
PresentationPasspath, in two homebrew titles that present a resident render target that needs conversion. WithAPS5_CAPTURE_TRACE=1, everypresentline hasresident=1and everyblitline hasdirect=0. WithAPS5_DUMP_FRAMES=1, the log says[gpu] frame_000.bmp: 480x270(or960x540)display read back on the GPU. That is thePresentationPass::DumpExtentextent; the scaler path would report the full source size.presented at 1258x708: F12 writesPPSA17641-20261019-023348.png, an 8-bit RGB PNG at 1920x1080. Theblitline of that frame isdirect=0afterpresent ... resident=1. The image matches the window without the letterbox.PPSA99000-20261019-023501.pngat 3840x2160 (8-bit RGB), which matches the window.Guest-memory (AGC compute presentation) path: DOOM Shareware (PPSA99666, lowbit/ps5-doom v1.1.1), display buffer 1920x1080, no resident presents in the capture trace. F12 writes
PPSA99666-20261019-023545.pngat 1920x1080, matching the window. Noframe_*.bmpis written whenAPS5_DUMP_FRAMESis unset.Not tested: the HDR10 swapchain path. The TV and the monitor here are not in HDR mode (
video_out_hdr_present: "HDR output is unavailable on this host"), so the CPU readback for an HDR10 swapchain hasn't run here.F12 screenshots (drawn path and guest-memory path)
SymphonyStation5 (PPSA17641), drawn
PresentationPasspath, 1920x1080:ProsperoStore (PPSA99000), drawn path, 3840x2160:
DOOM (PPSA99666), guest-memory path, 1920x1080:
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)Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-13T07:01:20Z.
Rebase handoff — rebased onto current
main, authorship unchanged.One conflict: the
CMakeLists.txttest registration list — main's current list with this PR'sagc_screenshot_testsinserted.Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON, AMD RX 9070 XT / RADV):tools/check_conventions.py --base origin/mainpassesagc_driver_tessellationsegfault that currentmainitself has (reported on #4727; not caused by this PR)To pick it up:
Head is
91382f55a.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-13T11:47:58Z.
#5106 made
agc_driver_mesh_testslinklibSceAgcDriverinstead of compiling the driver sources, so this PR conflicts on its link line: when rebasing, drop thedecoder_pngaddition toagc_driver_mesh_tests(it comes throughlibSceAgcDrivernow).Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-13T18:57:19Z.
Rebase handoff (v2) — this morning's
rebase/4891went stale: main's #5106 switchedagc_driver_mesh_teststo link the prebuiltlibSceAgcDriver. This v2 rebases onto currentmain, authorship unchanged.Two conflicts resolved:
libSceAgcDriverand this PR's screenshot dependencies (shader_recompiler_agc_driver,decoder_png,jpeg_turbo,libkernel,${CMAKE_DL_LIBS}) plus itsagc_trace_revisiondependency;agc_screenshot_testsinserted.Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release,
BUILD_TESTING=ON, AMD RX 9070 XT / RADV):tools/check_conventions.py --base origin/mainpassesmainregression (agc_driver_tessellationsegfault, #4727). This PR's own screenshot tests pass.To pick it up:
Head is
c1a49dfb3.Imported from boykopovar/AnyPS5. Originally posted by dantdmdarealguy on 2026-10-14T00:28:11Z.
Thanks @blawesom for the rebases and the Linux / RX 9070 XT run, and @adriadam10 for the note on #5106.
I rebased the branch myself onto
7a0c838ca(headab0e383ac), so therebase/4891branches aren't needed. As you described, theagc_driver_mesh_testslink line is now main's (libSceAgcDriver SDL2-static libc), withoutdecoder_png.agc_screenshot_testsis added to the test registration list.Testing in a title found a bug from my earlier conflict resolution, and this head fixes it.
WriteFrameDumpnever readslot.dumpScreenshot, so F12 wrote the frame asframe_000.bmpthrough the frame-dump path instead of a PNG. It now takes the screenshot branch before the frame-dump downscale.Verified on Windows 11 Pro, i9-14900K, RTX 5080 (driver 32.0.16.1714), WinLibs GCC 15.2.0, Release:
agc_screenshot,agc_driver_mesh,pad_input_mapping,pad_sdl,patched_librariesandvideo_out*tests pass (18 run, the 6 Vulkan-lessvideo_outflip and WQHD tests skip). The conventions and test registration checks also pass.anyps5-screenshots/PPSA99666-20261013-182723.png, an 8-bit RGB PNG at 1920x1080 that matches the window without its scaling.APS5_NO_RESIDENT_PRESENT=1it does the same, and noframe_*.bmpis written.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T10:55:57Z.
Review: CHANGES_REQUESTED
Thanks for the rebase.
mainmoved again and the PR now conflicts in four files, and two of them need the feature re-integrated rather than a textual merge:core/libs/prx/libSceVideoOut/src/PadInput.cpp(HandleEvent/publish): key handling moved toKeyboardMouse::HandleEvent, which returnsInputRequests(core/libs/prx/libSceVideoOut/src/KeyboardMouse.cpp:148). F12 should become ascreenshotrequest there, next totoggleFullscreen(focused window, no key repeat,KEY:only), andPadInputshould callAgcDriverRequestScreenshot_nid_postfix()from the returned requests. Please add a case tocore/libs/prx/libSceVideoOut/tests/KeyboardMouse.cpplike the F11 one.core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp(PresentDisplayBuffer/present): presentation now has adrawnpath (PresentationPass, BT.2100 PQ on an SDR output) whose dump goes throughstate->presentation->RecordDump(commands, slotIndex, scale, ...). The screenshot has to pass scale 1 there too (the PR only sets it in thedirectand scaler paths), andpresent(...)now takes a trailinglayerargument. Please check that F12 gives the full-resolution frame on this path as well and say what you ran.core/libs/prx/libSceAgcDriver/CMakeLists.txt(source list next toPresentationPass.cpp) andVulkanDevice.hpp(presentsignature) are plain adjacency conflicts.Please rebase onto current
main, rerunagc_screenshotand the video-out tests, and push; I'll look at it again then.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-15T12:07:05Z.
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.
main)core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppL162-163docs/dev/ENVIRONMENT.mdL75docs/dev/ENVIRONMENT.mdL75Some 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.
core/libs/prx/libSceVideoOut/src/InputMapping.cppcore/libs/prx/libSceVideoOut/src/PadInput.cppdocs/user/INPUT_MAPPING.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/EntryPoints.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/user/USAGE.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/user/USAGE.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/user/USAGE.mdcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/src/Driver/EntryPoints.cppdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/Driver.hppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/EntryPoints.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/user/USAGE.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/ENVIRONMENT.mddocs/user/USAGE.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mddocs/user/USAGE.mddocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/include/Driver.hppcore/libs/prx/libSceAgcDriver/Execution/src/Driver/EntryPoints.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceVideoOut/src/InputMapping.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mddocs/user/USAGE.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/Driver/EntryPoints.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mdcore/libs/prx/libScePad/include/InputMapping.hppcore/libs/prx/libSceVideoOut/src/InputMapping.cppcore/libs/prx/libSceVideoOut/src/PadInput.cppcore/libs/prx/libSceVideoOut/tests/InputMapping.cppdocs/user/INPUT_MAPPING.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/include/VulkanDevice.hppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mddocs/user/USAGE.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtdocs/user/USAGE.mdcore/libs/prx/libSceVideoOut/src/PadInput.cppdocs/user/INPUT_MAPPING.mdcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mdcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cppdocs/dev/ENVIRONMENT.mdImported from boykopovar/AnyPS5. Originally posted by dantdmdarealguy on 2026-10-19T07:54:39Z.
Rebased onto
main6b8228b2bas one commit.PadInput.cpp/KeyboardMouse: F12 is now ascreenshotrequest inInputRequests.KeyboardMouse::HandleEventsets it under the same condition astoggleFullscreenandtogglePerformanceOverlay: keyboard only, key-down, not already pressed, key repeats dropped.KeyboardMouse::Composeignores the control.PadInput::HandleEventcallsAgcDriverRequestScreenshot_nid_postfix()from the returned requests when the event's window is the game window, like the other two.parseBindingrefusesMOUSE:forScreenshotwith its own message, likeTogglePerformanceOverlay;WHEEL:was already refused for every non-button action. Tests:tests/KeyboardMouse.cpp(pad_keyboard_mouse) has a case next to the F11/F10 one: F12 down givesscreenshotand nothing else, and a repeated F12 and F12 up give nothing.tests/InputMapping.cpp(pad_input_mapping) hasscreenshotBinding, likeperformanceOverlayBinding: F12 is the default,Screenshot = KEY:F9moves it, andMOUSE:LeftandWHEEL:Upare refused.VulkanDevice.cpp:presentusesconst auto scale = state->nextDumpScreenshot ? 1 : DumpScale();for the drawn, direct and scaler paths alike. So the drawn path getsPresentationPass::DumpExtent(width, height, 1)andstate->presentation->RecordDump(commands, slotIndex, 1, ...).present(...)keepsmain's trailinglayerargument and the newerpassthroughargument, andWriteFrameDumpkeeps itsif (slot.dumpScreenshot)branch. Two things on currentmainneeded handling as well:presentrefuses GPU dumps through the scaler ("dumps on the CPU"). There the screenshot now takes the same CPU readback asAPS5_DUMP_FRAMES(ReadDisplayBuffer, or the DCC clear colour) and queues it after a successful present. A resident PQ display on HDR10 is drawn and usesRecordDump.FrameDumpWriter::Enqueuenow drops frames once a BMP write has failed. Screenshots are exempt, so a failed optional BMP dump can't silently swallow a screenshot.CMakeLists.txtandVulkanDevice.hpp: adjacency only.Screenshot.cppsits next toPresentationPass.cpp/PerformanceOverlay.cpp, andtakeScreenshotis declared aftermain'spresentsignature.ANYPS5_SCREENSHOTShas a row indocs/dev/ENVIRONMENT.md.What I ran for the drawn path, on Windows 11 Pro with an RTX 5080 (driver 32.0.16.1714):
APS5_CAPTURE_TRACE=1: everypresentline hasresident=1and everyblitlinedirect=0. WithAPS5_DUMP_FRAMES=1, the GPU dump reports theDumpExtentsize (480x270at 1920x1080) instead of the scaler's full source size.ctest -R "agc_screenshot|pad_input_mapping|pad_sdl|pad_keyboard_mouse|patched_libraries|video_out|agc_driver_mesh": 36/36 pass.F12 screenshots (drawn path and guest-memory path)
SymphonyStation5 (PPSA17641), drawn
PresentationPasspath, 1920x1080:ProsperoStore (PPSA99000), drawn path, 3840x2160:
DOOM (PPSA99666), guest-memory path, 1920x1080:
Imported from boykopovar/AnyPS5. Originally posted by dantdmdarealguy on 2026-10-19T12:02:03Z.
I tried to run the HDR10 screenshot path on Windows 11 Pro, Intel Core i9-14900K, 128 GB RAM, NVIDIA GeForce RTX 5080 (driver 32.0.16.1714), with this branch (
1c1665f58, onmain6b8228b2b). It still hasn't run on an HDR10 swapchain. The only spare display here is a Samsung TV at 1280x720 60 Hz. Windows reports it as not HDR-capable in that mode:DISPLAYCONFIG_GET_ADVANCED_COLOR_INFO_2giveshighDynamicRangeSupported = 0, andDISPLAYCONFIG_DEVICE_INFO_SET_HDR_STATEreturnsERROR_NOT_SUPPORTED. Turning on advanced colour only gives the wide-colour SDR mode.IDXGIOutput6::GetDesc1stays atDXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709, and the Vulkan surface on that display offers no HDR10 format.HostHdrProbetherefore reports no HDR output andSelectDynamicRangekeeps the SDR swapchain, which is correct.I did run the screenshot on PQ display buffers through the SDR swapchain on that display. A small host program registers one 1920x1080 buffer and flips it at 60 Hz: BT.2100 PQ colour bars at codes 520 and 769 over a 0–1023 grey ramp. I pressed F12 once per buffer kind:
PresentDisplayBufferDecodeDisplayBuffer/PqToSdrPixelB10G10R10A2BT.2100 PQ, tiledR10G10B10A2BT.2100 PQ, linearR10G10B10A2BT.2100 PQ, DCC fully clearedB8G8R8A8, tiledEach PNG matches the window without its letterbox (the window shows it at 1258x708). There was one
screenshot savedline per press, noframe_*.bmp, and no errors. The PQ frames are tone-mapped at the SDR white of 100 nits, so both bar rows come out as fully saturated primaries and the grey ramp reaches white about half way. The tiled PQ case also ran once with advanced colour off: identical too.So the CPU readback for an HDR10 swapchain (
ReadDisplayBuffer,DisplayPixels, queued afterpresent) and the drawnRecordDumpon HDR10 still need a run on a display in HDR mode.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-20T08:40:38Z.
Re-checked against current
main: the rebase only moves the test registration line inlibSceAgcDriver/CMakeLists.txtand the surrounding context inPadInput.cpp; the screenshot code is unchanged, the PR applies cleanly and the earlier points remain resolved. The new tests use symbols that don't exist onmain, so they fail without the change. Merged.