Series S: drop retired objects on a thread of their own (prologue 8.7 to 12.6 fps) #493
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/493"
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 TaynanGT/Vice-Tay. Originally posted by kozzy-bit on 2026-12-01T16:58:38Z.
bury()released the retired D3D12 objects on the thread that lands flights, while the submitting thread waited for that landing ("waiting for landings: title memory read"). In the Series S prologue that is some 20,000 resources a frame (the descriptor slots'Retired::Resource), one driverReleaseeach.Where it showed (
VICTORY_TIMELINE, 5 frames in the prologue): "landing: read-backs, telling the title" took 595 ms of 645. In its longest occurrence (142.8 ms) the read-backs, writes and fence signals were done after 1.1 ms; the other 141.8 ms werebury(last), and the submitting thread stood the whole time.What changed (
series-s/crates/victory-gpu/src/host.rs):burytakes what is due as before and hands it to avictory-gravethread, which drops it. The objects were due two frames earlier already (bury_lag), so dropping them a little later changes nothing for the card.VICTORY_GRAVE=0drops them where they are found, as before.Measured (prologue, 44 intervals of 5 s from the first with over 100 draws; RTX 5070 12 GB, Ryzen 7 5700X, 32 GB;
vice-tay play --series-ssettings plusVICTORY_CARD_BUFFERS_MB=1536 VICTORY_CARD_WINDOWS_MB=1024; warm cache; the same diag binary, runs alternating):VICTORY_GRAVEThe submitting thread's wait for the card in the frame line went from 35-44 ms a frame to 0-1. Dropped draws are unchanged (221 against 229 a frame line).
Release build, recorded (ffmpeg, costs about 15 %): 7.4 fps against 6.1 with the earlier build in the same start. The whole recording was reviewed (frames every 15 s): title screen, the night car scenes, credits graphics, the apartment; light, textures and subtitles as before, no black or broken areas. In the same time the run gets further into the prologue.
Second step: keep up to 512 MiB of spare scratch chunks
With the grave in place, a stack profile of the list threads showed 41% of their samples in
take_chunk->upload_buffer(CreateCommittedResource, MakeResident, Map): the spare pool (128 MiB) was full during gameplay, so about 550 upload buffers of 4 MiB were made and freed every second.SPARE_MOSTis now 512 MiB (VICTORY_SPARE_MBoverrides it); the sweep still trims the pool under memory pressure.The cost is about 3 GB less free RAM on a 32 GB PC, from 8.3 GB to 5.1 GB free. Note: earlier recorded runs (S30-S36) had a leftover desktop recording running in parallel, so their absolute numbers are too low; comparisons within each batch are still fair.
Testing:
cargo test -p victory-gpu(361 passed),cargo check --locked -p victory; no clippy finding in the changed lines.🤖 Generated with Claude Code
Imported from TaynanGT/Vice-Tay. Originally posted by Aniseto on 2026-12-01T17:32:03Z.
Ran the full
vice-tay-gputest suite atb78ddaa3on an NVIDIA Blackwell desktop part with 16 GB of VRAM, with a control onmain65b9beaain a separate target directory. No title was run.Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB, mesh shaders) driver 32.0.16.2140 (621.40), Intel Core i5-12400F, 64 GB RAM, rustc 1.98.1 (48a229cea 2026-09-01), MSVC 14.44.35207, debug build, detached worktree at the exact PR head, own
CARGO_TARGET_DIR, no local patches.The single failure is
host::packed_present_tests::packed_float_single_planes_are_presented, athost.rs:15396on both trees, so it is not introduced by this PR. The description's 361-test run and its Series S prologue A/B (8.7 to 12.6 fps on an RTX 5070) were not repeated here: no title was run, and this adapter has 16 GB rather than the 12 GB card of the report.Not tested: a retail title, the Series S prologue, the
VICTORY_GRAVE=0comparison, Wine, AMD adapters, release profile, game data.AI-assisted (OpenCode), model: MiMo-V2.6-Flash Free - checked out both commits in detached worktrees, built them, ran the suites, wrote this report; neither worktree was modified; no game data was used.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.