perf: RESIDENT EVIL requiem cutscene at ~1 s per frame: about 1 ms of resource building per draw, and its indirect draws miss the draw cache #11795
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 QRMOE on 2026-10-27T07:45:32Z.
Title and scene
RESIDENT EVIL requiem (PPSA31246, 01.200.000), the opening cutscene after Main Story > New Game > Standard (Modern), presents 1509-1526 (from 480 s after launch). Bring-up thread: #11599.
What is slow or what changed
The cutscene renders correctly but runs at about 1 frame per second, and the next area slower (up to about 6 s per frame). The GPU is busy about 190 ms per frame; the driver's CPU side takes the rest, on about two threads, so CPU and GPU utilization both stay low. This report is the measurement, plus what has and hasn't helped, in case someone who knows the draw path can take part of it on. Help wanted.
Per frame in this window: about 1,080 packets on queue worker 0x0, about 771 draws and 251 dispatches.
Driver.Packet.draw: 1,288 ms inclusive per frame.Resources.Complete: 426 ms of own time over 240 calls.Graphics.Draw.draw_and_resource_release: 318 ms of own time.Driver.Draw.gpu_mutex_wait: 192 ms.From earlier runs of the same scene (same machine; those runs redirected the log, so their frame times are not comparable with this capture's):
APS5_PIPELINE_STATS: each draw costs about 1.1 ms on the draw committer (3,100-3,500 commits per 10 s).APS5_SAMPLE_COMMITTER: nearly all of it isShaderResources::ShaderResources, about half inprepareAddressBindings>GuestBufferMemory::AcquireRegistered, thenbuildCompleteandresolveImageTables. Queue worker 0x0's samples (APS5_SAMPLE_WORKER) are mostly waits inDrawPipeline::Drain/Enqueue.APS5_TRACE_DRAW_CACHE: 0 hits out of 7,000-10,000 lookups per 10 s. About 99% of the misses are "no entry: user words/pointers only", and user data changed on 4,000-5,500 misses per 10 s.A temporary counter at the data-hit branch in
Driver::draw(decode == nullptr && drawDataHits() && !drawParameters.indirect) put every one of those misses down todrawParameters.indirect. The draws in this scene are indirect, and indirect draws skip:shapeNeedsEntry);registerKey && !drawParameters.indirect);Multi-record indirect draws also drain the queue-0 pipeline before their inline records (
drainBeforeInline).Tried, locally:
APS5_LAZY_SHADER_PREPARE=1 APS5_NO_GPL=1(from #5169)APS5_VERIFY_DRAW_DATA_HITS=1found no mismatch in 10 minutes (380-560 data hits per 10 s), but 0 stages were reused (760-1,120 compiled per 10 s): each draw points at its own per-object constants, so the captured reads never hold, and the content-keyed relocation can't match either. Without verification the cutscene got slower (1.5-2.8 s against 0.95-1.1 s per frame at the same presents)APS5_PIPELINED_DRAWS=64 APS5_DRAW_PIPELINE=1 APS5_THREAD_PRIORITY=highAPS5_NO_PIPELINE_LTO=1aloneNot tried; where help would matter most:
GuestBufferMemory::AcquireRegisteredcheaper for addresses that repeat across draws.Not specific to this title as far as I can tell: Resident Evil Village (#5169) runs on the same engine and shows the same
memory_wait-heavy, CPU-bound profile.Summary lines
Traces
aps5-trace-re-requiem-cutscene-9fb48c3ebfe9.json.gz
Digest
tools/trace_digest.py
seconds 480:30 from present 1509: 17 presents, frame p50 1852.2 / p90 1918.8 / p99 2021.6 / max 2021.6 ms, GPU busy 186.6 ms per present
AMD Radeon RX 9070 XT, AMD proprietary driver 26.6.2 (LLPC), Windows 10.0.26200, 3840x2160, commit 9fb48c3ebfe9 (dirty), dropped: no
Slowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.Packet 4911.0, Driver.Packet.memory_wait 2582.6, Driver.WorkerWait 2375.8, Driver.WorkerWait.dequeue_order 1561.9, Graphics.Draw 1298.5, Graphics.Draw.draw_and_resource_release 1287.3, Driver.Packet.draw 1212.5, Driver.Draw 1212.2, Driver.Packet.dispatch 1007.1, Resources.Complete 909.6
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
Worker stacks
Not attached. The sampler runs used other settings; the findings above summarise them.
Capture
The comparisons above come from earlier runs on the same machine and scene, with the log redirected to a file. This capture went to a console window and ran slower at the same presents (1.85 s against 0.87-1.07 s), so the console output itself costs time.
Build:
main74acfad65bwith #10935, #10304, #9950, #11199, #11369, #11485 and #11580 merged, plus local-only changes (hencedirty):libSceHttp2from88795ed448, because currentmain'ssceHttp2SendRequestAsyncthrows;MSAA_ENABLE on a single-sample target for primitives other than triangles and rectanglesrefusal, set byAPS5_TMP_MSAA_LINESin the environment above;APS5_TRACE_DRAW_CACHE, which this capture didn't set.APS5_DUMP_FRAMES_EVERY=20reads back one frame in 20, for the scripted menu walk. RX 9070 XT (AMD 32.0.31021.1015), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 26200, WinLibs GCC 15.2.0 r7, Release.AI-assisted: yes (Claude Code).