Shader tests: one command queue per test host (78 s to 16 s on a GPU) #11
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11"
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 Zettrox/ztrx. Originally posted by God489 on 2026-11-25T02:41:04Z.
Host::dispatchandHost::draw(test builds only) created a new D3D12 command queue on every call. On a hardware adapter that is most of the cost of a GPU test case. On an RTX 3050 a one-instruction dispatch took about 28 ms; on WARP it takes 0.4 ms.The queue is now made once per
Host, on first use (a test-onlyOnceCellfield). Nothing changes outsidecfg(test). The allocator, list, resources and fence are still made per call, and each call still waits for its own fence, so the cases stay independent.Measured on Windows 11 with an RTX 3050:
cargo test -p victory-shader --lib(210 tests)Hosted CI runners have no hardware adapter, so CI time barely changes. Anyone running the tests on a GPU waits a fraction as long.
🤖 Generated with Claude Code
Imported from Zettrox/ztrx. Originally posted by futurepro62 on 2026-11-25T06:38:25Z.
Full-suite run on Windows, since this PR has no test report yet. Tested exact head
38bc631(on its base90b529f).Tested
rust-toolchain.toml), DXC + dxil.dll 1.9.2602.17, debug.cargo test --workspace --locked: 496 passed, 0 failed, 7 ignored (main90b529fon this machine: 496 passed, 0 failed, 7 ignored).cargo clippy --workspace --all-targets --locked -- -D warnings(the CI lint step): passed.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings(the CI lint step): passed.#[test]functions in the diff.Not tested
AI use
Imported from Zettrox/ztrx. Originally posted by Artking175 on 2026-11-25T13:21:42Z.
Independent A/B on Windows 10 22H2, RTX 2060, driver 531.41.
I compared #121 (
ac7093d) with the same revision plus #11 (38bc631),combining the Host constructor changes in an isolated build. Both
executables used Agility SDK 1.608.2 and DXIL validator 1.8.2505.32.
The adapter probe confirmed hardware SM 6.6 on both. WARP reported SM 6.2.
Three alternating single-threaded runs of the built shader unit-test
binaries, excluding build time, took 73.46 / 73.71 / 73.01 s for
the control and 24.98 / 24.47 / 24.61 s with #11. Median 73.46 → 24.61 s
(2.98×, −66.5%). All six runs had 210 passed, 0 failed, 3 ignored.
Every named test outcome and conditional skip matched. All 22 GPU tests
that had previously failed on this machine passed. No game files were used.
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.