GPU: after a cut, a list using our view heap and our sampler heap never binds them again (SAMPLERS_OURS equals the lost-state marker) #2879
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 BastienRodz on 2026-11-25T23:00:55Z.
Since #1778,
draw::SAMPLERS_OURS(the sampler heap we bind when the title binds none) isusize::MAX.MEMORY_HEAP(memory::OURS, our view heap for title memory) isusize::MAXtoo, and so is the markerState::host_state_lostleaves inhost_heapsso that the next draw or dispatch binds its heaps again ([usize::MAX; 2]).Input. A list that binds no sampler heap and whose shader reads title memory or root views.
memory_heapis true, soState::wanted([.., 0], true)is[MEMORY_HEAP, SAMPLERS_OURS], which is[usize::MAX, usize::MAX]. Compute lists that only read views are the case #1778 names. The host state is then lost:Wait32BitValueX/Wait64BitValueX(list.rs→State::cut→host_state_lost; the code notes 0-21 cuts per world frame), orexternal::record(FidelityFX).What happens on main
842b0cb.bind_heapscompareswantwithhost_heaps, finds them equal, and calls nothing:external::record, the other recorder's heaps stay bound instead of ours.Before #1778, that list wanted
[usize::MAX, 0], which differs from the marker, so it always bound its heaps again.DirectX-Specs, SM 6.6 Dynamic Resources: "SetDescriptorHeaps must be called, passing the corresponding heaps, before a call to SetGraphicsRootSignature or SetComputeRootSignature that uses either CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED or SAMPLER_HEAP_DIRECTLY_INDEXED flags."
Found by reading the code and checked with a unit test; I have no in-game observation of this particular removal. No game data. Analysis assisted by Claude Code.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T00:42:42Z.
Automated triage for the maintainers.
Confirmed on
main(63bcca4). Incrates/victory-gpu/src/draw.rs,MEMORY_HEAP(memory::OURS) andSAMPLERS_OURSare bothusize::MAX, andState::host_state_lostsetshost_heapsto[usize::MAX; 2]. So whenState::wantedreturns[MEMORY_HEAP, SAMPLERS_OURS],bind_heapsseeshost_heaps == wantafter a cut orexternal::recordand binds nothing.Open pull request #2882 addresses this.
Generated by Claude Code