GPU: a lost host list's heaps are not a wanted pair #3039
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!3039
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3039"
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?
@kotekompotek on GitHub · 2026-11-26 04:54 UTC · original
kotekompotek:gpu/lost-heaps-marker→main· +29 −6 · 1 files · 1 commits · openSummary
Fixes #2881.
host_state_lostmarkedhost_heaps[usize::MAX; 2], but a list that binds no heaps and reads title memory wants[MEMORY_HEAP, SAMPLERS_OURS]— the same pair. After a cut (Wait32/64BitValueX, 0–21 per world frame) or anexternal::record(FidelityFX),bind_heapsfound them equal and bound nothing: the next directly-indexing root signature ran with no heaps bound — debug layer id 1419, the device removal on NVIDIA that #1778 was written to prevent (#1754).host_heapsis nowOption<[usize; 2]>:Nonemarks the lost state and equals no pairwantedcan make, so the nextbind_heapsbinds again. This removes the whole sentinel-collision class rather than picking a different one.Test plan
cargo test -p victory-gpu --lib heaps— newa_lost_host_state_matches_no_wanted_heapsfails on the old[usize::MAX; 2]marker forwanted([0,0], true), passes underOptioncargo clippy -p victory-gpu --all-targets --locked -- -D warningsclean (msvc)Generated with Devin
@Marvisak on GitHub · 2026-11-26 06:14 UTC · original
Automated triage for the maintainers.
I confirmed the bug on
main. Incrates/victory-gpu/src/draw.rs,MEMORY_HEAP(memory::OURS) andSAMPLERS_OURSare bothusize::MAX.State::wanted([.., 0], true)therefore returns the same[usize::MAX; 2]thatState::host_state_lostuses as its marker, so after a cutbind_heapsbinds nothing. This PR makeshost_heapsanOption<[usize; 2]>and usesNoneas the lost state. Nowantedpair can equalNone, so this kind of sentinel collision can no longer happen.host_heapsis touched only inhost_state_lostandbind_heaps. The defaultNonefor a newStatealso forces the first bind, as the old[0, 0]did. The test covers everywantedcombination. CI:checkpassing.Note for the maintainers: #2882 fixes the same issue, #2881, by moving
SAMPLERS_OURStousize::MAX - 1, and it is also labelled as a merge candidate. Only one of the two should land. This one removes the sentinel instead of picking a different value, so I would prefer it, but that is your call.Generated by 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.