Shader tests: WARP runs one draw or dispatch at a time (parallel runs crashed in d3d10warp.dll) #140
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!140
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-140"
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?
@ySKELLETONX on GitHub · 2026-11-25 16:21 UTC · original
ySKELLETONX:fix/warp-serial-dispatch→main· +31 −0 · 1 files · 1 commits · openWhy
cargo test -p victory-shader --libsometimes ends the whole test process here instead of failing a test:On
main(01aadd1) it happened in 6 of 8 parallel runs and 3 of 16 in another series. It never happened in serial runs. When it happens, every test after it goes unreported, and a test run of a PR looks like a failure of that PR. While testing the open shader PRs on this card, 9 of 21 looked broken because of this, including PRs that only change hashing or remove dead code.Cause
I installed a temporary vectored exception handler that prints the faulting module and a backtrace (local only, not in this PR). Every crash was inside WARP, during
Host::dispatch, in whichever tests were running at the time:with
victory_shader::emit::host::Host::dispatchin each test thread's stack.Each test makes its own
Host, but D3D12 gives back the same device for an adapter, so parallel tests drive WARP's one device from several threads at once. No test module crashes on its own (0 of 6 runs each, for every module with hardware tests). It takes several modules dispatching on WARP together.What
Host::drawandHost::dispatchtake a process-wide turn (WARP_TURN) when the device is on a software adapter. That is checked from the device's adapter LUID, so theHost { device }built inlane_read_loop_testsis covered too. Hardware adapters still run in parallel. Test code only (#[cfg(test)]).Testing
RX 7600 XT, Windows 11 Pro build 26300, WARP
10.0.26100.9818, Rust 1.98.1, thevictory_shadertest binary run directly:mainmain, everydispatchserialised (experiment)Run time is unchanged: 38.8 to 41.1 s per run, against about 39 s before.
I have only seen this on Windows build 26300, and other reports here (#2, #8, #74) don't mention it. It may depend on the WARP build, but taking turns on WARP is harmless where WARP is fine.
@adrianmjim on GitHub · 2026-11-25 17:41 UTC · original
Same crash here, RX 7900 XT (Windows 11 build 26300,
d3d10warp.dll10.0.26100.9818). Onmain, thevictory_shadertest binary died with0xc0000005in 4 of 6 whole-library runs, and 9 of 10 runs ofemit::lds_tests emit::scratchalone. A vectored handler caught it atd3d10warp.dll+0xa790con a WARP thread-pool thread, one of the addresses above. With the hardware adapter only (WARP skipped), 0 of 15 runs crashed.With this PR (
34813f3on01aadd1), the test binary run directly with the default thread count passed 20 of 20 runs, 266 passed each time (30-160 s per run; the machine was busy with other jobs).I had a narrower fix for this locally (one lock taken by
valu_tests,lds_testsandscratch_tests). This one is better, since it covers every test that reaches WARP throughHost::draw/Host::dispatch, so I'm not opening mine.@MamaLeVrai on GitHub · 2026-11-26 05:22 UTC · original
Another data point, from an RX 6950 XT (RDNA2), Windows 11 build 26300, Rust 1.98.1. I ran the
victory_shaderrelease lib test binary 10 times in a row, with the default threads:main4f62c2amain+ this PR (34813f3)Every run with a result gave 275 passed, 2 failed. The 2 failures are the RDNA2 wave-size tests fixed by #110/#204, so the PR does not change them. Earlier, while other GPU jobs were running on the same machine,
main's binary died in about 1 run of 3 here too. Small samples, but it points the same way as your numbers.AI-assisted (Claude Code); no game data.
34813f393dto1c65380155View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.