No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!4678
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4677"
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?
@davemathews12 on GitHub · 2026-12-01 01:32 UTC · original
davemathews12:fix/card-hash-before-snapshot→main· +13 −2 · 1 files · 1 commits · closed without mergingRefs #4544, Refs #4643
What it changes
The card-copy sync (
host.rs, the list that brings copies in the card's memory up to date) decides twice whether a copy has its hash buffer (before):own.is_none() && before.is_some() && !ranges.is_empty()pushes the copy'sCOPY_DEST -> NON_PIXEL_SHADER_RESOURCEtransition;shadow.card_before_gpu()decides whether the copy is bound as a root SRV (SetComputeRootShaderResourceView(1, shadow.buffer_gpu())).The sending thread records this list while the submitting thread prepares the next submission, and
card_take_preparedis wherebeforeis made (card_make_before), as the comment there says. Abeforemade between the two reads leaves the copy inCOPY_DESTand binds it as a root SRV. That is the debug-layer message in #4544 ("Resource state (0x400: COPY_DEST) (promoted from COMMON state) … is invalid for use as a root shader resource … Missing State: 0x40"), and the root-SRV messages in #4643's GBV run (3 of them). NVIDIA and AMD tolerate it; the Arc driver removes the device.The fix reads
beforeonce per copy, beforeown.recordand the copy loop, and the hash pass uses that snapshot.beforeis aOnceLock(set once, never cleared), so every later read agrees whenever the snapshot saw it, and the transition is always pushed for a copy that is hashed. A copy that gets itsbeforeafter the snapshot isn't hashed in this list. The submission that made it has it inwholeand hashes all of it, as before.What it doesn't change: #4643's other messages (
CopyBufferRegionreading a buffer inCOPY_DESTwhereCOPY_SOURCEwas required, 116–249 of them) come from another path, which this doesn't touch.How it was tested
cargo testpassed for the crates it touches: not run (the code is Windows-only).cargo clippy -p victory-gpu --tests --target x86_64-pc-windows-msvc: no errors and no new warnings, cross-checked from Linux.cargo xtask policy --stagedpasses.Asking Arc owners (@marcelloveyugioh-wq, @gilmarcs): with
VICTORY_D3D12_DEBUG=1and card buffers on, does the "invalid for use as a root shader resource" message still appear with this change?Checked for overlap
🤖 Generated with Claude Code
@marcelloveyugioh-wq on GitHub · 2026-12-01 05:54 UTC · original
Tested #4678 on the Arc B580 (driver 32.0.101.9175). The message still appears, so this change doesn't fix it.
Setup: PR head
c17489a, built withcargo build --profile diag -p victory --features diagnostics. Started withscripts\play-nvidia.ps1 -Build diag -SeriesS -Dlss off -NoMenu -More 'VICTORY_D3D12_DEBUG=1,VICTORY_LIBRARY_MAP=0'. Card buffers were on (noVICTORY_CARD_BUFFERS), TdrDelay 60, fresh cache and data dirs.Result:
Using SetComputeRootShaderResourceView … Resource state (0x400: D3D12_RESOURCE_STATE_COPY_DEST) (promoted from COMMON state) … is invalid for use as a root shader resource … Missing State: 0x40. All of them areCOPY_DEST, the same as before the change.relay: the device was lost before fence value 347232 was reached … 0x887A0006; debug layer: … DXGI_ERROR_DEVICE_HUNG.the submitting thread was preparing a submission (nothing of ours was running on the card), of 27 lists, for 979.3 ms.A guess, not verified: the message is reported at
ExecuteCommandListsand says the state was promoted from COMMON. So the buffer seems to be promoted toCOPY_DESTby a copy in an earlier list of the sameExecuteCommandListscall, and then bound as a root SRV in a later list of that call. Implicit promotion persists across lists within one call. The compare pass after the lists bindsr.shadow.buffer/key.buf_gpuas root SRVs (host.rs ~8612–8666 at this commit), and I couldn't find aCOPY_DEST → NON_PIXEL_SHADER_RESOURCEtransition before it for copies that the title's own buffer copies wrote in that submission. If that compare list goes into the sameExecuteCommandListsas the lists that copied into the card copy, it would produce exactly this message, independent of thebeforerace fixed here.The full log (17 MB) is available if useful.
@davemathews12 on GitHub · 2026-12-01 12:37 UTC · original
Closing: #3881 (JSa25) made the same change first, and I missed it when I searched. marcelloveyugioh-wq's Arc run shows this change doesn't stop the messages anyway: the compare is sent in the same ExecuteCommandLists call as the title's lists, so a copy they promoted to COPY_DEST is still in it. That fix was merged as #1 and lost in the foxhound merge (
4db42779). It's back in the new PR from fix/compare-own-execute. Thanks @marcelloveyugioh-wq for the test.Pull request closed