Shader tests: use the Agility SDK runtime on Windows 10 (stacked on #175) #362
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!362
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/362/head"
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?
@GamingRipperDoc on GitHub · 2026-11-24 02:36 UTC · original
GamingRipperDoc:shader/tests-agility-runtime→main· +452 −3 · 12 files · 3 commits · closed without mergingStacked on #175 (its commit
19aec59is the first one here); review that first. Follows up its note that the 7emit::valu_testsstill fail on Windows 10.Why they fail
D3D12 picks the Agility SDK runtime from exports on the process's executable. #175 adds them to
victory.exe, but thevictory-shadertests run in their own test executable, which has none. So on Windows 10 every host device stops at shader model 6.5, and:emit::valu_testsfail (neither hardware nor WARP SM 6.6 device available);emit::stub_pipeline_is_createdand thediff_teststhat need a device printno SM 6.6 device; skippedand pass without running.What
crates/victory-shader/src/agility.rs(test builds only): the same two statics asapps/victory/src/agility.rs, withD3D12SDKPath = "..\D3D12\". Test executables are in<profile>\deps\; the runtimecargo xtask agilitywrites is in<profile>\D3D12\, so nothing is copied.crates/victory-shader/build.rs: exports them (/EXPORT:…,DATA, MSVC only) only when<profile>\D3D12\D3D12Core.dllexists. D3D12 does not fall back to the in-box runtime when an executable names a newer one that is missing (D3D12_ERROR_INVALID_REDIST, as Proudnoob4 found on #175), so exporting unconditionally would break these tests on every machine that has not run the xtask, Windows 11 included. Without the runtime nothing is exported and the tests behave as onmain.rustc-link-arg-testsis refused for a package without atests/target, so it usesrustc-link-arg; the only executables this library links are its test executables.cargo xtask agilityupdatesbuild.rs's modification time after installing the runtime, so the nextcargo testpicks it up without acargo clean.D3D12SDKVersionin step with the package now checks both copies.Tested
Windows 10 22H2 (19045.7846), AMD RX 9070 XT, Rust 1.98.1:
victory-shadertestsno SM 6.6 device; skippedD3D12SDKPath,D3D12SDKVersiontarget\debug\D3D12removedmain)cargo xtask agility,cargo testrecompilesvictory-shaderonce and passes 69/69.cargo test -p victory-shader --no-runcompiles nothing.cargo test --workspace --no-fail-fast: the only failure left isnet::only_loopback_is_reachable(#118, fixed by #152).cargo clippy -p victory-shader -p xtask --all-targets --all-features: clean.rustfmt --checkon the changed files: clean.cargo xtask policy --staged: 6 files ok.cargo test -p xtask: 6 passed.Not tested on Windows 11. There nothing changes unless someone runs
cargo xtask agility; then the tests use runtime 620 instead of the in-box one.No game data used.
AI-assisted (Claude Code); I ran everything above on my machine.
🤖 Generated with Claude Code
@jeremygold02 on GitHub · 2026-11-24 04:28 UTC · original
Tested PR #362 at head
f3c73334561b04cbbc2b00419f0a7d1ba777a9f9(state at test time: OPEN). Pre-comment refresh: state OPEN, head unchanged atf3c73334561b04cbbc2b00419f0a7d1ba777a9f9.cargo test --locked -p xtask agility::tests— passed (ok. 2 passed; 0 failed; 0 ignored; 0 measured; 4 filtered out; finished in 0.00s ); cases: agility::tests::version_matches_the_sdk_version_victory_exports, agility::tests::extracts_stored_and_deflated_files.Behavior covered: Checks stored and deflated synthetic ZIP extraction and that the runtime SDK version matches both exported constants; no SDK download is run.
Code: xtask/src/agility.rs
@steppergg on GitHub · 2026-11-24 09:14 UTC · original
Tested
f3c7333merged onto main8e79c80together with #89 and #420 on Windows 10 22H2 (19045.6036), RTX 4060 Ti, driver 621.24, Rust 1.98.1. No game data used.cargo test -p victory-shader --lib8e79c80no SM 6.6 device)cargo xtask agilityThe one conflict with main is in
apps/victory/src/main.rs(show_config): keep both thedata_dirline and this PR'sd3d12 sdkblock.With this in place I also added GPU tests for
v_xnor_b32andv_swap_b32(#58), which had none: https://github.com/steppergg/VIctory/commits/valu-swap-xnor-tests (one commit on main, test-only; PRs are collaborator-only, so here as a branch). With this PR they pass on the RTX 4060 Ti (91 passed, 0 failed), and breaking swap on purpose makes its test fail.AI-assisted (Claude Code); run on my machine.
@niilun on GitHub · 2026-11-24 13:00 UTC · original
Tested commit
1e33e88on Windows 10 19045, NVIDIA GeForce RTX 3060 Ti, driver 610.88, Rust 1.98.1, debug profile, --test-threads=1 (no game data run)Ran following command
cargo test -p victory-shader --lib -- --test-threads=1:main- 105 passed, 15 ignored, 1 missthis PR, without SDK- 105 passed, 15 ignored, 1 miss (15 are 13valu_testsand 2waterfall_tests)Also there's a local patch that refuses validators older than 1.6. Without it, the test process dies with
0xc0000005onmainand on this PR with the SDK. Thedxil.dllused is from the 10.0.19041 SDK@Lemontea0075 on GitHub · 2026-11-24 18:08 UTC · original
Tested PR #362 on Windows 10 IoT Enterprise LTSC (build 19044).
Hardware:
After the Agility SDK runtime was present:
Command:
Results:
Before the runtime was available, 15 shader tests failed with:
neither hardware nor WARP SM 6.6 device availableAfter testing with the runtime, all 15 failures disappeared.
No GTA VI game data was used.
@Marvisak on GitHub · 2026-11-25 00:02 UTC · original
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #486. Stacked on #175 and contains it (the curl downloader,
sha2); its own part, the opt-in for test binaries, is what #486 does without them.If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed