gpu/descriptor: 2-level 64-bit bitmap DynamicSlots allocator and batched reclamation #704
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mint17 on 2026-11-28T03:53:30Z.
Replaces 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).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Dukestar69 on 2026-11-28T04:29:01Z.
Review: APPROVED
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).