Copies at their place: their destination back to COMMON (#350) #425
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!425
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-425"
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?
@MamaLeVrai on GitHub · 2026-11-27 00:57 UTC · original
MamaLeVrai:copy-dest-root-srv→a-publier· +177 −2 · 1 files · 1 commits · closed without mergingFixes #350.
What
HostList::place_copy(host/place.rs, copies at their place,VICTORY_COPIES_IN_PLACEon by default) copied into the destination's host copy and followed it only withwait_for_all. That is a global barrier, or an aliasing + UAV barrier, so the buffer stayed promoted toCOPY_DEST. That is a write state, and nothing can promote it again for the rest of theExecuteCommandListscall. Readers after it then used the buffer in an invalid state:place_copydeclares the range withgpu_writes, the compare binds it withSetComputeRootShaderResourceView(1, r.shadow.buffer…)(host.rs ~4729), and it goes to the queue in the sameExecuteCommandListscall after the runs. This is the issue's exact message: "COPY_DEST (promoted from COMMON state) … title buffer … on the card … invalid for use as a root shader resource";VICTORY_ROOT_SRV_DIRECT=1(by default root SRVs are one-view tables, which the layer does not check).Also, where source and destination are the same host copy, it was promoted to
COPY_SOURCEand then written asCOPY_DEST.Change: after the copy,
to.buffergoesCOPY_DEST -> COMMON, thenwait_for_all. In the same-buffer case,from.buffergoesCOPY_SOURCE -> COMMONbefore it is copied into. That is howcard_steps::recordand the upcheck helpers already leave host copies, "as the submission's lists expect them".Refreshes in a prelude list (the issue's second candidate) are not involved. Preludes only touch textures, and the card sync list goes in an
ExecuteCommandListscall of its own.Test
host::place::tests::copies_in_place_leave_their_buffers_to_root_views, ignored. It wants a diagnostics build,VICTORY_D3D12_DEBUG=1, and a process of its own. It listens withID3D12InfoQueue1::RegisterMessageCallback, because the host's own submission empties the message queue. It runs 4 cases (copy then root SRV, copy then compare, same-buffer copy, and so on) for a 256 KiB host copy in PC memory and an 8 MiB one on the card, then executes.VICTORY_D3D12_DEBUG=1 cargo test --release -p victory-gpu --features diagnostics --lib -- --ignored --exact host::place::tests::copies_in_place_leave_their_buffers_to_root_views, on an RX 6950 XT:a-publier, only the test added): 7 of the 8 cases get messages (1, 1, 1, 0 in PC memory; 2, 2, 1, 1 on the card), and the test fails;cargo test --release -p victory-gpu --lib, twice before and after: 396 passed, 0 failed, 34 / 35 ignored (the new ignored test).Not covered
COPY_SOURCE, as isplace_source's. Taking it back to COMMON would be wrong if an earlier read in the list had already combined that state.AI-assisted (Claude Code); no game data.
🤖 Generated with Claude Code
@copilot-pull-request-reviewer[bot] on GitHub · 2026-11-27 00:57 UTC · original · reviewed
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
@MamaLeVrai on GitHub · 2026-11-27 01:37 UTC · original
Closing in favor of #424, which fixes the same thing and also tracks buffer states per list. It passes this PR's debug-layer test with 0 messages in all 8 cases (details on #424).
AI-assisted (Claude Code); no game data.
Pull request closed