Opt-in ListPipelineManifest and BatchPrune refresh no-op pruning (VICTORY_LIST_MANIFEST, VICTORY_BATCH_PRUNE) #4795
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4795
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4794"
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?
@lyufeng000 on GitHub · 2026-12-01 08:54 UTC · original
lyufeng000:pr/manifest-batch-prune→main· +3660 −42 · 7 files · 1 commits · closed without mergingWhat it changes
Adds two independent, opt-in (default-off) CPU submission-thread optimizations (
crate::asked_for!;apps/victory/src/play.rsdefaults untouched, zero extra locks/atomics when disabled):VICTORY_LIST_MANIFEST=1(crates/victory-gpu/src/host/manifest.rs) — builds an immutableArc<ListPipelineManifest>once per closedHostList(or right aftertake_coming()underVICTORY_COMING_AT_SUBMIT), guarded by a lock-freehas_manifest: AtomicBool:refresh_spans: whole-list per-shadow_idunion forcopy_spans,pending_refresh_spans,will_meet,place::read_by, and exact no-lock rejection incard_steps::copied_reads.compact_touches: execution-order view coalescing contiguous pure-Refreshsub-runs while preserving exactstep_indexand barriers acrossCopy,Fill { is_slot },Placed { has_from },GpuWrite,Run,Host,Texture, andPlane.list.deferred()mutex acquisitions and step walks inblocked_with,joinable,declared_writes,refresh_front,refresh_ahead,run_deferred_manifest,card_steps::does_of,card_steps::cut_for, andplace::forwards.VICTORY_BATCH_PRUNE=1(crates/victory-gpu/src/host/batch_prune.rs,watch.rs,shadow.rs,host.rs) — persistentshadow_id-keyed 32-byte clean-interval cache across submissions (insideSPARE_BATCH) backed by opt-in lock-free 64 KiB page-stripe write epochs (watch::fine_range_epoch):TRACK_FINE_EPOCHS: AtomicBool(enable_fine_epochs()); uses 16,384 × 64 KiB slots (FINE_SHIFT = 0) for spans< 16 MiBand 64 × 64 MiB coarse shards for>= 16 MiBspans.GLOBAL_UNMAP_GENbumps only on unsized frees whose extent cannot be resolved locally; ranged remaps, unmaps, splits, and protections invalidate only affected stripes + aliases.CleanWatchEntry: zero heap allocation for single-range shadows (2 entries per cache line); disjoint multi-range shadows spill toextra_rangescapped at 12 intervals without bridging unchecked gaps.fine_range_epochstrictly beforenothing_new_withand admit cold-clean spans (no hot-dirty re-probing afterSelf::update).watched == 1) hits requirewatch::is_asked_or_owned(ahead_snap, lo, hi)(is_kept() && ahead_containsorowned); guarded views require livewatch::is_published(lo, hi); pending GPU writes force a miss.GpuWrite,Placed, andpicked.writtencallinvalidate_shadow(shadow_id); CPUStep::CopyandStep::Placedkeepask_onceactive and invalidate locally viawatch::wrote(dst, len)(with!is_kept()fallback tobump_fine_range_with_aliases) instead of flushing the wholeclean_cache; only opaqueStep::Run(ask_once_end) clears the entireclean_cacheandahead_snap.sift_spans_pruned/ fusedwide_each_scoped), PR #3818 (nothing_new_withrange memo),VICTORY_CARD_ALL=1,VICTORY_UAV_FOLD=1, andhost/lazy.rs.How it was tested
VICTORY_PLACED_COPIED=0.e1251c31,VICTORY_PLACED_COPIED=0, 742s active FG-on gameplay):23.03Base FPS (med22.0),find_ask0.44 ms,scanned8,803/wide3,358per frame,GPU idle behind sub6.83 ms,Submit prep29.28 ms(sub_work44.02 ms).Dirty [800, 1050)bucket (296s):23.1Base FPS,prep26.51 ms,refreshes9.36 ms,wide2,518,GPU idle behind sub9.10 ms.Dirty [1050, 1300)bucket (220s):22.3Base FPS,prep31.45 ms,refreshes11.80 ms,wide4,028,GPU idle behind sub5.74 ms.VICTORY_LIST_MANIFEST=1 VICTORY_BATCH_PRUNE=1,VICTORY_PLACED_COPIED=0, 1,224s active FG-on gameplay, 0 ERRORs, 0 crashes):23.62Base FPS (med23.0, +2.6% despite heavier scenes: GPU33.01 msvs31.79 ms),find_ask0.26 ms(-40.9%),scanned6,733(-23.5%) /wide1,461(-56.5%),GPU idle behind sub4.60 ms(-32.7%),sub_work42.84 ms(-1.18 ms).Dirty [800, 1050)bucket (479s):24.8Base FPS (+7.4%),prep25.17 ms(-1.34 ms),refreshes8.99 ms(-0.37 ms),wide1,207(-52.1%),GPU idle behind sub5.42 ms(-40.4%).Dirty [1050, 1300)bucket (379s):23.1Base FPS (+3.6%),prep30.62 ms(-0.83 ms),refreshes11.43 ms(-0.37 ms),wide1,498(-62.8%),GPU idle behind sub3.79 ms(-34.0%).cargo testpassed for the crates it touches: yes (rebased onto5fabb46e, all 7 files verified):cargo xtask policy --staged→asset policy: 7 files ok(exit 0)cargo test -p victory-gpu --lib --locked -- host::manifest host::batch_prune host::refresh_tests watch::fine_epoch_tests host::card_steps host::place(default switches OFF) →52 passed; 0 failed(6 ignored benchmarks/manual)VICTORY_LIST_MANIFEST=1 VICTORY_BATCH_PRUNE=1 cargo test -p victory-gpu --lib --locked -- host::manifest host::batch_prune host::refresh_tests watch::fine_epoch_tests host::card_steps host::place→52 passed; 0 failed(6 ignored)cargo clippy -p victory-gpu --all-targets --lockedand--all-features→ 0 warnings in all 7 added/modified files (the 5 warnings invictory-gpuare pre-existing on5fabb46einhost/font.rs,host/menu.rs, andhost/panel.rsfrom PR #4635).Checked for overlap
#4774(VICTORY_FLUSH_FAST_NOOP, which cachesahead_snapand checkslast_cleanon a singleowned_snap) and#4532(cacheswatch::aheadsnapshot by generation): this PR adds immutable dual-viewHostListmanifests (VICTORY_LIST_MANIFEST) plus a persistentshadow_id-keyed 32-byteclean_cachedriven by opt-in lock-free 64 KiBfine_range_epochwrite/remap/aliasing invalidation (VICTORY_BATCH_PRUNE) while keepingplay.rsdefaults unchanged.@trustno1-coder on GitHub · 2026-12-01 18:32 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed