Shader tests: serialize remaining Host::new tests with ONE_AT_A_TIME (#1882) #2962
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2964"
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?
Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T01:44:22Z.
Summary
Serialize the remaining
Host::newcall sites invictory-shadertests (diff_tests.rs,rect.rs, andmod.rs::stub_pipeline_is_created) withONE_AT_A_TIME, extending the rationale in #1882 / #1892 (credit to @fiestorra).Related to #1882.
Testing
cargo test -p victory-shader emit::rect::tests: 1/1 passed.cargo test -p victory-shader stub_pipeline_is_created: 1/1 passed.cargo clippy -p victory-shader --all-targets -- -D warnings: 0 warnings.cargo xtask policy: 192 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T02:05:01Z.
Review: COMMENTED
Reviewed and verified against
main(63bcca43) on Windows 11 (RTX 5090 + WARP,VICTORY_D3D12_DEBUG=1). All updated lock sites acquireONE_AT_A_TIMEbeforeHost::newwith.unwrap_or_else(|e| e.into_inner())(no deadlock or poison cascade even when pre-existing tests panic).Two remaining
Host::new(true)sites invictory-shaderwere not covered yet (optional follow-up or include here):crates/victory-shader/src/emit/synthetic_tests.rs:1006(pops_wait_loop_exits_immediately_for_inactive_lanes) callsHost::new(true)without holdingONE_AT_A_TIME.crates/victory-shader/src/emit/host.rs:2035, 2039, 2051(parallel_warp_pipelines_and_draws) intentionally spawns 8 concurrent WARP threads internally, so holdingONE_AT_A_TIMEonce at test entry would keep it from overlapping other serialized WARP tests.Local verification:
emit::diff_tests::,emit::rect::,emit::tests::stub_pipeline_is_created,VICTORY_D3D12_DEBUG=1): 8/8 passedvictory-shader --librun: 297 passed (zero deadlocks, zero WARP concurrent crashes, zero lock-poison cascades; the 3 failures are pre-existing RTX 5090 baseline tests)cargo clippy --all-targets -- -D warnings+cargo xtask policy(192 files ok): 0 warningsImported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-26T02:22:57Z.
Review: COMMENTED
Verified: the remaining Host::new tests now take ONE_AT_A_TIME, consistent with the serialized-hardware convention already in valu_tests — removes the parallel-GPU-use flake without changing coverage.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-26T05:47:40Z.
Automated triage for the maintainers.
Merge candidate. This takes the existing
valu_tests::ONE_AT_A_TIMElock in the remaining GPU tests that create aHostwithout it: the five device tests inemit/diff_tests.rs, the rect test inemit/rect.rs, andstub_pipeline_is_createdinemit/mod.rs. Every other GPU test module already takes this lock, and its doc comment says why (hangs, and WARP access violations, when two GPU tests run at once). I checked that the modules have the samecfg(all(test, windows))gating asvalu_tests, and that none of the locked tests calls a helper that takes the lock again (run_casesdoes, but these tests don't use it), so the non-reentrantMutexcan't deadlock.CI: not run on this head (no check runs reported).
Recommending a look, not approving.
Generated by Claude Code
View 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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.