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!4884
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-4883"
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 12:43 UTC · original
davemathews12:fix/compare-own-execute→main· +58 −8 · 1 files · 1 commits · closed without mergingRefs #4544, Refs #4643
What it changes
The compare of copies in the card's memory (
plan.check) is sent in the sameExecuteCommandListscall as the title's lists, after them. A title list can leave a card copy promoted toCOPY_DEST(aCopyBufferRegioninto it, e.g.place_copy), and a promoted state lasts to the end of that call, across its lists. The compare then binds the copy as a root SRV (SetComputeRootShaderResourceView(1, …), host.rs, the compare pass) while it is inCOPY_DEST: D3D12 message 538, "Resource state (0x400: COPY_DEST) (promoted from COMMON state) … is invalid for use as a root shader resource … Missing State: 0x40". NVIDIA and AMD tolerate it; Arc B580 removes the device (marcelloveyugioh-wq's run in #4678: 3,114 of these, allCOPY_DEST, thenDXGI_ERROR_DEVICE_HUNG; gilmarcs's runs in #4643).This was fixed once: #1 (merged Nov 26) sent the compare in a call of its own, since buffers decay to
COMMONbetween calls, and #3 kept the timeline's end marks after it. Neither is on main now: the merge onto the foxhound base,4db42779("its tree is kept in history, not in the files"), took foxhound'shost.rs, which pushes the compare onto the submission's lists.git log -m -S compare_at -- crates/victory-gpu/src/host.rsshows it added by #3 (fdc8bbc5) and gone in4db42779.This brings it back, for all three send paths:
VICTORY_SUBMIT_SPLIT);compare_cutsadds a cut before the compare, after the parts' cuts, and never makes an empty call. The diagnostics' timeline marks that are inserted in front shift its place, as they shiftfirsts. The end marks stay after the compare, in its call, as #3 had them.Cost: one more
ExecuteCommandListscall in a submission that has a compare. I haven't measured it.Related, not overlapping:
place_copy's destination toCOMMONafter the copy, at the source. Its debug run measuredSetComputeRootShaderResourceView538s going from 98,637 to 0. The two don't conflict. This one also covers a copy promoted toCOPY_DESTby any other command in the title's lists, and it is what #1 did.plan.check's prologue.beforeonce per recording. That's a different race, and it doesn't stop these messages (marcelloveyugioh-wq's run).How it was tested
cargo test: not run (host.rs is Windows-only); a new test,the_compare_is_sent_in_a_call_of_its_own, coverscompare_cuts.cargo clippy -p victory-gpu --tests --target x86_64-pc-windows-msvc, with and without--features diagnostics: no errors and no new warnings, cross-checked from Linux.cargo xtask policy --stagedpasses.Asking Arc owners (@marcelloveyugioh-wq, @gilmarcs): with the same command as your #4678 run (
VICTORY_D3D12_DEBUG=1, card buffers on), does "invalid for use as a root shader resource" still appear, and does the device still hang?Checked for overlap
🤖 Generated with Claude Code
A title list can leave a card copy promoted to COPY_DEST (a CopyBufferRegion into it), and a promoted state lasts to the end of the ExecuteCommandLists call. The compare of copies in the card's memory was sent in the same call, after the title's lists, and binds the copy as a root SRV: D3D12 message 538 ("COPY_DEST (promoted from COMMON state) ... invalid for use as a root shader resource"). Arc B580 removes the device over it. #1 sent the compare on its own (buffers decay to COMMON between calls), and #3 kept the timeline's end marks after it. The foxhound base (4db42779) did not carry that over. This cuts before the compare in all three send paths: the sender of a split submission, a late submission sent inline, and the waited one (after its last group). Co-Authored-By: Claude Opus 5.5 <[email protected]>@andrewpozdnakov7-jpg on GitHub · 2026-12-01 12:55 UTC · original
I compiled the exact
compare_cutsselector and its test from6ee3106don Windows. I also checked the sender's list layout with two title groups and both diagnostic marker pairs. The compare started in a separate batch, both trailing markers stayed after it, and all three batches were non-empty. Both focused tests passed.This verifies the list boundaries. Confirming that message 538 disappears and that the Arc run completes still needs a D3D12 diagnostics run.
@cloph-dsp on GitHub · 2026-12-01 12:56 UTC · original
Verification of this PR (AI-assisted: Hy4 flash), source only, no game data.
Windows / rustc 1.100.0 / MSVC. Worktree at head
6ee3106d, dedicated per-worktree CARGO_TARGET_DIR (D:\Victory-Contrib\NVIDIA-Contrib\target-4883), never shared.Negative control on base
5fabb46e:git grep -F the_compare_is_sent_in_a_call_of_its_own 5fabb46e -- .-> exit 1 (test is new)Whitespace:
git diff --check 5fabb46e..6ee3106d-> exit 0, clean.->
running 1 test/test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1161 filtered out.The test lives inside
#[cfg(test)] mod testsat crates/victory-gpu/src/host.rs:1898, so thehost::tests::prefix is required (a bare name matches 0 tests and looks like a failure).GPU/driver: N/A (the test exercises
compare_cuts' planned call splitting only; no device is opened).Verdict: PASS for the new synthetic test on this host.
@Dukestar69 on GitHub · 2026-12-01 16:23 UTC · original · approved these changes
Reviewed crates/victory-gpu/src/host.rs: restoring compare_cuts so the card-memory compare command list is submitted in its own ExecuteCommandLists call (and adjusting check_at when front/ahead lists are prepended) ensures buffers promoted to COPY_DEST decay back to COMMON before the compare binds them as a root SRV (preventing D3D12 message 538). Verified on Windows (RTX 5090): cargo test -p victory-gpu --lib host::tests::the_compare_is_sent_in_a_call_of_its_own -- --test-threads=1 (1 passed, 0 failed).
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@trustno1-coder on GitHub · 2026-12-01 18:29 UTC · original
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed