Add PS5 Pro mode (--ps5-pro) with PSSR request handling #1553
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1553
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1553/head"
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?
@loyalburrito on GitHub · 2026-10-16 10:05 UTC · original
loyalburrito:ps5-pro-mode→main· +329 −10 · 16 files · 2 commits · closed without mergingPS5 Pro mode (--ps5-pro) with PSSR request handling
Summary
Two commits: a shader-recompiler crash fix ASTRO BOT needs on current main, then the Pro mode.
Adds an opt-in PS5 Pro mode. With --ps5-pro, sceKernelIsTrinityMode and sceAgcGetIsTrinityMode report a PS5 Pro, so Pro-enhanced games take their Pro path. Their PSSR upscaling calls (libScePsml) are now handled instead of being dropped. For now the upscale is a linear scale of the game's colour image into the PSSR output; the request also carries the motion vectors, depth and camera data a temporal upscaler would need, so one can be added later.
Default behaviour is unchanged: without the option the emulator still reports a base PS5.
Changes
Option: --ps5-pro (Config::Ps5ProEnabled()), off by default.
What the game is told: KernelIsTrinityMode and AgcGetIsTrinityMode return the option. Kyty's own packet encoding (is_trinity_mode() in agc.cpp) stays in base mode on purpose.
libScePsml fixes:
PsmlSharedResourcesInitialize wrote 48 bytes into a 16-byte object, overwriting the game's globals that follow it (seen in ASTRO BOT). Only the magic and block list are written now.
PsmlContextInitialize wrote at +0x360/+0x368 of the context. The game uses the first qword of its context object as the handle it passes back to the other Psml calls, so the context now gets a pointer to a small record that starts with the context magic.
PSSR request in GPU order: PsmlDispatch receives {command buffer cursor, reserved dwords} and the request. Instead of the native library's GPU work it writes one IT_NOP packet with a new custom opcode R_PSSR carrying a copy of the request and its 7 image descriptors (graphics/guest_gpu/pssr.h). The command processor hands it to RenderExecutor::ProcessPssr when the GPU reaches it.
Upscale: renderPssr.cpp identifies the slots by size and format (largest = output; at the render size, 2 channels = motion vectors, 1 = depth, rest = colour) and blits colour into the output with a linear filter. The first requests are logged with their slot layout.
Testing
Windows 11, RTX 3080, ASTRO BOT (PPSA21567, 01.019.000):
--ps5-pro: the game takes its Pro path (sceKernelIsTrinityMode returns 1) and issues PSSR requests through PsmlDispatch (1536 reserved dwords, all 7 slots set). Slots seen: 0 output 3840x2160 B10G11R11, 1 colour 1920x1080 RGBA16F, 2 motion vectors 1920x1080, 3 depth R32F, 4 previous depth R32F, 5 exposure 1x1, 6 reactive R8. The intro and the warp scene render correctly through the linear path.
Without --ps5-pro: unchanged (base mode reported, no PSSR calls).
Needs the separate SRT null-pointer fix (first commit): without it ASTRO BOT crashes while preparing a compute shader on current main, with or without --ps5-pro.
Known limitations
Linear scaling only: the game jitters its camera for PSSR, so without a temporal upscaler the image is softer and shimmers; Pro mode may look worse than base mode until one is added.
The request layout was mapped from ASTRO BOT only; other Pro titles are untested.
@defektu on GitHub · 2026-10-16 15:28 UTC · original
!1553 (commit
b6ea5f4ff3) essentially reimplements what #1528 already did.@Nmzik on GitHub · 2026-11-04 02:11 UTC · original
Credited
Pull request closed