GPU: index bindless texture slots for targeted release and preserve u… #1860
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1862"
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 Marvisak/VIctory. Originally posted by VlREX on 2026-11-24T23:44:30Z.
Optimize runtime bindless descriptor bookkeeping with a reverse texture-to-slot index and unchanged-view fast path. Includes 200 synthetic regression traces across 10 workload families. Two independent reference checks over 23,680 operations each, zero disagreements. Synthetic release work reduced from 30,006 examined entries to 5,874 targeted removals (80.42% fewer). 204 files, no new dependencies or proprietary assets. Native Rust and GPU validation pending. No FPS improvement claimed. AI-assisted (ChatGPT).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:47:44Z.
Review: COMMENTED
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Bindless texture slots indexed for targeted release + preserve…: bindless slot lifecycle; interacts with heap-clamp work #1777/#1779 — check consistency.
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-25T00:10:57Z.
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at
aab3845:cargo test -p victory-gpu --lockedgives 276 passed, 2 failed, 1 ignored. The two failures are the NVIDIA heap-cap onesmainalso has (descriptor::host::tests::dynamic_slots_are_held_until_releasedandmemory::tests::lists_share_a_table_and_copies_keep_their_views, #1744), so there is nothing new on this hardware. Not run: a title.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:37:24Z.
Automated triage for the maintainers.
Merge candidate. The head (
3ff4bc0) hasn't changed since the last review.bindless::Inner::texturesincrates/victory-gpu/src/bindless.rsbecomes a texture-to-slot-set index.forget, which runs on everyResourcedrop, removes only that texture's slots (forget_texture) instead of scanning the whole heap. The seeded test inbindless/slot_tests.rschecks the index against a full-scan reference after every step.On your reply: thanks for the numbers, including the ones that go against the change. Release gets much faster when a texture has few slots (up to 95x at 32,768 slots), but all nine rewrite-only configurations got slower because of the extra index upkeep. Which of those costs dominates in a real frame is the maintainer's call. A per-frame timing from the title would settle it. Please also finish the truncated PR title.
CI: passing (
check).Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by VlREX on 2026-11-25T20:58:08Z.
Native performance validation
Ryzen 5 3600X / RX 5700 XT / Windows 10
Rust 1.98.1
32768 slots:
Release measurements include reinsertion.
13 of 27 configurations improved.
All 9 rewrite-only configurations were slower
due to reverse-index maintenance overhead.
PR head:
3ff4bc0Benchmark source:
github.com/VlREX/VIREX@b62629774dSeven alternating-order samples per configuration.
Real workload profiling remains necessary.
Synthetic CPU benchmarks, not game FPS.
AI-assisted development (ChatGPT).
Native local measurements.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T19:51:53Z.
Review: APPROVED
Reviewed and verified
3ff4bc053cd9aed53f125b4f6caf001e06347dd4merged ontoorigin/main(63bcca43c6a00a758510398fa43096ce7e4f7df0) on Windows 11 x64 (RTX 5090 + Microsoft WARP,--features diagnosticswithVICTORY_D3D12_DEBUG=1, Rust 1.98.1 MSVC).Code Audit
.texturesand.slotsaccess incrates/victory-gpu/src/bindless.rs:Inner::replace(L83-91),Inner::forget_texture(L93-100), andInner::count(L137-146) maintain a strict bijection betweenslots(HashMap<u32, Seen>) and the reverse indextextures(BTreeMap<usize, BTreeSet<u32>>), removing empty texture entries on overwrite/clear and removing only slots mapped toresourceonforget(L372).uploadsiteratinginner.textures.keys()andlogreadinginner.textures.len()) remain semantically unchanged, anddebug_assert!(matches!(old, Some(Seen::Texture(r)) if r == resource))(L97) guards against index drift in debug builds.Local Verification
cargo xtask policy— pass (192 files ok).cargo clippy --locked -p victory-gpu --all-targets -- -D warnings(default and--all-features) — 0 warnings.cargo test --locked -p victory-gpu --features diagnostics --lib bindless::(RTX 5090 and WARP) — 5/5 passed, includingslot_tests::release_preserves_overwritten_and_unrelated_slotsandslot_tests::seeded_slot_updates_match_full_scan(200 seeds x 256 operations).(Minor non-blocking nit: the PR title is currently truncated at
preserve u....)Looks good to merge.
Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T23:49:46Z.
Review: APPROVED
LGTM — verified on RTX 5090 (Windows / D3D12) against
origin/main(63bcca4).cargo test -p victory-gpu --lib bindless:: -- --test-threads=1: all passed.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 192 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.