Descriptors: dynamic slots go back only to the heap that took them (#392) #401
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!401
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-401"
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?
@Jesper-Andersson on GitHub · 2026-11-26 23:48 UTC · original
Jesper-Andersson:worktree-issue-392→main· +68 −21 · 3 files · 1 commits · openFixes #392.
A command list kept its dynamic descriptor slots by the title heap's address (
State::dynamicincrates/victory-gpu/src/draw.rs:501) and gave them back to whatever shader-visible heap was registered at that address when it ran, was reset or was released (descriptor::release_dynamic,descriptor.rs:862). The title can release a heap while a list still holds slots of it, and a new heap can be made at the same address. The old list then freed slots of the new heap that another list held, and two lists could write their tables into the same slots. That shows up as wrong bindings, or a device removal if a view ends up describing the wrong resource. Details are in #392. Found by reading the code; not seen in a game run.Change
descriptor/host.rs: eachHostHeapgets an identity from a process-wide counter (NEXT_ID, read withHostHeap::id).HostHeap::release(id, first, n)gives a range back only whenidis its own.descriptor.rs:release_dynamic(heap, id, first, n)passes the identity on.draw.rs:State::dynamicrecords(heap, host heap identity, first, count)at the three places a list takes slots (one-view tables of root UAVs and root SRVs, and fresh tables), andDropandtables_donehand it back.Where it does nothing
Checks
cargo test -p victory-gpu --lib --locked dynamic_s: 3 passed, including the newdynamic_slots_are_given_back_only_to_the_heap_that_took_them(from #1324): two host heaps; a range of A released with B's identity stays taken, and with A's identity it is given back. The test needs a host GPU (it returns early without one); it ran on the RTX 2070 SUPER.cargo test -p victory-gpu --lib --locked: 395 passed, 0 failed, 35 ignoredcargo clippy -p victory-gpu --lib --tests --locked: nothing in the changed files. With-D warningsthe crate doesn't get through on main itself, for reasons outside this change (list.rstotalsnever used,watch.rsneedless&mut).cargo xtask policy: ok (pre-commit hook)Not checked
Related
MEMORY.heaps) handle other state keyed by heap address and aren't part of this.HostHeap; different state.This change was made with AI assistance (Claude Code).
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.