GPU: rebind replaced descriptor heaps by host identity #1331
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!1331
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1331"
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?
@EatCodeSleep2 on GitHub · 2026-11-24 17:30 UTC · original
EatCodeSleep2:fix/rebind-replaced-descriptor-heaps-1242→main· +71 −14 · 1 files · 1 commits · openSummary
Compare the D3D12 descriptor heaps resolved for the current draw or dispatch against the host objects already bound. When a title heap is released and its address is reused, the new host heap is distinct because the recording still holds a reference to the old host heap. Rebind and invalidate both cached root signatures when the host heap changes.
Refs #1242, finding VIC-BT-013.
Verification
The test checks host heap replacement during recording. It does not force guest allocator address reuse or submit GPU work. AI-assisted. No game files used.
@acetonahard-code on GitHub · 2026-11-24 19:21 UTC · original
Tested this on a GPU with SM 6.6 support (RTX 4070 SUPER, driver 621.14, Windows 11, repo toolchain), merged into current
main(ffe310e).cargo test -p victory-gpumainmain+ this PRmain,--all-featuresmain+ this PR,--all-features--nocapture, and no "no SM 6.6 ... device; skipped" lines were printed, so no GPU test skipped for lack of a device.cargo clippy --all-targets -- -D warnings, with and without--all-features: clean.cargo fmt --checkwould rewrap one block this PR adds (draw.rs).mainisn't rustfmt-clean either, so take it or leave it.frame::tests::waits_end_on_ticks_and_count_framesfailed once and passed on a rerun. It's timing-flaky onmaintoo (2 of 10 full-suite runs here), and unrelated to this PR.I didn't test with game data.
Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.
@wbkepler on GitHub · 2026-11-24 20:56 UTC · original
On whether the new key can itself hit ABA: I don't think it can. Every host heap whose
as_raw()ends up inhost_heapshas just been passed tolist.keep, which holds it untilHostList::reset. On upstream the only call to that for title lists islist.rsreset, and it is immediately followed bystate.reset(pipeline), which zeroeshost_heaps. So a cached identity can't be freed and reused while it is still cached. (Thep.copy.reset()inhost.rsis a prelude copy list with noState.)Merge-order note: #1382 rewrites the same
SetDescriptorHeapsblock inState::prepare(a stack array instead of theVec). The two conflict textually but don't clash in intent, so whichever lands second just needs a rebase. The host-identity comparison here should be kept.AI-assisted review (Claude Code); checked on Windows 11 / RTX 5090.
@Marvisak on GitHub · 2026-11-25 01:22 UTC · original
Automated triage for the maintainers.
Needs rebase. This pull request conflicts with
main(conflicting:crates/victory-gpu/src/draw.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.