GPU: VICTORY_SKIP_WAVE64 diagnostics switch for wave64 programs #579
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!579
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-579"
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?
@wbkepler on GitHub · 2026-11-24 05:12 UTC · original
wbkepler:gpu/skip-wave64-diagnostic→main· +67 −2 · 2 files · 1 commits · openWhat
A diagnostics-only switch,
VICTORY_SKIP_WAVE64=<stage>,...(mesh,compute,vertex,pixel). It omits draws and dispatches whose pipeline has a program of a listed stage written for 64-lane console waves. It counts and logs them likeVICTORY_SKIP_PIPELINES, with the shader named. Unknown stage names are warned about and ignored. There is a new row under Debugging in the README.Why
On NVIDIA (32-lane waves) the world hangs the GPU at dispatches of wave64 mesh and compute programs. There are hundreds of such programs, which is too many to list as hashes in
VICTORY_SKIP_PIPELINES. WithVICTORY_SKIP_WAVE64=mesh,compute, an RTX 5090 stayed in the world for almost 7 minutes without a device removal, where it otherwise failed within 25 to 95 s. Testers can use the switch to check whether a hang is in this class, or narrow it to one stage, on any build.The program's wave size is read from its native program once per container and cached.
Tests
skip_stages_names_known_stages_only(parsing).cargo clippy --workspace --all-targets,cargo clippy -p victory --features diagnostics --all-targets,cargo test --workspace,cargo xtask policy: pass. The remaining clippy warnings are already onmain.Overlaps with #578 (both add a cached
Shader::wave64()). Whichever lands second needs a trivial rebase.🤖 Generated with Claude Code
@MD5Visual on GitHub · 2026-11-24 10:02 UTC · original
3090 / 24 GB confirmation on current main
8e79c80+ this PR's diff only (my one extra change is a local adapter picker, becauseD3D12CreateDevice(None)takes the display adapter, a 2070 SUPER on this box). Diag build,VICTORY_D3D12_DRED=1, no debug layer.Same title and box as my #468 post: 1.0.2.1, blake3
b99f876b74d4a77f03af5f878223b27bd647b5c35a79d5decd9f716504239e93, Win11 26200, Ryzen 7 5800X3D, 64 GB, RTX 3090, driver 32.0.16.1088 (610.88).With
VICTORY_SKIP_WAVE64=mesh,compute, ten minutes in the world:slow host submissionat all. Without the switch the same run is removed at 188 s with0x887A0006, right after an 11,225 ms single-list submission.host pipeline refused, against 117 compute refusals (all0x80070057) without it. 218 distinct shaders skipped, 3,033 skip lines.So on a 32-lane Ampere card this does what it says: the hang goes away, and what goes away with it is most of the world's draws.
Two follow-ups if useful, each about an hour on this box:
meshonly andcomputeonly, to see which of the two carries the hang; and the same build plus #89's formats 86/115, which still logno host texturehere.@R0D4X on GitHub · 2026-11-24 10:13 UTC · original
Follow-up A/B test on RTX 5080 (Wave32, Windows 11) with PRs #334 + #579 + #669
(Follow-up to my initial
main+ #334/#578/#669 crash report in #71 (comment))Setup:
main(8e79c80) + #334 + #579 + #669, diagnostics build (--profile diag --features diagnostics), title build1.0.2.1(b99f876b74d4a77f), automated menu entry (VICTORY_KEYS=18:Enter,24:Enter,30:Enter,36:Enter,42:Enter).VICTORY_D3D12_DRED=1,VICTORY_SKIP_WAVE64=mesh,computeeeed82b877b44b5fwas bound at frame 1644 and cleanly skipped; the world ran for another ~88 s afterward with zerocrashes.logentries.VICTORY_D3D12_DRED=1,VICTORY_SHADER_LOOP_LIMIT=4096(noVICTORY_SKIP_WAVE64)DXGI_ERROR_DEVICE_HUNG (0x887A0006)at 91.7 s (shortly after entering the world), no page fault. DRED (matched via #669) stops at list 7 of 28,command 125 of 149 (op 5), isolated between barriers124..126:indirect kind 10 max 1 at 0x42ced4b4 [mesh f9c79a2d484bd75a, pixel a144abbc586fa5b2].Takeaway:
VICTORY_SHADER_LOOP_LIMIT=4096alone does not prevent the TDR hang, whereasVICTORY_SKIP_WAVE64=mesh,compute(#579) eliminates both the wave64 mesh (f9c79a2d484bd75a) and wave64 compute (eeed82b877b44b5f) hangs completely.Some(0)..Some(27)) and #334 eliminates theIASetVertexBuffers(UNORDERED_ACCESS) debug-layer error.@Marvisak on GitHub · 2026-11-25 00:27 UTC · original
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(ac2525d). Conflicting files:README.md,crates/victory-gpu/src/pipeline.rs.The content has not been reviewed yet; it will be once the branch is rebased onto
main.Generated by Claude Code
@imrealynailong on GitHub · 2026-11-25 08:59 UTC · original
Rebased onto
main940d32f— patch below, plus a run on an RTX 4060 LaptopThe triage marker on this PR is
needs-rebase(README.md,crates/victory-gpu/src/pipeline.rsagainstac2525d/currentmain). I resolved both against940d32fand the result builds and tests clean; the patch is at the end.What the two conflicts were, and how I resolved them
crates/victory-gpu/src/pipeline.rs— the branch builtShader { … }inline inshader();mainnow routes throughShader::new(stage, bytes). I keptmain's call and put the newwave64: OnceLock::new()insideShader::newinstead, so the struct has one constructor again:README.md— both sides added rows to the Debugging table, so I kept both sets:VICTORY_GPU_TIMINGandVICTORY_TRACE_SHADERSfrommain, andVICTORY_SKIP_WAVE64from this branch.Net diff against
940d32f: 2 files, +68/−4.Checks
cargo build --profile diag -p victory --features diagnosticscargo build --release -p victorycargo test --release -p victory-gpu --features diagnostics --libmain940d32faloneThe three failures are the same on both trees —
descriptor::host::tests::dynamic_slots_are_held_until_released,draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_view,memory::tests::lists_share_a_table_and_copies_keep_their_views— so they are pre-existing here and not caused by the rebase. The rebase adds one passing test.A run with the switch on, RTX 4060 Laptop (Ada), driver
32.0.15.6607Not a clean measurement of this PR on its own: I had
#2121(view-heap paging) and#1763(typed-UAV refusal) merged underneath, because without them the run dies at the boot-time UAV removal before the world is reached. Diagnostics build, title 1.0.2.1.With
#2121+#1763and no switch, the run ends at0xC0000005in title code (+0x23cf683, write 0x0) at frame 1,924. That is the signature in #1118.frame=0xC0000005at+0x23cf683(title code)VICTORY_SKIP_WAVE64=meshdevice removed, no exception in the logVICTORY_SKIP_WAVE64=mesh,compute0x887A0007after a submission, GPU not respondingSo on this card
meshalone gets past the+0x23cf683stop, andmesh,computegets further again before a different GPU-level failure. That is consistent with @Jitheswar's RTX 3050 Laptop result in #1118 (mesh skip: 0 of 5 runs reached that stop) and with @MD5Visual's and @R0D4X's runs here — three different NVIDIA generations now agree that the stop moves when these stages are skipped.Caveat on the
mesh-only row: the run ended while binding six compute pipelines at frame 2,254 and logged nodevice removed/ no exception, so I cannot say from that log alone whether it hung or was cut off. I have not repeated it.Not claimed
No frame capture was taken in these runs, so I cannot say whether the picture was the world or a flat colour.
pages in usereported2049 of 3906(inside the 2,880 pages available to title slots, no exhaustion line) in the runs where #2121 was in play — that number looks deterministic across cards, so it adds little.Patch
git format-patch 940d32f..HEADI am not the author of this branch and cannot push to it; the patch is offered so it can be applied as-is. If you would rather have it as a fork branch I can put one up.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.