gpu: reuse warm Deferred capacities on HostList::reset and skip empty give_chunks locks #29
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/29"
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 Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T09:05:58Z.
Summary
Reuse warm
Deferredcollection capacities onHostList::reset()and guard emptygive_chunkscalls incrates/victory-gpu/src/host.rs:Deferred::clear(&mut self)to clear all per-recording collections in place instead of replacingDeferred::default(), while shrinking outlier loading-screen spikes (shrink_toabove per-field caps) so resident memory stays bounded.plane_uploads,uploads, andscratch.chunkspaths inDeferred::clear(),Deferred::drop(), andHostList::reset()to skip unnecessarySPARElock / atomic updates.host::batch::deferred_clear_reuses_warm_capacity_and_clamps_spikes.Rig Specs Tested On
Run Settings & Profile
release/victory --features diagnostics@f16107fseries-s(defaultverify-world.ps1baseline profile)offDLSS quality(-DlssMode quality)offVICTORY_*Overrides:D:\victory-build\verify-tools\verify-world.ps1 -Exe 'D:\victory-build\verify-bins\pr29-diag.exe' -GoldenDataDir 'D:\victory-data\golden-data-minivi' -OutDir 'D:\victory-data\verify-runs\pr29-deferred-reuse' -WorldSeconds 75 -BaselineJson 'D:\victory-data\verify-runs\baseline-main\summary.json' -AutoNudgeMenudraws >= 500, max17214draws/frame),75sin-worldMeasurements & Verification
3.0 fps(338.7 ms, min0.1 fpson initial17214-draw dock frame) while compiling remaining dock PSOs (836 -> 293remaining).5601-5920draws/frame, last 6 windows):8.6-10.7 fps(93.0-116.1 ms/frame,preparing 51.4-57.4 ms);lists reset in 17.9-18.2 ms;final_waiting=4491(vs baseline7121).24PNGs sampled (lit=9/24, median luma102.94, edge energy7.02,0.0%magenta); inspectedframe-9035.png&frame-9043.png.off)copystatpeak6033 MBVRAM /6969 MBbudget (5475 MBshared PC RAM),passes that made none for lack of room: 0, private RAM19728-19921 MB(17772-17971 MBresident)0(crashes=0,no_host_texture_errors=0)cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy(asset policy: 294 files ok)cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask(6 passed; 0 failed)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings(0warnings)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features victory-gpu/diagnostics -- -D warnings(0warnings)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib -- --test-threads=1(449 passed; 0 failed; 36 ignored, includingdeferred_clear_reuses_warm_capacity_and_clamps_spikes)--releasebuilds (objdump -p:0non-system MinGW DLLs)Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T10:03:48Z.
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingReview Summary
needs-gpu-test(CI passing; logic and resource accounting look clean, and the PR modifies the D3D12 host reset path incrates/victory-gpu/src/host.rs, with the PR body's test run recorded on an earlier SHAf16107fbefore thelist_uploadsrebase to26ab4e278148).origin/main:Deferred::clearincrates/victory-gpu/src/host.rsclears and resets all 19 fields ofstruct Deferred(copies,uploads,plane_uploads,list_uploads,prelude_uploads,upload_bytes,list_upload_bytes,kept,bound,refreshed,gpu_written,filled,textures,writes,backs,back_wanted,texture_backs,budget_zeroed,indirect_readable), releasing COM/Arcreferences identically to*self.deferred() = Deferred::default()while preserving bounded warm capacities.ALIVE[6]/ALIVE[7]accounting andgive_chunks/give_list_uploadscalls are guarded consistently acrossDeferred::clear,Deferred::drop, andHostList::reset, avoiding double-decrements on drop and skipping emptySPARElock acquisitions.batch::deferred_clear_reuses_warm_capacity_and_clamps_spikescovers both warm-capacity reuse and spike clamping.let Self { ... } = self;inDeferred::clearwould make the compiler enforce that any future fields added toDeferredare also reset.(Automated technical triage review — not formal maintainer approval.)
Generated with Antigravity CLI (
agy).Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T00:37:46Z.
Rebased onto
origin/main(6e935d7->26ab4e2):Changes
crates/victory-gpu/src/host.rsDrop for Deferredconflict cleanly.Deferred::clear()andDropto also account formain'slist_uploads/list_upload_bytes(ALIVE[6]/ALIVE[7]+give_list_uploads(std::mem::take(&mut self.list_uploads))) so pooled list upload buffers are returned and tracked accurately onHostList::reset.Verification (
26ab4e2)cargo run -p xtask -- policy(301 files ok),cargo test -p xtask(6 passed),clippy --workspace --all-targets -- -D warnings(0warnings, both plain and--features diagnostics).victory-gpu --lib host::(126 passed; 0 failed; 16 ignored).--release(2m 09s,objdump -pconfirmed Windows system DLLs only, zero non-system MinGW runtime DLLs) and--release --features diagnostics(3m 38s).pr29-rebased) — 11/11 gates PASS:10.7 fpsmedian (93.7 ms/frame, baseline8.9 fps),12361max draws across15world windows5685 MBmax VRAM /6325 MBmin budget (0 MBover, baseline5864 MB)42824textures uploaded,2606final waiting (baseline7121),1–2 msmaking host copies /15–21 msmaking slots' views in the final 5s windowsmapped()rate26.64 ms/s(32000calls,2856.6 mstotal, longest44.3 ms),0crashes18/24lit PNGs (104.09median luma vs103.2baseline,0.0%near-black,7.12edge energy,0.0%magenta); visually verified clean exterior geometry, lighting, textures, foliage, water, and UI.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T04:45:38Z.
Automated RTX 4060 Ti 8 GB A/B hardware verification passed (
playtest/wave2vsorigin/main1ab5d84):cargo test(RTX 4060 Ti):victory-shaderlds_sub(1/1),emit::wave64_tests(14/14),victory-gpu(505/505) — 520 passed, 0 failed.scripts/verify-world.ps1, DLSS Quality + golden autosave):77.25 ms) vs 3.20 fps (308.8 ms) baseline (+10.25 fps / 4.2x faster)max_draws=3122vs29940crashes /0DRED6174 / 6903 MB(-25 MBvs baseline,0 MBover budget)final_waiting=7638vs12258(-4620)frame-7969.png,frame-8409.png), no regressions vsorigin/main.