perf(gpu): 64-way striped Shadow::merging, wide_each, and zero-alloc watch::writes_since #21
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-logs
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ToLIManl--VIctory-Hydra!21
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/21/head"
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?
@justadudeinbulgaria on GitHub · 2026-11-30 23:19 UTC · original
justadudeinbulgaria:pr/shadow-striped-merge-and-watch-fastpaths→main· +307 −52 · 3 files · 1 commits · closed without mergingSummary
Reduces lock contention and per-refresh heap allocations on the shadow buffer and write-watch hot paths (cleanly disjoint from PR #11
PATCHED_CARDS):crates/victory-gpu/src/shadow.rs:Shadow::mergingRwLockwith 64-way striped locks (16 KiB stripes) and a zero-array single-stripeMergeReadGuard/MergeWriteGuardenum sovictory-submitandvictory-relayno longer block on disjoint ranges of large buffers.wide_eachwork-stealing dispatch (with ahelpers == 0inline guard),Shadow::all_copiedatomic mirror, bit-run coalescing inby_parts, andcompiler_fence+Acquireordering onFOUND.crates/victory-gpu/src/watch.rs&crates/victory-gpu/src/texture.rs:watch::writes_since(Notes::any_since+Held::any_since) wired intoStaging::refresh_timedso clean texture refreshes avoid allocating aVec<(usize, u64)>on every check.watch::asking_stands()early skip before sorting/allocating ranges inask_ahead_heldandall_copiedpre-lock check inwatch::nothing_new.Verification
cargo test --release -p victory-gpu --lib shadow::(39/39 passed) andcargo test --release -p victory-gpu --lib watch::tests:: -- --test-threads=1(31/31 passed).6,900-draw open world, clean visuals).@ToLIManl on GitHub · 2026-12-01 00:48 UTC · original
Integrated into \main\ in commit \
64f4cb9\ (with \Co-authored-by\ attribution; removed the unused \sking_stands\ helper in \watch.rs\ to keep release builds warning-free).Live A/B on RTX 3060 12 GB confirmed clear gains over the same PR batch without #21: \mean_fps=15.94\ vs \14.41\ (+10.6%), \median_fps=16.36\ vs \15.31, \p99_ms=90.7\ vs \160.2\ (-43%), \vg_tex_ms=0.26\ vs \
Pull request closed