descriptor: replace HostHeap::dynamic Vec<bool> scan with u64 bitset #444
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!444
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-444"
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?
@Wiktorxd-1 on GitHub · 2026-11-27 22:35 UTC · original
Wiktorxd-1:perf/dynamic-slot-bitset→main· +128 −24 · 1 files · 1 commits · openWhat this fixes
HostHeap::dynamic(crates/victory-gpu/src/descriptor/host.rs) tracks 262,144 to 1,048,576 dynamic descriptor slots behind a singleMutexshared by allVICTORY_THIN=1recording threads. Previously it storedVec<bool>(256 KiB–1 MiB) and scanned 1 byte at a time on every uncached descriptor table, root SRV, and root UAV allocation, andHostHeap::releaseiteratedslots.iter()byte-by-byte.Replacing
Vec<bool>with aVec<u64>bitset (4 KiB–16 KiB, 64 slots peru64):taken == u64::MAX/taken == 0) and locates free runs viatrailing_zeros()/trailing_ones();count_ones()and word masks inHostHeap::release;self.dynamicbounds (trailing padding bits in the final word are initialized to1and never cleared byrelease) and no-wrap-past-end semantics acrosscursor.The commits
HostHeap::dynamicVec<bool>scan withu64bitset (find_free_run,set_bits,clear_and_count_bits).Tests
cargo test --locked -p victory-gpu --lib descriptor::host::tests(47 passed; 0 failed, includingdynamic_slots_are_held_until_released,dynamic_search_can_find_a_run_across_the_cursor,dynamic_slots_populate_and_clear_stride_table,dynamic_slots_are_given_back_only_to_the_heap_that_took_them)cargo build --release --locked -p victory(succeeded)target\release\victory.exeviascripts\play-nvidia.ps1(35s,warns=0,crashes.log=False).Setup
NVIDIA GeForce RTX 5070, driver
621.14.0, Windows 11 (10.0.26300). Series S profile, DLSS Performance, Frame Generation 6x. My own dump:<game dir>. No game files are attached or quoted.This change and its testing were done with an AI assistant (Antigravity), and I checked the results on my machine.
@Rafa7046 on GitHub · 2026-11-28 01:28 UTC · original
Measured on an RTX 5080 16 GB + Ryzen 9 9950X3D (Series X, 1440p, DLSS Performance, frame generation off, diagnostics build on
64d4931with only this PR applied, pipelines made ahead withvictory warm), same stretch each run: Lucia's arrest cutscenes, then Jason on the boat and a minute standing still.preparingin the cutscenesmain, run 1main, run 2Two runs of plain
maindiffer by about 2.4 fps, so this is within the run-to-run spread on this machine: no measurable change in frame rate here, and no new warnings, faults or crashes in the log. On this card the frame is set by the submitting thread (about 21 ms of a 28 ms frame), which is probably why a saving of this size does not show.Same machine and scene with and without the title's ray tracing: #535.
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.