Repository navigation
Translate once, cache, use every core: a plan to boot like a PC game and reach 30 FPS on UE5 titles (Sword of the Sea numbers) #5436
AlxcBTW
started this conversation in
Architecture changes
Replies: 2 comments 4 replies
|
+1 |
0 replies
|
A non-UE data point for the table: Astro's Playroom (PPSA01325) in its first level,
So here part 2 is the whole story: one thread at about 190 ms per frame with draw keys that almost never repeat, while the GPU is under 20% busy and pipeline creation plays no role. Dispatch keys mostly repeat, unlike your title. I have no trace digest for this run; it ended before the trace window. |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Builds on #2242 (shader code compiled at registration, now going through
VK_EXT_graphics_pipeline_library) and #1612 (resolving T#/V#/S# on the GPU). It replaces neither. It puts them into one plan with a second reference title, and adds three pieces I haven't seen proposed yet:The idea
Proton/DXVK, Yuzu/Ryujinx and RPCS3 all got fast the same way. Translate once, cache what was translated, spread the remaining per-frame work over every core, and keep the per-frame path thin. AnyPS5 still does most of its work per frame:
A PS5 title hands us raw PM4, a level below Vulkan and D3D12, so the target API isn't the lever. What matters is how often we translate and on how many threads.
Where the time goes on Sword of the Sea (PPSA25344, UE5)
Windows 11, RTX 5070 Laptop (8 GB, NVIDIA 616.92), Ryzen AI 9 365, on AC. The build is
mainplus #5315 and the #290 / #4515 / #4517 import fixes, withAPS5_PROFILE_DRAW=1.VkPipelineCacheloaded (696 MiB)main(parl0v, RTX 3060; 4.9 earlier the same day); gameplay 6.6–6.8 FPSBoth walls, CPU at 130 ms and GPU at 90 ms, need roughly a 4× cut for 30 FPS. No single change gets there, which is why this is a plan rather than one PR.
Proposal: four parts
1. Boot like a PC game (pipelines)
#2242 covers graphics: libraries built at registration (phase B). On this title, compute dominates the load, so:
VK_KHR_pipeline_binarynext to the existingVkPipelineCache, if warm creation still costs about 1 s per pipeline after 1 and 2. The NVIDIA driver above advertises it. Binaries die with driver updates, so the manifest stays the source of truth.Target: warm boot, New Game → gameplay under 30 s, then under 10 s.
2. Translate once, on all cores (queue CPU time)
Target: queue 0 under 33 ms per frame, then under 16 ms.
3. GPU time close to a native build (shaders)
The PS5's GPU runs these shaders at the title's own frame rate, so most of the 90 ms is in what we emit.
Target: GPU frame under 33 ms (30 FPS), then under 16 ms.
4. Memory shaped for a PC
A discrete GPU can't be zero-copy with a unified-memory console, so the aim is to copy once and keep it resident:
Target: under 16 GB private for this title, no paging on 32 GB machines, VRAM within budget.
Order and how it's measured
Every step is a normal default-on PR against
main, measured with the Performance report form on the same machine and scene before and after. Milestones, in order:A non-UE5 title joins as the second reference once milestone 2 holds, so nothing gets tuned to one engine.
Risks
Asks
All reactions