perf: raw draw decode reuse is lost after snapshot eviction (PPSA99902) #9998
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 Amoenus on 2026-10-23T03:34:38Z.
Merged — 3 November 2026: #10103 merged at
a872b03586d8880208b959466cf4ef2251828d29, closing this retained raw-decode/snapshot-eviction issue. Current inspected main4f41f4c375f5abb487dbd184fbc150f31994d762includes it. Author qualification and controls and independent RX9070XT negative-control evidence retain their original source pins. No fresh title/FPS measurement is claimed by this status update.Earlier proposed correction: #10103, published/tested head
5abbe50bc3e3on frozen main2960e9a6e7e1fc99c4ed180c71495b5eb83464c7;Depends on:none. The normal merge retains original history and the identical five-file topic. #10174's4,096-entry/64MiB raw cache is included;4,097 snapshots force eviction.29 October fresh qualification:30 positives,24 physical-GPU/six CPU; main8/8,candidate22/22. Required Vulkan, loaded validation and actual RTX5080/NVIDIA621.01 plus Radeon Graphics/AMD26.10.1(32.0.21045.16010) verified. Zero diagnostics/skips/timeouts; full native/relinker/real fixtures and stable hashes, conventions/whitespace pass. Exact pins, commands, all logs and advisory analysis. The previous main319 failing controls keep their original pins; no fresh failing-control result is claimed. #9899 remains independent/either order; no combined runtime result.
Hosted Windows and conventions CI for the submitted head have passed; the old stale-ref job stopped before compilation. Skipped jobs remain untested. No new title timing, speedup or gameplay unblock is claimed. The historical composed-fork performance report below retains its original source pins and older capacity. Keep open pending merge. AI-assisted maintenance:yes(Codex).
29 October external-report follow-up: #10103's submitted head is unchanged. An explicit local composition of that head with the external NVIDIA report's main
ba5b5330b37724bca4b99f30faab504653635a04has 32 passes (24 verified GPU, eight CPU) and two intended eviction failures on a test-only main-production control, one per GPU. The regression passes repeatedly with the correction; queued-write coverage remains CPU-only. Exact compositions, complete logs and timing limits. This supplements the earlier qualification; it is not a rebase of the submitted branch or a new title/performance result.The external Linux broad-suite report omits both changed regression registrations from its complete test logs and records a 36.72-second lazy-ABI pass. Explicit regression coverage and a bounded serial Linux main/change timing pair have been requested. Our serial Windows runs remain below 4.34 seconds but do not resolve that Linux warning. Hosted Windows and conventions checks for submitted
5abbe50bc3e3have passed; workflow-skipped jobs are not execution evidence. Keep this issue open pending merge; the historical title measurements below retain their original pins.Title and scene
Sonic Unleashed Recompiled, PPSA99902 /01.003.000, initial daytime gameplay: idle at the starting position, same camera and zero rings, 3840x2160. Bring-up: #4443. These are composed-fork captures on upstream main
83462cc57ddecac5e5f3cdafafbe38d406e55953, with the published source pins below; they do not measure unchanged upstream main.What is slow or what changed
DecodeProgramsCurrentcompares raw snapshot pointers. The globalReadRawShadercache is bounded to 64 entries/8 MiB. If a draw retains a snapshot after global eviction, reading unchanged code creates another object and rejects the retained decode. This is distinct from #9899's callee-link memo and range-check relocation.Baseline b9b8c5ab70, change 193c907a86. The source delta is exactly the focused regression/correction: 46 test insertions and +6/-6 production lines across three files. The converted app is identical; all 367 native library names match, with 11 dependent binaries rebuilt differently.
Limits: one short pair, no repeated/statistical or general speed claim, and no explicit title eviction-frequency counter. Background load, thermals and driver cache contents were uncontrolled; idle animation/game-clock phase differs slightly. Inclusive scopes overlap and are not compiler-invocation counts. The difference is an observation; it does not independently establish how often the demonstrated eviction condition occurs in Sonic. Earlier menu/movie captures were rejected and are excluded. No new crash, incorrect image or gameplay unblock is claimed for this cache correction.
Summary lines
Official baseline and change summaries
Traces
Full loss-free trace JSONs, summaries, manifests and reproduction notes. Both summaries report
trace_dropped=false. The files are exact decompressions of the preserved original.json.gztraces; the manifest gives both compressed and payload hashes. Clone the gist withgit -c core.autocrlf=false clone <gist-url>for the full files, since large web/API previews truncate them. A fresh public clone was verified byte-for-byte. No game executable, assets or shader request is attached.Digest
Baseline official digest · Change official digest.
Worker stacks
Not collected; no worker-sampling/profile switch was enabled for this pair.
Capture
APS5_TRACE_*orAPS5_PROFILE_*switch was set and the log was not redirected; stdout/stderr were verified console character handles.APS5_TRACE_FRAMES=18060:30; no input during either window. Before/after images at presents 18000/18300 were visually checked. Every-300-present readbacks occurred outside the window. Timing runs did not request validation; separate functional/component validation retained it. Windows11 Enterprise26200, Ryzen9950X3D, 31,735 MiB, RTX5080/NVIDIA610.62 (32.0.16.1062).Controlled reproduction and proposed correction
Tests, full synthetic logs and exact pins: unchanged main
7b32a842f8and the fix each pass the same 21 selected processes on Windows (3 CPU,18 actual-GPU), including prepared raw graphics, draw relocation and upstream point-size rendering. Actual RTX5080 and AMD Radeon(TM) Graphics/32.0.21036.18 identities and Khronos1.4.363 loading verified; no validation warnings/errors/VUIDs, skips or timeouts.The tests-only commit rotates 80 other raw programs after retaining the draw's main/tail snapshots. On both GPUs it confirms identical contents/new identity, then fails at:
Build
agc_driver_prepared_unregistered_graphics_tests, then runctest --test-dir <build> -R '^agc_driver_prepared_unregistered_graphics$' -Vwith required Vulkan, disabled shader cache and the Khronos validation layer, as in the linked logs. No game data is needed for this reproduction.Focused proposed correction, now based on main
01f99305be, supplies the held snapshot to the existing queued-write drain, GPU-write flush and exact mapped-byte comparison. Cache limits/guards remain unchanged; changed main/tail words and queued code writes still invalidate the decode. The AGC/shader/libc/dependency trees are unchanged between the tested main7b32 and main01f refresh; source hashes and evidence reuse are recorded, with a new full native build/CPU smoke check on the refreshed head. This is a host cache identity correction, not new instruction/API semantics.Both older composed runtimes complete ordinary 900s validation through movement,12 rings and tutorial dismissal with the same 14 known warnings and zero validation errors/VUIDs. That is separate functional evidence, not unchanged-main playability. #9899's author confirmed on26October that the changes are independent and either can land first. No combined #9899 runtime check is claimed. No duplicate retained-snapshot implementation was found in the searched/reviewed PRs.
Longer functional follow-up
Integration3bb9/main7b32, with this correction, reaches32rings and raised-platform/pot interaction in a1500s bounded run. Its wider log audit also finds two nonfatal guest submission-watchdog messages and one failed fence/not-ready query pair; rendering continues afterward. Complete context and qualification is recorded on existing #7260. This recurrence is not a controlled regression comparison: source, traversal and run length differ from the earlier900s baseline, and the same symptom existed before this cache correction. Its cause remains unresolved; neither host device loss nor attribution to this fix is established. There are0 validation errors/VUIDs and14 known warnings, which does not mean every API call succeeded.
AI-assisted investigation, implementation, validation and report: yes (Codex); author responsible.