Iter 21: Prevent dense-scene slot starvation (VICTORY_THIN_GATE) and dedup multi-stage tables #6
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6"
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-28T01:22:27Z.
Summary
Ports the core dynamic-descriptor-slot backpressure and deduplication breakthroughs from
fxceless/victory-forkcommitf299fbaonto MiniVI:VICTORY_THIN_GATEbackpressure (list/thin.rs, queue.rs, queue/behind.rs, descriptor/host.rs): Pauses thin-list translation for future frames while free dynamic descriptor slots drop below 1/4 (or below 5/8 while submitted lists are still translating), ensuring submitted lists for the current frame always acquire slots instead of dropping draws in dense scenes. Unparks immediately on slot release, completed present,Recording::wait(), or the 250 msHELD_BACK_MOST_USsafety bound. Opt out viaVICTORY_THIN_GATE=0.relay_land(right after fence completion, before CPU read-backs) and wakesLINE_LANDED/list::thin::moved().fresh_longestper command list so shorter reads reuse an existing longer copy with matching records while still callinghost.texture_slot_tabled/host.mirror_afteronce per stage.Rig Specs Tested On
33,304,932KiB visible)10.0.26300), NVIDIA driver32.0.16.2124Run Settings & Profile
diag/release@cfa728aseries-s(unattended live smoke check viaverify-live.ps1)DLSS qualityoffVICTORY_*Overrides:verify-live.ps1defaults (VICTORY_THIN_GATEunset -> enabled)Measurements & Verification
0cargo clippy --workspace --all-targets -- -D warnings(0 warnings)cargo clippy --workspace --all-targets --all-features -- -D warnings(0 warnings)cargo test -p xtask(6 passed) +xtask policy(294 files ok)cargo test -p victory-gpu -- --test-threads=1(450 passed; 0 failed; 36 ignored, includingthe_gate_holds_back_all_but_the_lists_sent_nextanda_recording_put_aside_is_taken_up_again)Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T01:28:14Z.
Verification summary for
feat/iter21-thin-gate-and-table-dedup@cfa728a:46092785176completed withsuccess.cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy:asset policy: 294 files okcargo +1.98.1-x86_64-pc-windows-gnu test -p xtask:6 passed; 0 failedcargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings:0warningscargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-features --all-targets -- -D warnings:0warningscargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu -- --test-threads=1:450 passed; 0 failed; 36 ignored(all 6list::thin::tests::*includingthe_gate_holds_back_all_but_the_lists_sent_nextanda_recording_put_aside_is_taken_up_againpassed)diag\victory.exe,diag\victory_sm.exe, andrelease\victory.exeintoD:\victory-build\miniviwithRUSTFLAGS='-C link-self-contained=yes'(non_system_mingw_dlls=0on all 3).verify-live.ps1):32s, 3 active windows (max_draws=11),30.0 fps(33.3 ms/frame),dropped=0, 6/7[PASS](VICTORY_THIN83 calls in 0.3 ms, zero stalls/deadlocks underVICTORY_THIN_GATE, watchdogapplied=2, DLSS Quality clean,0crashes/DRED resets,0lingering processes).$badWave64list:untranslated_total=2, critical_fails=1) logged the pre-existingmain(f3c0c33) wave64 shaders6b82bc7d22016cb5and926c46bab3b86bd6(waiting on open PR #1), unrelated to this PR.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T02:03:23Z.
Automated triage for the maintainers (not an approval).
Verdict:
needs-gpu-test· CI (check):passingAutomated Review — PR #6 (
cfa728af3a5a)Summary: Clean, well-scoped port of dynamic descriptor-slot backpressure (
VICTORY_THIN_GATE), early flight table release at landing, and cross-stage / longest-prefix fresh-table deduplication. CI is passing and no security or correctness blockers were found in the diff.Verified Changes
crates/victory-gpu/src/descriptor/host.rs):DYNAMIC_FREE+HostHeap::note_room()/dynamic_room()track free/total dynamic slots for the largest view heap under the existingself.nextlock inHostHeap::dynamicandHostHeap::release, with lock-freeRelaxedreads for the gate heuristic.crates/victory-gpu/src/host.rs):Host::relay_landreleases flight dynamic tables viadetached.release_tables()immediately after fence completion (before CPU read-backs) and wakesLINE_LANDED+list::thin::moved(). Verified inorigin/mainthat the laterrelease_tables()call inrelay_landis idempotent (State::tables_donedrainsself.dynamicand returns early oncetables_gone && dynamic.is_empty()).crates/victory-gpu/src/draw.rs):State::bindcomputes per-root-slotreachacross multi-stage pipelines,State::tableswidens copies within heap bounds and reuses longer matching copies viafresh_longest(verifyingrecords_hash(table, longest) == hashed), andFreshTable::toldensures non-maker stages still callhost.texture_slot_tabledandhost.mirror_afteronce for their texture entries.crates/victory-gpu/src/list/thin.rs,crates/victory-gpu/src/queue.rs,crates/victory-gpu/src/queue/behind.rs):PRESENTS_GONEtracks enqueued vs. completed presents so submitted lists for the next present are never gated (first == true), while future-frame lists yield when free slots fall below 1/4 (or 5/8 whilePENDING > 0). Deadlock safety is covered byRecording::wait()settingwanted = true, the 250 msHELD_BACK_MOST_UScap for submitted lists,PENDINGcleanup on both close andDrop, and the 1 msWORK.wait_timeoutfallback whilePARKED_N > 0.Minor Notes (Non-Blocking)
FreshTable::toldtracks up to 3 stage plans ([usize; 3]); if a pipeline ever has >3 stages reading distinct textures from the same table slot, the 4th+ stage will skiptexture_slot_tabled/mirror_afteron a cache hit. In practice D3D12 graphics pipelines rarely have >3 stages sharing one CBV table, so this is low risk.VICTORY_THIN_GATEis enabled by default and this PR alters D3D12 host flight landing and descriptor-table deduplication, a local real-GPU dense-scene smoke test is recommended before merging.Note: This is an automated technical triage review and does not constitute formal maintainer approval.
Generated with Antigravity CLI (
agy).Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T21:11:09Z.
Real-GPU Playtest Report (Combined Build 1 Stack — RT OFF)
Tested in combined Build 1 (
origin/main+ Build 1 PRs#2, #3, #4, #6, #7, #9, #10, #11, #12, #14, #15, #18, #19, #22, #25, #26, #27, #33, #34, #36, #40, #43, #44, #46) on NVIDIA GeForce RTX 4060 Ti (8 GB), Windows, Series S (quality-720p, DLSS Quality):1a-build1-world.log) — 0 crashes, 0 DRED resets, clean exit.28.2 fps(35.4 ms/frame) mid-run,16.9 fps(59.3 ms/frame,4,446draws/frame) in heavy scene.tearing=true,0refused presents.926c46bab3b86bd6): Translated and built host PSO cleanly.VICTORY_THIN_GATE): Active (0no free dynamic descriptor slotswarnings).6,934 MBin use (33texture blocks =2,112 MB,1,036 MBfree),0bogusPOOL:errors.16,577upscalings (0failed).8,802textures were still queued /206non-RT draws dropped without a host pipeline; no D3D12 errors.