descriptor: replace HostHeap::dynamic Vec<bool> scan with u64 bitset #444
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Wiktorxd-1 on 2026-11-27T22:35:44Z.
What 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.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Rafa7046 on 2026-11-28T01:28:26Z.
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.