Index declared-buffer membership for large copy plans #4395
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!4395
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4394"
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?
@sklzygit on GitHub · 2026-11-30 19:44 UTC · original
sklzygit:contrib/buffer-membership-index→main· +68 −3 · 1 files · 1 commits · openWhat it changes
Large copy plans repeatedly linearly search declared buffers for each looked-at range. Add a temporary pointer-identity index when there are more than 32 declared entries and more than 8 looked-at ranges, reducing those membership checks from quadratic to amortized linear work. Small plans keep the allocation-free linear path.
Both borrowed and owned preparation use the same exclusion logic. The original iterator supplies the output, preserving range order, bounds and duplicates; declared Arcs keep pointer identities alive throughout the lookup. No shader, command ordering, upload policy, cache key or launcher changes.
How it was tested
cargo test --locked -p victory-gpu --lib host::tests -- --test-threads=1: 114 passed, 3 ignored on upstreame1251c31plus this patch. Full crate suite was not rerun for this isolated branch.cargo test --release --locked -p victory-gpu --lib measure_large_buffer_membership_index -- --ignored --nocapture.git diff --checkpasses. Shader wave sizes: not applicable.Gameplay impact remains unmeasured.
Checked for overlap
contains_shadowsearches in that path, not its grouping work.Current-main revalidation (2026-12-01)
Rebased as one focused commit
f9271558directly on upstream5fabb46e, removing the obsolete upstream-history divergence from the PR comparison. No unrelated launcher, shader or dependency changes.Hardware for the local checks: Windows 11, Ryzen 7 9800X3D, GeForce RTX 5080 16 GB, 32 GB system RAM, NVIDIA driver 621.40 (32.0.16.2140). These PRs are generic allocator/host changes; the tests below are not gameplay measurements. The local game profile is Series X, output 2560×1440, DLSS Quality, 30 FPS base cap, frame generation off in the latest recorded playtest, ray tracing off. The focused regression tests do not launch the game or depend on this profile.
cargo test --locked -p victory-gpu --lib host::tests -- --test-threads=1: 114 passed, 0 failed, 3 ignored.git diff --check origin/main...HEAD: passed.c4bff1d7b5tof9271558da@albertik322-sudo on GitHub · 2026-12-01 17:00 UTC · original
Tested as part of a batch cherry-picked onto main @
5fabb46e(with #3943, #4394 and this one together). PC: RTX 3070 Laptop 8 GB, i7-11800H, 32 GB RAM, Windows 11. Series S, DLSS Performance, FG x4.No isolated measurement — but the batch showed no regressions over multiple 20+ minute sessions: fps medians stable or slightly up (17.4 to 17.8 in light scenes), no crashes, no visual corruption. Posting mostly to confirm it runs fine on a memory-tight 8 GB laptop, which is probably the harshest environment for anything touching allocator locking.
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.