gpu/descriptor: 2-level 64-bit bitmap DynamicSlots allocator and batched reclamation #704
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!704
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-704"
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?
@mint17 on GitHub · 2026-11-28 03:53 UTC · original
mint17:perf/dynamic-slots-bitmap-batch-release→main· +1228 −67 · 4 files · 1 commits · merged 2026-11-29 08:16 UTCReplaces the byte-per-slot
Vec<bool>linear scan inHostHeap::dynamicand per-rangerelease_dynamiclock loops inState::tables_done/Drop for Statewith a pure-Rust 2-level 64-bit bitmap allocator and batched reclamation (zero conflict with #646, #666, or #693).Changes
DynamicSlots(slots.rs): Level-0u64occupancy words + Level-1 summary bitmap skipping completely full 64-word (4,096-slot) chunks in one instruction, O(log n) bit-parallel within-word run search, O(1) cross-word fast path forn <= 64, exact next-fit cursor / wraparound /too_longwatermark parity, and overflow-clampedrelease_batch.descriptor.rs,descriptor/host.rs,draw.rs):release_dynamic_batchtakesSHADER_HEAPS.read()once per command list (zero-alloc fast path for single-heap batches, sortedchunk_byfor multi-heap batches, filtering stale heap IDs and title-slot indices< host.count()). PreservesPORTABLE_VIEWS,VICTORY_DYNAMIC_SLOTS,slot_evict, anddiagnosticscopystatcounters verbatim.Release Microbenchmark (
cargo test --release --locked -p victory-gpu --lib bench_dynamic_slots_vs_vec_bool -- --ignored --nocapture)Vec<bool>+ per-range)DynamicSlots+ batch)Verification
cargo test --locked -p victory-gpu --lib -- descriptor::slots dynamic_slots descriptor::host::tests -- --test-threads=1(52 passed, 0 failed — includes 127,500+ op randomizedVec<bool>oracle parity tests across 13 capacities, wraparound /too_longtests, and multi-heap / wrong-ID / title-slot batch reclamation tests).cargo test --locked -p victory-gpu --lib --features diagnostics -- descriptor::slots dynamic_slots -- --test-threads=1(8 passed, 0 failed).--all-features) andcargo test --locked -p xtaskpassed (6 passed, 0 failed, including asset policy).@Dukestar69 on GitHub · 2026-11-28 04:29 UTC · original · approved these changes
LGTM — verified on Windows (RTX 5090):
cargo test -p victory-gpu --lib descriptor::passed (67/67, includingoracle_parity_randomized_all_capacities_and_edge_cases,find_zero_run_in_word_matches_naive_exhaustive_patterns,wrap_across_cursor_and_no_physical_wrap_parity, andrelease_dynamic_batch_handles_empty_single_multi_wrong_id_and_stale)cargo xtask policypassed (295 files ok)Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).