perf: PPSA31327 gameplay at 3.3 FPS: the draw committer rescans sampled textures' DCC keys on every lookup #8068
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 johandavidcm on 2026-10-19T19:33:23Z.
Title and scene
PPSA31327 (Yakuza 0 Director's Cut 01.015.000), first controllable gameplay after the opening (the title's autosave0000 loaded from the title menu), character standing still, no input, 1920x1080
What is slow or what changed
About 3.3 FPS (p50 299 ms) with about 8,700 draws per frame. The GPU is busy 73 to 90 ms per present, so the driver's CPU side bounds the frame, in the same way #7895 describes for Astro Bot: the draw committer is the limit and queue worker 0 waits for it.
Tree:
main40393b0f9with #6572 (fd301cc30) and #7381 (15882eaea), which the title needs to reach gameplay (#6725, merged since, is in it too),8d1fc2b30from #7719 (audio), andfieldCount<ImageResource>() == 40as noted on #7381. Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7, Release, RTX 4070 (617.42), Ryzen 7 7800X3D.Graphics.Drawon the draw committer takes 252 ms of the 299 ms frame.Driver.Packeton queue worker 0 takes 296 ms, but in the sampled run below 28.8 % of the worker's samples wait inDrawPipeline::Enqueuefor room.DrawPipeline::run(APS5_SAMPLE_COMMITTER, not inmain): about 200 s of the same scene, 12,810 samples, in a run that also setAPS5_SAMPLE_WORKER,APS5_TRACE_DRAW_CACHEandAPS5_TRACE_SUMMARY_EVERY=5. The committer waits in 7.2 % of them.Graphics::DrawresolveDrawResourcesShaderResources::RevalidaterecordDrawprepareDrawInputscachedTextureTextureClearKeys→textureClearKeys→readDccKeysAllKeysEqual(self)ProvedClearKeyscachedTexture: itsscanKeyscallsTextureClearKeysdirectly, and a lookup can scan the same key range two or three times (before the storage-source choice, afterkeys.reset()for the rescan, and after a pending flush). Under 0.1 % reachestextureClearKeysthroughProvedClearKeys. #6209 keeps proofs over untracked memory inProvedClearKeysandProvedCurrentDccKeysonly, so it would leave this scan as it is.APS5_TRACE_DRAW_CACHEin the same scene, per 10 s: about 275,000 lookups, 12.5 % hits, about 240,000 without an entry (224,000 of them "user words/pointers only", 16,500 "seen but never inserted"), data-only hits compiling about 420,000 stages and reusing 58,000, and about 17,600 evictions from the 4,096 entries. #5609 and #6539, stacked on it, address draws whose only change is in user words or pointers.APS5_MIMALLOC=1gives the same frame time within the run-to-run spread (p50 296.8 ms against 299.4 ms).AI-assisted: yes
Summary lines
Traces
aps5-trace-a17d018f1509-33460.json.gz
aps5-trace-a17d018f1509-32632.json.gz
Digest
seconds 120:60 from present 2046: 200 presents, frame p50 299.4 / p90 307.1 / p99 315.1 / max 362.1 ms, GPU busy 73.4 ms per present
NVIDIA GeForce RTX 4070, NVIDIA 617.42, Windows 10.0.26200, 1920x1080, commit a17d018f1509 (dirty), dropped: yes
Slowest frames (largest slices inside each, inclusive)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): batch 73.4, Graphics.Draw 37.0, Graphics.Draw.draw_and_resource_release 26.1, Driver.Packet 15.5, Driver.Packet.draw 14.1, Driver.Draw 13.9, Driver.Draw.shader_compile_and_link 6.8, Graphics.Draw.validate 6.3, Driver.Draw.draw_enqueued 4.3, VideoOut.Flip 4.1
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
Worker stacks (12810 samples, 0.0 % truncated; total leaves out the 6 frames every complete stack shares)
Worker stacks
ppsa31327-gameplay-committer.collapsed.txt
ppsa31327-gameplay-worker.collapsed.txt
Capture