Commit Graph
280 Commits
Author SHA1 Message Date
Adrià d768fb5df3 Merge pull request #10513 from thuanquang/perf/frame-dump-writer-cpu
perf(agc): write CPU-path frame dumps through the frame dump writer
2026-10-27 09:21:55 +01:00
Adrià 5c356f41c3 Merge pull request #11048 from imellag/feat/libkernel-macos-main-thread
feat(libkernel): start the guest off the main thread on macOS
2026-10-27 08:27:20 +01:00
Dean e55c69f1fd Merge pull request #8927 from ionut27001/fix/videoout-cursor-flip-status
fix(libSceVideoOut): answer the cursor, flip status and pending-flip calls as measured on a PS5
2026-10-27 14:57:01 +13:00
Dean b7cfbf0115 Merge pull request #9346 from Techx3/feat/fullscreen-env
feat(libSceVideoOut): open the display window fullscreen with ANYPS5_FULLSCREEN
2026-10-27 10:29:49 +13:00
Adrià afc780e681 Merge pull request #10507 from orezraey/feat/videoout-composite-overlay
feat(videoout): composite the overlay bus over the main output
2026-10-26 20:00:54 +01:00
Dean ca6e29e836 Merge pull request #10924 from Jishnuraj07/fix/pad-sdl-host-controllers
test(pad): skip pad_sdl when host controllers are connected
2026-10-27 05:32:38 +13:00
Dean Galvin 649e73c2bc fix(videoout): declare the cursor exports only in VideoOut.hpp
Main declares sceVideoOutCursorEnable, Disable, SetImageAddress and
SetPosition in the library's public header; the second declarations in
Output.hpp made the header audit fail on duplicates.
2026-10-27 04:20:52 +13:00
Dean Galvin 231bbbce92 Merge branch 'main' into fix/videoout-cursor-flip-status 2026-10-27 04:20:52 +13:00
Dean Galvin 96f404d73d test(videoout): stop pinning results for unimplemented cursor and flip status calls
The removed checks asserted the exact failure text of cursor image, image
address and index calls and of a null flip status output. Those calls are
still not implemented and still refuse explicitly; the tests no longer pin
what they answer.
2026-10-27 04:20:52 +13:00
Emanuele b05ca4e4bf fix(libSceVideoOut): read the window size after a flip on the main thread on macOS 2026-10-26 12:07:59 +01:00
orezraeyandClaude Opus 5.5 f34c280578 Merge main into feat/videoout-composite-overlay
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 03:06:04 -03:00
Jishnuraj07andClaude Opus 5.5 2b884749fa fix(pad): fail pad_sdl when SDL_NumJoysticks reports an error
SDL_NumJoysticks returns a negative value on error, which the host
controller check turned into exit code 77 and CTest reported as a
skip. A negative count now fails the test with SDL_GetError, and only
a positive count skips it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 11:26:25 +05:30
Dean 9f386f3a29 Merge pull request #9157 from shanu337/videoout-color-space-wrappers
refactor(libSceVideoOut): consolidate color space wrappers and add Flip tests
2026-10-26 15:32:59 +13:00
orezraeyandClaude Opus 5.5 655d0f3f32 Merge main into feat/videoout-composite-overlay
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 21:51:50 -03:00
Dean 487a08e600 Merge pull request #8654 from xXPBSXx/test/video-out-telemetry-windows
test(libSceVideoOut): run the telemetry tests on Windows
2026-10-26 11:03:02 +13:00
Dean Galvin b7c91d3372 fix(libSceVideoOut): declare the sized color wrappers once in VideoOut.hpp 2026-10-26 10:31:23 +13:00
Dean Galvin 0a52fdf083 Merge branch 'main' into videoout-color-space-wrappers 2026-10-26 10:30:44 +13:00
Emanueleandmugurc 30cc4ea2e6 feat(libkernel): start the guest off the main thread on macOS
AppKit, which SDL uses for windows, Metal surfaces, event pumping and game
controllers, works only on the main thread, and a guest never hands its
thread back. The macOS relinker emits a call to Aps5StartGuest as the
entry of a relinked executable; no library provided it.

- Aps5StartGuest runs the guest entry on a new thread with the stack size
  of the main thread (at least 8 MiB) and serves the main dispatch queue
  from the run loop of the main thread. The guest ends the process with
  exit; a guest entry that returns aborts.
- Aps5RunOnMainThread runs a function on the main thread and waits for it,
  or in place where the main thread is the caller or Aps5StartGuest was
  never called.
- libSceVideoOut sends its SDL calls through OnMainThread, which carries
  the exceptions back to the caller: the initialisation and shutdown of the
  video and game controller subsystems, the window, its Vulkan surface and
  drawable size, the event polling and the pad, mouse and keyboard input,
  which are created and destroyed there. On the other platforms the
  functions run in place.
- The flip test starts its tests through Aps5StartGuest on macOS, as a
  relinked guest does.

Co-authored-by: mugurc <[email protected]>
2026-10-25 16:02:42 +01:00
Jishnuraj07andClaude Opus 5.5 bdf5ab0e4a test(pad): skip pad_sdl when host controllers are connected
PadInput opens every joystick SDL sees, so a controller attached to
the host takes slot 0 and the slot checks abort. The test now exits
with 77, registered as SKIP_RETURN_CODE, when SDL sees any host
joystick before it attaches its virtual controllers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 16:00:17 +05:30
thuanquangandClaude 52f67778cc perf(agc): write CPU-path frame dumps through the frame dump writer
With APS5_DUMP_FRAMES, PresentDisplayBuffer reads most dumped frames back
on the GPU and hands them to the frame dump writer thread. The frames it
takes from the CPU were written with WriteFrameBmp on the presenter
instead: every dumped frame with APS5_NO_GPU_DUMP=1, and on an HDR10
swapchain the linear display buffers and the tiled ones not shown from a
resident image. The write ran inside Driver::Present with the GPU mutex
held, and VideoOut completes the flip only after Present returns, so a
slow disk stopped the title and the queue workers.

A trace on main 4997726a5f (PPSA14363 at 1920x1080, APS5_NO_GPU_DUMP=1,
APS5_DUMP_FRAMES_EVERY=60, during a parallel build and another game) has
its five longest presents, 16.0 s, 8.2 s, 3.2 s, 1.0 s and 0.84 s, spent
in Driver.Present.present_display_buffer while the queue worker waited
for the GPU mutex. The traced display buffer decode inside them takes 11 to
17 ms; the rest is the write of one 518 KB BMP.

These frames are now reduced by the dump scale on the presenter, as
WriteFrameBmp did, and queued to the writer, which writes them in order
on its own thread. Every queued frame is now already reduced, so
WriteFrameBmp writes it as it is and the writer no longer carries a
scale. What stays the same:
- the index is taken before present(), so file names and numbering are
  unchanged and a dropped presentation keeps its CPU dump;
- the queue holds reduced frames, as for GPU readbacks since #4320, and
  the presenter waits only once 64 MiB are queued (#8807);
- the writer skips frames once the output is disabled and writes the
  queued ones when the device is torn down, as for GPU dumps.

What differs from GPU readbacks: those are usually queued after the GPU
mutex is released, while a CPU dump is always queued inside Present, so a
wait for the 64 MiB limit still holds the GPU mutex. At the default
APS5_DUMP_SCALE=4 that wait starts once 129 frames of 1920x1080 are
queued; at APS5_DUMP_SCALE=1 and 3840x2160, from the third. CPU dumps still
queued are lost when the process ends without tearing the device down,
as GPU dumps already are; before, each was on disk when Present returned.

takeScreenshot takes a requested screenshot only while the writer has
nothing queued. A present's CPU dump is queued after that check, so the
dump of the same frame does not hold the screenshot back; it moves to a
later present only while earlier frames are still being written, as with
GPU dumps.

video_out_frame_dump_cpu_queue runs the frame dump queue test with
APS5_NO_GPU_DUMP=1: frame_000.bmp is a FIFO nobody reads until all four
presents have completed.

Co-Authored-By: Claude <[email protected]>
2026-10-25 15:38:39 +07:00
boykopovar 2db4bb590b fix(sdk): restore linux and libc++ header compatibility 2026-10-25 00:02:51 +03:00
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
boykopovar 35cf8d56cd refactor(sdk): add canonical headers for core libraries 2026-10-24 23:17:37 +03:00
Adrià FranchandClaude Sonnet 5.5 7b25cfa2a0 fix(pad): put the DLL directories on PATH for pad_sdl on Windows
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-24 19:21:15 +02:00
Adrià FranchandClaude Sonnet 5.5 4fcaeba01d fix(pad): undef SDL's main redirect in pad_sdl_tests for MinGW
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-24 19:21:15 +02:00
SlugZero 05c177d2d4 test(pad): exercise PadInput slot lifecycle and pin single connected pad count 2026-10-24 19:21:15 +02:00
SlugZero 58a1bcc5a3 feat(pad): support up to 4 controllers with dynamic user discovery
- Track up to 4 pad slots in libScePad with per-slot inputs, outputs, sensor fusion, and deadbands
- Support dynamic user login/logout events and multi-user registration in libSceUserService
- Map SDL controllers 0-3 to Players 1-4 in libSceVideoOut while preserving Player 1 keyboard and mouse composition
- Add test coverage for multi-controller pads and multi-user services
2026-10-24 19:21:15 +02:00
ionut27001 983a81d91b fix(libSceVideoOut): add APS5_OUTPUT_RESOLUTION to override the reported output resolution 2026-10-24 12:42:14 +02:00
ionut27001 bfeeed4ef4 fix(libSceVideoOut): report the output resolution from the host display as measured on a PS5
sceVideoOutGetOutputStatus derived resolution from the size of the
registered buffers, so a title that reads it right after sceVideoOutOpen
got 1 (1080p) whatever the display. In a payload process on a PS5
(firmware 12.70), with no buffer registered, the field changed with the
console's resolution setting: 2 with it on Automatic on a 4K display, 1
with it set to 1080p. Read it from the display mode SDL reports for the
window's display, next to the refresh rate, and keep it independent of
the registered buffers.
2026-10-24 12:42:08 +02:00
orezraeyandClaude Opus 5.5 ded043d552 feat(videoout): composite the overlay bus over the main output
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 02:43:21 -03:00
shanu337 f24320dc1c refactor(libSceVideoOut): consolidate color space wrappers and add Flip tests 2026-10-23 19:00:18 +05:30
Dean f57ceaad6b Merge pull request #8370 from orezraey/fix/pad-test-unicode-config-path
test(pad): set the input mapping path through the wide environment on Windows
2026-10-23 11:28:44 +13:00
Dean 6d8f13207a Merge pull request #9608 from DavidSamir/test/videoout-flip-windows-driver
test(libSceVideoOut): run the VideoOut flip tests with SDL's windows driver on Windows
2026-10-22 17:59:50 +13:00
Dean 524398151f Merge pull request #8807 from ycbuzi/fix/agc-driver-frame-dump-wait
fix(agc-driver): make the presenter wait for a full frame dump queue
2026-10-22 17:50:26 +13:00
David f4f60cf277 test(libSceVideoOut): run the VideoOut flip tests with SDL's windows driver on Windows
ANYPS5_VIDEO_OUT_TEST_DRIVER defaulted to SDL's offscreen driver on every
host. That driver has no Vulkan on Windows, so all thirteen flip tests that
open a display skipped there. Windows now defaults to the windows driver.
A machine without a Vulkan driver makes DisplayWindow report that Vulkan
lacks VK_KHR_surface, so the flip tests also skip on a DisplayWindow error
that names Vulkan, as they do on offscreen's message.
2026-10-22 05:05:28 +01:00
David 0225ae65a7 test(libSceVideoOut): find the pre-vblank event among every queued event
The controls check read exactly two events after subscribing to pre-vblank
and waiting for one vblank, and expected one of them to be PRE_VBLANK_START.
The VideoOut filter queues every vblank of the earlier VBLANK registration,
and the queue returns one registration's events before the next, so when a
second vblank lands between the earlier read and the wait (a real display's
cadence), both events read are VBLANK and the pre-vblank event is the third.
The check now reads up to eight events and requires a VBLANK for the vblank
registration and a PRE_VBLANK_START with its own user data among them.
2026-10-22 05:03:59 +01:00
blu 445a549d88 Merge branch 'boykopovar:main' into fix/agc-driver-frame-dump-wait 2026-10-21 19:04:09 -07:00
boykopovar 61a44c79e2 fix(videoout): restore flip master handle arguments 2026-10-21 21:53:26 +03:00
SueryandClaude Opus 5.5 7ae3fc8c22 feat(libSceVideoOut): open the display window fullscreen with ANYPS5_FULLSCREEN
A launcher that shows games fullscreen can set ANYPS5_FULLSCREEN instead of
pressing F11 after the window appears. The window opens with
SDL_WINDOW_FULLSCREEN_DESKTOP, the same mode F11 switches to.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017Dqgm9nUKygsXzr6poJsHJ
2026-10-21 14:03:29 -04:00
Adrià ba6abe1fd4 Merge pull request #8418 from hypermoist/feat/videoout-remove-buffer-attribute-option
feat(libSceVideoOut): implement sceVideoOutRemoveBufferAttributeOption
2026-10-21 15:32:40 +02:00
xdCloudy 947b3ba6a0 feat(libSceVideoOut): declare pending PS5 exports 2026-10-21 08:01:08 +01:00
blu 8fe945e590 Merge branch 'boykopovar:main' into fix/agc-driver-frame-dump-wait 2026-10-20 23:37:16 -07:00
ionut27001 51d561a551 fix(libSceVideoOut): answer the cursor, flip status and pending-flip calls as measured on a PS5 2026-10-21 09:28:51 +03:00
Dean 69d0861755 Merge pull request #8494 from NumberGuan/codex/videoout-eop-test-chunks
test(videoout): split long GPU work into bounded dispatches
2026-10-21 17:43:04 +13:00
Dean 4f24b6a64c Merge pull request #8517 from orezraey/fix/hdr-probe-test-skip-hdr-monitor
test(videoout): skip the HDR probe check on a monitor Windows reports as HDR
2026-10-21 16:33:40 +13:00
Dean 20de55550f Merge pull request #8095 from Unkown607/fix/videoout-119hz-display-fallback
fix(libSceVideoOut): fall back to 59.94 Hz when display drops below 120 Hz
2026-10-21 14:59:25 +13:00
bluandClaude Fable 5.1 3ed129ab33 fix(agc-driver): make the presenter wait for a full frame dump queue
With APS5_DUMP_FRAMES, FrameDumpWriter::Enqueue threw "frame dump queue exceeded 64 MiB" when the
writer thread fell more than 64 MiB behind, which failed the presentation and ended the title.
#4320 made that rare at the default APS5_DUMP_SCALE=4; at APS5_DUMP_SCALE=1 a 1920x1080 title
reaches it within nine frames and a 3840x2160 one on the third.

Enqueue now waits on the writer's condition variable until the frame fits, and the writer
notifies after each file; a single frame larger than the queue still throws. The VideoOut frame
dump queue test gets a wait mode at scale 1 whose third frame has to wait for the held first one.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-20 14:29:09 -07:00
Dean b7596be595 Merge pull request #6658 from nicolasabosch/perf/gpu-wake-sleeps
perf(libkernel): end short sleeps when the GPU or a flip completes
2026-10-21 07:55:28 +13:00
xXPBSXxandClaude Sonnet 5.5 c318c70b69 test(libSceVideoOut): run the telemetry tests on Windows
video_out_telemetry and video_out_telemetry_caption were registered only
for non-Windows hosts. Telemetry.cpp needs getpid, which Windows spells
_getpid, and a narrow path for OpenFromEnvironment, because a
std::filesystem::path c_str() is wide there. Register the tests with the
Windows PATH and unwind settings of the other video out tests; the caption
test skips (77) when the offscreen SDL driver has no Vulkan support.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-20 19:55:36 +02:00
Nicolas Abosch f857616caa Merge remote-tracking branch 'origin/main' into perf/gpu-wake-sleeps
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Execution/src/Driver/EntryPoints.cpp
#	core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
2026-10-20 14:29:10 -03:00