Windows 10: the Agility SDK exposes SM 6.6, and with it all seven valu_tests pass on hardware #473
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#473
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@naixue2233 on GitHub · 2026-11-24 03:49 UTC · original
Summary
Windows 10's in-box D3D12 runtime tops out at shader model 6.5, so
Host::newreturnsErrand the sevenemit::valu_testspanic onassert!(ran > 0). Nothing is wrong with the hardware — an RTX 3080 supports the feature set — the OS runtime simply does not expose it. The Agility SDK fixes it without touching a single shader:The seven tests now execute on the GPU and check RDNA2 semantics (
v_med3with NaN,v_fractnear 1.0,v_sin/v_costurn reduction,bfe) against real hardware output.Environment
x86_64-pc-windows-msvcd2a4baeMicrosoft.Direct3D.D3D121.610.5 (D3D12_SDK_VERSION610)Before
Host::new(emit/host.rs:82-96) asksD3D12_FEATURE_SHADER_MODELfor>= 6.6; the in-box runtime on this build answers 6.5 for both the hardware adapter and WARP.The patch
Three files, about thirty lines.
crates/victory-shader/src/lib.rsgets one line, and the module is#[cfg(test)]because the front end needs its own copy — two definitions in one binary wouldcollide at link time.
Then
D3D12Core.dllships next to the executable underD3D12\./EXPORT:is used rather than a.deffile because.defis not on the asset-policy allowlist;cargo xtask policyreports155 files okwith this change.After
Four things that cost time
D3D12SDKPathmust be a pointer. Exported as a byte array ([u8; 9]), the loader reads thefirst eight bytes as an address and the process dies in
DllMainwith0xC0000142(STATUS_DLL_INIT_FAILED), before
mainruns.D3D12SDKVersionmust match the DLL exactly. With 610 in the code and 620 on disk, theloader silently falls back to the in-box runtime — no warning, and the seven tests fail again.
D3D12CreateDevicereturns0x887e0003instead of falling back.no SM 6.6 warp device; skipped), so thesoftware-adapter half of these tests is still skipped. Only hardware coverage improves.
Unrelated, same machine:
victory-hlenet::tests::only_loopback_is_reachablepanics withwinhttp.dll lacks WinHttpGetProxySettingsEx.dumpbin /exports C:\Windows\System32\winhttp.dllon 19045 (fileversion 10.0.19041.3636) lists
WinHttpGetProxyForUrlEx,WinHttpReadProxySettingsandWinHttpGetProxySettingsVersionbut notWinHttpGetProxySettingsEx, so the "every override namesa real export" assertion cannot hold on Windows 10. It means
cargo test --workspacecan never begreen there, even with everything else passing.
Questions
D3D12Core.dlllive — checked in underapps/victory/D3D12/, fetched by a build script, or left to the packaging step? Distributionterms are in the SDK's
distributable files.txt.which on Windows 10 needs the Agility SDK"; if not, saying "Windows 11" outright would save
people the dead end.
currently sees a red suite even though every test that can run passes.
Happy to verify any variant on this machine.
@DaviTostes on GitHub · 2026-11-24 03:51 UTC · original
Corroborating from the other side of the same gap: under Wine 11.22 (Wine's D3D12, no Agility SDK) on
maind2a4bae,victory-shadergives exactly 62 passed / 7 failed, and all seven panic withneither hardware nor WARP SM 6.6 device available. Same seven names as here. Heads #433 (1106f43) and #458 (360f382) reproduce it unchanged.Two connections:
main(E0428:mod teststwice incrates/victory-gpu/src/host.rs, line 252 from main and 1974 from the branch), so it needs a rebase before it can serve as the fix.No game data used.
@naixue2233 on GitHub · 2026-11-24 03:58 UTC · original
Thanks — the Wine datapoint is the useful part here: it shows this is the runtime's shader-model cap rather than anything Windows-specific, and the same seven names reproducing on three different heads (
d2a4bae,1106f43,360f382) makes it a clean reproduction.Followed your pointer to #463. It is the right mechanism, and I had arrived at the same one before seeing it; I have opened #486 for the half it does not cover:
#463 exports the symbols from
apps/victoryonly, sovictory.exegets 6.6 butcargo test -p victory-shaderstill runs against the in-box runtime and those sevenvalu_testskeep failing. #486 adds the opt-in to the shader crate's test targets: it looks for the runtime where #463 puts it (target/<profile>/D3D12/D3D12Core.dll), mirrors it intodeps/because the loader resolvesD3D12SDKPathnext to the running module, and does nothing at all when the file is absent. Disjoint files, so the two can land in either order.With both halves on Windows 10 19045 + RTX 3080:
victory-shader62/7 → 69/0, and the seven now execute on the GPU rather than being skipped.Two things that may be worth folding into #463's "runtime missing" path, both learned the hard way:
D3D12SDKPathmust be exported as aconst char*. As a byte array, the loader dereferences the first eight bytes and the process dies inDllMainwith0xC0000142, beforemainruns.D3D12SDKVersionmust match the shipped DLL exactly. With 610 in the code and 620 on disk, the loader silently falls back to the in-box runtime — no warning, and you are back at 6.5 wondering why nothing changed. #463 uses 614 and #486 uses 610; someone should pin one, ideally derived from the package version rather than typed.One more: WARP stays below 6.6 even with the runtime present (
no SM 6.6 warp device; skipped), so the software-adapter half of these tests is skipped either way. Only hardware coverage moves — which is exactly what 62→69 measures.Noted on #433. I will wait for it rather than fight the intermittent hang locally.
For the record, a datapoint that matches your Wine run: with both binaries opting in, the menus render and respond at 30 fps here too (RTX 3080, same 19045 build). The world path is a separate wall on a 32-wide subgroup device — I will file that on its own rather than mix it into this issue.
@Marvisak on GitHub · 2026-11-25 01:48 UTC · original
Automated triage for the maintainers.
Thanks for the clear before/after. Checked against
main:crates/victory-shader/src/emit/valu_tests.rs,run_cases, still ends withassert!(ran > 0, …), so without an SM 6.6 device these tests fail instead of being skipped.victory.exe, needs a rebase) and #486 (the same opt-in for the shader crate's test binaries). As noted in the thread, they pin differentD3D12SDKVersionvalues (614 and 610), so one value has to be chosen before both land.only_loopback_is_reachableon Windows 10: fixed inmainbyafc4641("net: skip newer-Windows-only exports").crates/victory-hle/src/modules/net.rsnow excludesWinHttpGetProxySettingsExfrom that check.Your three questions (where
D3D12Core.dllshould come from, whether Windows 10 stays a supported target, and whetherrun_casesshould skip when no SM 6.6 device exists) are for the maintainers to decide.Generated by Claude Code