Windows 10 unit tests: a staged D3D12 Agility SDK gives them SM 6.6 #3315
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3315
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3315"
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?
@TheSovietWaffle on GitHub · 2026-11-29 21:40 UTC · original
TheSovietWaffle:test/agility-unit-tests→main· +207 −18 · 15 files · 4 commits · closed without mergingCredit to #530 (flavor1337) for the
.drectveexport idea and the Windows 10 diagnosis; this is that change rebased onto currentmain, with the two both-device tests made explicit about an older WARP.What it changes
Windows 10's in-box D3D12 stops at shader model 6.5 (WARP 6.2), so tests that build host devices find no SM 6.6 one:
cargo test -p victory-shader --libfailed 51 tests atno SM 6.6 device available. D3D12 uses the runtime an executable names throughD3D12SDKVersion/D3D12SDKPath, whichvictory.exealready exports (apps/victory/build.rs). This gives the two crates' unit-test executables the same exports, and only when the runtime is there:crates/victory-shader/build.rs,crates/victory-gpu/build.rs: setcfg(agility_runtime)when<target>/<profile>/D3D12/D3D12Core.dllexists (msvc targets only).crates/victory-shader/src/agility.rs,crates/victory-gpu/src/agility.rs(new): theD3D12SDKVersion(614) andD3D12SDKPathstatics, plus a.drectvelinker directive exporting them. Both are included as#[cfg(all(test, agility_runtime))] mod agility;, so only the unit-test executable carries the export; the integration tests link the library without it.powershell -File scripts\get-d3d12.ps1 -To target\debug\D3D12(Agility 1.614.1, package SHA-256 and Microsoft signature checked). Without that folder the cfg is off, no export is linked, and the in-box runtime is used exactly as before.intersect_tests.rs(ran == 2became "at least one device, with a line when WARP is missing") and the WARP half ofbitcode/opt.rs's LDS barrier test. CI's WARP is 6.6, so both still run there unchanged.require_direct_heaps(host.rs) ended the process with exit 3 and the plain reason a title needs. In a test binary that killed the whole run before any device test could skip, so the GPU half is now covered too: it returns the text,create()logs it and fails,host()isNone. A title's run is unchanged.- A machine with no SM 6.6 device: every test that needs one now skips with a line instead of failing —valu_tests' runner, the twowaterfall_testssamples,wave64_tests' helper and the NV05D1 readback, and fourintersect_testschecks. The skip fires only when the device-creation error says the runtime stops below SM 6.6 (the device supports SM 0x65 only, WARP0x62); a device that fails for any other reason still fails the test. The skips are no new false green:VICTORY_REQUIRE_HW_GPU=1, the switchbitcode::optandwave64_testsalready use, turns every one of them back into a failure (checked: it panics withVICTORY_REQUIRE_HW_GPU=1 but no SM 6.6 hardware device: the device supports SM 0x65 only), which is the loud answer #1360 asks for; CI's devices are SM 6.6, so a green CI still means the device tests ran. A bare Windows 10 checkout is green with nothing staged, and staging the runtime turns the same tests back on.How it was tested
Windows 10 Pro 19045, RTX 3080, Rust 1.98.1, Agility 1.614.1 staged in
target\debug\D3D12\:cargo test -p victory-shader --lib: before 411 passed, 51 failed, 9 ignored; after 462 passed, 0 failed, 9 ignored, both with the Agility runtime staged and withtarget\debug\D3D12\moved away (the device tests then skip with a line; without this change 50 of them failed).cargo test -p victory-gpu --lib: 920 passed, 2 failed, 60 ignored with the runtime staged, and 914 passed, 1 failed withtarget\\debug\\D3D12\\moved away. The one failure in both isshader_cache::tests::every_switch_of_the_translator_is_in_the_key, which fails alone on unmodifiedmaintoo (a translator switch the cache key does not list); the second, with the runtime, is a known parallel-run flake (host::uav_pool, #2420 item 2; it passes alone). PR #3061 covers both.cargo test --workspace --locked --no-fail-fastwith nothing staged: every target is green except three that are already open work — the BCPack oracle (#2236/#3061), the shader key's stale switch name (#3210/#3061) and the asset-policy test (#2968). Before this branch the same run also lost the wholevictory-gputarget to the exit-3 guard.- Composed with #3086 (the diagnostics-build fix) on a scratch branch,cargo check -p victory-gpu -p victory-shader --tests --profile diag --features diagnosticsfinishes, so the documented development profile keeps building with the runtime staged intarget\diag\D3D12\.-cargo build --release --locked -p victory:Finished, with the same 18victory-gpuwarnings asmain; the change is test-only.target\debug\D3D12\moved aside,cargo check -p victory-shader -p victory-gpu --testsfinishes, so the cfg-off path still compiles.Checked for overlap
agility,D3D12SDKVersionand these build scripts. Related: #530 is the same idea (opened Nov 28, nowmergeable=False, so this is the version that applies tomain); #2792 and #3086 are the CI and diagnostics build repairs; #2500 is the F1-menu test isolation; nothing else touches these files.ecbe36897ato859e2e38a1Pull request closed