GPU: index bindless texture slots for targeted release and preserve u… #1862
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1862
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@VlREX on GitHub · 2026-11-24 23:44 UTC · original
VlREX:perf/bindless-slot-index-corpus→main· +139 −25 · 2 files · 2 commits · openOptimize 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).
@upipibi on GitHub · 2026-11-25 00:10 UTC · original
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).
@Marvisak on GitHub · 2026-11-25 01:37 UTC · original · edited 2026-11-26 00:22 UTC
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
@VlREX on GitHub · 2026-11-25 20:58 UTC · original
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.
@catminou4 on GitHub · 2026-11-24 23:47 UTC · original · reviewed
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.
@fuzeofficlal on GitHub · 2026-11-26 19:51 UTC · original · approved these changes
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.
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.