GPU: indirect execution starts from the read states the list promoted #1527
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!1527
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1527/head"
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?
@Bladureau on GitHub · 2026-11-24 18:48 UTC · original
Bladureau:fix/indirect-args-tracked-reads→main· +248 −9 · 5 files · 2 commits · closed without mergingThis PR builds on #1507. Until #1507 is merged, its commit (
f77bd04)shows up here too. The only new commit in this PR is
2ae2e72.What
The second half of the indirect path's state handling: the id=527 errors
that #1507 left.
indirect::boundassumed its argument buffer was inUNORDERED_ACCESS. Thatbuffer is a title buffer's host copy. It is in
COMMONor in the read statesthe list's own bindings promoted it to. When a draw had already read it as
vertex data, the debug layer reported the wrong before-state:
How
promotion.rs(new): eachHostListnotes the read states its ownbindings promote title buffers to. Read states add up, as the host's do.
The module is pure bookkeeping, unit-tested without a GPU.
draw.rs):VERTEX_AND_CONSTANT_BUFFERINDEX_BUFFERVERTEX_AND_CONSTANT_BUFFERNON_PIXEL_SHADER_RESOURCE, orPIXEL_SHADER_RESOURCEfor the pixel stageINDIRECT_ARGUMENTindirect::boundholds the buffer and starts from what the listpromoted. From
COMMON, the clamp's root UAV promotes it by itself, asbefore. From read states, an explicit transition to
UNORDERED_ACCESScomes first.
GENERIC_READinstead ofINDIRECT_ARGUMENT. The execution's own bindings (made afterbound) canread the same title buffer as vertices, indices or root SRVs.
donereturns it to
COMMONand releases it.HostList::closereturns every buffer the list promoted toCOMMON.Decay only happens at the end of
ExecuteCommandLists, and a submissionholds many lists, so without this the next list of the submission could
receive a buffer still in read states. Its clamp would then write a
buffer it cannot promote to
UNORDERED_ACCESS.Limit: accesses through descriptor tables are not noted. The debug
layer does not track them either, without GPU-based validation.
Results
These are diagnostics builds on an RTX 4060 Laptop, with
VICTORY_D3D12_DEBUG=1andVICTORY_D3D12_DRED=1, through the firstmission's intro:
None of the other errors are state errors, and each was there before:
The new "a host list ends with a title buffer in an explicit state"
warning never fired.
This does not fix the world's GPU hang on this machine. It still comes
during the intro. #1508 has the measurements, which point at video memory
(8 GB).
Testing
cargo test -p victory-gpu: 53 passed, 1 ignored (3 new tests inpromotion)cargo clippy -p victory-gpu --all-targets, with and without--features diagnostics: clean🤖 Generated with Claude Code
@Bladureau on GitHub · 2026-11-24 19:58 UTC · original
Closing in favour of #334, which fixes the same debug-layer errors (ids 527 and 538) more completely: it also tracks shader writes and table views, and has a debug-layer test. On this RTX 4060 Laptop, #334 with #578 gives 0 of each in the title: #334
Pull request closed