Windows 10: load the D3D12 Agility SDK runtime for shader model 6.6 #175
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!175
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/175/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?
@kykifox1337-source on GitHub · 2026-11-24 01:06 UTC · original
kykifox1337-source:agility-sdk→main· +374 −3 · 9 files · 1 commits · closed without mergingFixes #84.
What
Windows 10's in-box D3D12 stops at shader model 6.5. It refuses every translated pipeline's root signature (
Unsupported bit-flag set (root signature flags c01): the directly indexed CBV/SRV/UAV and sampler heap flags), so nothing draws.apps/victory/src/agility.rs+apps/victory/build.rs:victory.exeexportsD3D12SDKVersion = 620andD3D12SDKPath = ".\D3D12\"(/EXPORT:…,DATA, MSVC only).dumpbin /exportslists both.cargo xtask agility: downloadsMicrosoft.Direct3D.D3D121.620.2 from nuget.org with the systemcurl, checks it against the SHA-512 nuget.org's catalog publishes, and unpacksD3D12Core.dllandd3d12SDKLayers.dll(forVICTORY_D3D12_DEBUG) intotarget\{debug,release,diag}\D3D12\. The package is cached intarget\agility\. The zip is read withminiz_oxide(already a workspace dependency);sha2is the one new dependency, used by xtask only.D3D12\folder, keeps the in-box runtime.victory configreports whether the runtime is beside the executable. The shader model 6.5 error invictory-shadernames the command. README: a Windows 10 note and the command under Getting started.D3D12SDKVersion.Tested
Windows 10 22H2 (19045), i7-8700K, RTX 2070 SUPER, Rust 1.98.1, on
main9aef3d9, release build, real title:+0xb5a5f8(read0x68) after about 9 sThe crash without the runtime looks like a consequence of nothing being drawn; I did not chase it further.
cargo xtask policy,cargo fmt --checkon the changed files,cargo clippy -p victory -p xtask --all-targets: clean (one existing warning inxmem.rs).cargo test -p xtask: passes.Not related to this change, seen on
mainhere:victory-gputests do not compile:mod testsis defined twice incrates/victory-gpu/src/host.rs(lines 252 and 1974).net::only_loopback_is_reachablefails on Windows 10 (WinHttpGetProxySettingsEx); #44 fixes it.emit::valu_testsfail with "neither hardware nor WARP SM 6.6 device available": test executables do not export the Agility SDK symbols. A follow-up could give them the runtime or skip without an SM 6.6 device.AI-assisted: written with Claude Code. I ran everything above on my machine.
🤖 Generated with Claude Code
@DaviTostes on GitHub · 2026-11-24 01:21 UTC · original
The test target does not compile, so the GPU suite cannot run:
The library builds; only
cargo testfails, on every platform. The new test module needs to go into the existingmod testsinhost.rsafter a rebase (the same failure as #134/#135/#175).No game data used.
@kykifox1337-source on GitHub · 2026-11-24 01:24 UTC · original
Thanks for checking. That error does not come from this PR: it touches nothing in
crates/victory-gpu. The secondmod testswas already inhost.rsonmainat9aef3d9, the commit this branch started from (I listed it under "not related" in the description). #129 fixed it onmain.I rebased onto current
main(d2a4bae), now19aec59. On Windows 10 19045:cargo test -p victory-gpu: 43 passed, 1 ignored;cargo test -p xtask: 6 passedcargo xtask policy: 154 files okcargo test --workspaceare the Windows 10 ones from the description:net::only_loopback_is_reachable(fixed by #44) and 7emit::valu_teststhat need an SM 6.6 device in the test executableAI-assisted (Claude Code); I ran the above myself.
@Proudnoob4 on GitHub · 2026-11-24 02:14 UTC · original
Tested
19aec59as is (onmaind2a4bae) on Windows 10 22H2 (19045), RTX 4080 16 GB, NVIDIA 621.01, diag build. This is the #84 machine.cargo xtask agilitymicrosoft.direct3d.d3d12.1.620.2.nupkgfrom nuget.org, SHA-512 check passed, wroteD3D12Core.dll(4,874,024 B) andd3d12SDKLayers.dll(5,832,504 B) totarget\{debug,release,diag}\D3D12\d683ff7f…693032735); the extractedD3D12Core.dllis byte-identical to that copy'svictory configd3d12 sdk : …\target\diag\D3D12\D3D12Core.dll (version 620)translate <40 containers> --validate --pipelinesrun <title> --execute, one Enter at the profile prompt, 75 sOne thing that does not hold here is the doc comment in
apps/victory/src/agility.rs("Without the folder, or on a system whose runtime is newer, the in-box one is used"). Withtarget\diag\D3D12renamed away,victory configcorrectly printsnot beside the executable (needed on Windows 10: cargo xtask agility), buttranslatethen stops at device creation:That is
D3D12_ERROR_INVALID_REDIST(0x887E0003): the runtime does not fall back to the in-box one. nopsled0x saw the same on #84. Microsoft's Agility SDK guide agrees: the in-boxD3D12Core.dllis used only "when an OS has a more recent D3D12Core than what a game shipped with", and INVALID_REDIST "means that D3D12Core.dll was not found in the location specified for D3D12SDKPath" (Getting Started with the Agility SDK).Suggestions:
D3D12CreateDevicefails.victory translate <a few containers> --validate --pipelines. If that fails too, every Windows 11 setup that works onmaintoday would need the xtask step once this merges.D3D12_ERROR_INVALID_REDISTfrom device creation to the hintconfigalready prints (cargo xtask agility), since device creation is where people will hit it.AI-assisted (Claude Code); I ran everything above on my machine.
@GamingRipperDoc on GitHub · 2026-11-24 02:27 UTC · original
Tested
19aec59as is (onmaind2a4bae) on Windows 10 22H2 (19045.7846), AMD RX 9070 XT (driver 32.0.32015.7029), Ryzen 9 9900X, Rust 1.98.1, diag build. First AMD result here; the earlier ones are NVIDIA.cargo xtask agilityD3D12Core.dll4,874,024 B (Authenticode: Valid, file version 1.620.2.0),d3d12SDKLayers.dll5,832,504 B, intarget\{debug,release,diag}\D3D12\dumpbin /exports target\diag\victory.exeD3D12SDKPath,D3D12SDKVersionvictory configd3d12 sdk : …\target\diag\D3D12\D3D12Core.dll (version 620)cargo xtask policy/cargo test -p xtaskcargo test --workspace --no-fail-fastnet::only_loopback_is_reachable(#118) and the 7emit::valu_tests(no SM 6.6 device in the test executable)run <title> --execute, no input (first boot), 75 sControl, same build with
target\diag\D3D12renamed away,run <title> --execute:WARN victory_gpu::host: no host D3D12 device; command lists will not run error=The D3D12 SDK version configuration of the host exe is invalid. (0x887E0003)unhandled exception 0xe06d7363 … (C++ .J = 0x887e0003 thrown)incrashes.log, from its own root-signature serialization.So I see the same no-fallback behaviour Proudnoob4 reported with
translate, and underrunit is only a warning followed by a crash inside the title. That supports their suggestion 3: when device creation returnsD3D12_ERROR_INVALID_REDIST, failing with thecargo xtask agilityhint (asconfigalready prints) would turn that crash into a clear message.No game data in this report.
AI-assisted (Claude Code); everything above was run on my machine.
@blazerTweaks on GitHub · 2026-11-24 03:48 UTC · original
Tested on Windows 10 19045 with an RTX 3060 Ti (driver 32.0.16.1714). With the Agility runtime the title gets through the menus and loading and reaches the world.
On the two review points above (no fallback, and the hint for
INVALID_REDIST): I opened #467 before I found this PR, and I'm closing it as a duplicate. Two parts of it address those points and could be folded in here (commit):victoryfeature,agility = []. The statics are#[cfg(feature = "agility")], andbuild.rsemits the/EXPORTargs only whenCARGO_FEATURE_AGILITYis set. A default build is then byte-for-byte today's behaviour, so Windows 11 setups that work onmaincan't regress, whatever their in-box D3D12Core version. Windows 10 builds with--features agility, then runscargo xtask agility.crates/victory-gpu/src/host.rs):D3D12_ERROR_INVALID_REDISTgetsvictory.exe asks for the D3D12 Agility SDK (feature agility) but D3D12\D3D12Core.dll is not next to it: run cargo xtask agility.the host D3D12 runtime lacks shader model 6.6, so nothing will draw; on Windows 10 build victory with --features agility .... Today that case only shows up as ac01refusal per pipeline and the+0xb5a5f8crash.Each case, run on the title:
ERROR ... lacks shader model 6.6 ...(model0x65), no exports in the exeagility, noD3D12\ERROR ... D3D12\D3D12Core.dll is not next to it: run cargo xtask agilityagility+ DLLHappy to rebase these onto this branch as a PR against it if that's easier.
AI-assisted (Claude Code); the runs above were on my machine.
@walterwallaceson on GitHub · 2026-11-24 05:26 UTC · original
Tested
19aec59as is (on maind2a4bae) on Windows 10 22H2 (19045.6466), RTX 3070, NVIDIA 621.14, Ryzen 5 5600X, release build.d2a4bae19aec59root signature flags c01,0x80070057)0xc0000005at title+0xb5a5f8(read0x68) right afterXUserAddAsyncWith #175 the world load runs at 0.4–0.6 fps for about 20 s, then the device is removed (
0x887A0006, no breadcrumbs). That looks like the known world-rendering failure (#71, #304), not this PR. Separately, around 100 compute pipelines are refused withE_INVALIDARGon this 32-lane GPU; that is the wave64 case #233 addresses.So this matches the other Windows 10 NVIDIA reports, on a newer driver (621.14).
No game data in this report.
AI-assisted (Claude Code); everything above was run on my machine.
@Exorion1er on GitHub · 2026-11-24 09:33 UTC · original
#463 does the same thing (Agility SDK exports so Windows 10 gets SM 6.6) in a smaller, conditional way. It exports version 614 only if
D3D12Core.dllis already in the target directory, and it has no downloader. This PR exports 620 and addscargo xtask agility, which fetches and checks the package. Both define the same exports in the same files, so only one can land. Which is better depends on whether a downloader belongs in the repo.Checked by reading both diffs. AI-assisted (Claude Code).
@supidooo on GitHub · 2026-11-24 11:26 UTC · original
Tested
19aec59merged ontomain(ffe310e) on Windows 10 Pro 22H2 (Build 19045) with an NVIDIA GeForce RTX 4060 Ti 16 GB (driver32.0.16.2124/621.24), Intel Core i7-10700K, 32 GB RAM, Rust1.98.1, MSVC14.44.35207/ Windows SDK10.0.26100.0, release build.Setup & build notes
ffe310ehad a small context conflict inapps/victory/src/main.rs(show_config()now printsdata_dironmain); resolved by keeping bothdata_dirand thed3d12 sdkline.cargo xtask agilitydownloadedmicrosoft.direct3d.d3d12.1.620.2.nupkg, passed SHA-512 verification, and wroteD3D12Core.dll(4,874,024 B) andd3d12SDKLayers.dll(5,832,504 B) undertarget\{debug,release,diag}\D3D12\.cargo test -p xtask: 6 passed, 0 failed (includingagility::tests::*).dumpbin /exports target\release\victory.exelistsD3D12SDKPathandD3D12SDKVersion;victory configreportsD3D12Core.dll (version 620).Shader/pipeline census (
victory translate --pipelineson the title's shaders)Zero SM 6.5 /
root signature flags c01rejections; the Agility SDK runtime enabled full SM 6.6 + mesh-shader support on Windows 10:12243 emitted of 14039; 12243 pipelines(100% of emitted accepted)1441 emitted of 2582; 1121 pipelines(320 rejected withE_INVALIDARGdue to Wave64 on 32-lane NVIDIA)8214 emitted of 8713; 8214 pipelines(100% of emitted accepted)Live title run (
--execute, release build, Series X mode)DXGI_ERROR_DEVICE_HUNG(0x887A0006).@niilun on GitHub · 2026-11-24 12:43 UTC · original
Tested commit
19aec59on Windows 10 19045, NVIDIA GeForce RTX 3060 Ti, driver 610.88, Rust 1.98.1, debug profile,--test-threads=1(no game data run)Also downloaded agility SDK 1.620.2, which passed the checksum and wrote the runtime for all three profiles.
victory configthen printsd3d12 sdk : ...\debug\D3D12\D3D12Core.dll (version 620)that works fineTesting with the above SDK:
victory-gpu50 passed, 1 ignored,victory-hle94 passed,cargo xtask policy: 157 files OKvictory-shader: 105 passed, 15 failed, the same as onmaincrash::tests::unwinds_like_the_system_walkalso fails 6/10 isolated times onmainThe
victory-shadercounts formainand this PR include a local patch that refuses validators older than 1.6. Without it, the test process dies with0xc0000005on bothmainand this PR. The onlydxil.dllhere is from the 10.0.19041 SDK@molodayamama on GitHub · 2026-11-24 14:02 UTC · original
Independent Windows check of
19aec59ba2931333e4218fe16ab7851b110122bd(Windows 10 22H2 19045, Rust 1.98.1, MSVC x64).I built the PR's CLI, verified both
D3D12SDKVersionandD3D12SDKPathindumpbin /exports, and usedcargo xtask agilityto stage the hash-checked 1.620.2 runtime.victory configreported the app-local DLL and version 620.I also ran a small, separate native D3D12 probe with exactly those exports and the same synthetic
cs_6_6bytecode on both runs. Both explicitly picked RTX 4060 (NVIDIA 610.88). With Windows' in-boxD3D12Core.dll,CheckFeatureSupportreturned SM 6.5 and serializing the directly-indexed descriptor-heap root signature returned0x80070057. With app-local Agility 1.620.2, the probe loaded the Microsoft-signed local DLL, reported SM 6.6, serialized and created the root signature, and created the compute PSO (S_OK). This isolates the runtime difference without starting the title.Only source-built synthetic fixtures were used. AI-assisted verification.
@EduBertozzi on GitHub · 2026-11-24 14:21 UTC · original
A data point from a GPU generation not tested here yet: Pascal, GTX 1060 6 GB (driver 32.0.15.8266), Windows 10 22H2 19045, i7-10700K. No game data.
19aec59merged onto currentmainwith a single conflict inshow_config.mainhas since added adata_dirline at the same spot as this PR'sd3d12 sdkline. Keeping both lines resolves it:With the 1.620.2
D3D12Core.dllbesidevictory.exe:victory configprintsd3d12 sdk : …\D3D12\D3D12Core.dll (version 620).Host::new) gets shader model 6.6. Without the exports it stops at 6.5.WaveLaneCountMax32).So on Pascal and Windows 10 this PR does what it says. The world's mesh draws then need a fallback (#3), as on any GPU without mesh shaders.
AI-assisted (Claude Code).
@nopsled0x on GitHub · 2026-11-24 15:36 UTC · original
I tried this on Windows 10 22H2 (build 19045), release build, GPU driver 621.40, with
D3D12Core.dll1.620.2 inD3D12\beside the executable. The PR's one commit (19aec59) is cherry-picked on top of current main (ffe310e), because the PR branch is based ond2a4bae. The cherry-pick had one conflict, inapps/victory/src/main.rs, between the newdata_dirline and this PR'sd3d12 sdkblock; I kept both. Running the title withrun ... --execute, once:ffe310estops with0xc0000005(read at0x68) atvictory-image-b99f876b74d4a77f.dll+0xb5a5f8, about 3 to 4 s after start, in the three runs I did (two driver versions: 610.88 once and 621.40 twice; only the last log was kept). The log showsroot signature: Unsupported bit-flag set (root signature flags c01)andhost root signature refusedfirst.+0xb5a5f8does not happen. The title ran for about 2 min 20 s, and the lastframe presentedline in the log isframe=1024 draws=8610 drawn=8610 dispatches=512 dispatched=512.host pipeline refusedwarnings remain: 118 with0x80070057, and the last one with0x887A0005right before the device removal.host GPU device removed after a submission of 1 lists; no breadcrumbs, with submit error0x887A0004and removed reason0x887A0006(the log says it was likely caused by an invalid command). I did not run a diagnostics build, so I do not know which command it was, or whether the refused pipelines are related to it.So on this setup, with the Agility runtime loaded, the root signatures are no longer refused and the title gets much further, but it does not stay up.
Not verified: more than one run,
cargo xtask agilityitself (the runtime was already in place),cargo test,cargo clippy,cargo xtask policy, Windows 11, and a second GPU.AI-assisted verification (Claude); the game was run locally by me.
@KIFIR4KK on GitHub · 2026-11-24 17:18 UTC · original
Tested
19aec59on Windows 10 IoT Enterprise LTSC 21H2 (Build 19044) + Desktop NVIDIA GeForce RTX 4060 (8 GB, driver616.56), cherry-picked ontoffe310e(with PR #189 and PR #352; same minor 1-hunk conflict inapps/victory/src/main.rskeeping bothdata_dirandd3d12 sdk).cargo xtask agilityfetchedMicrosoft.Direct3D.D3D12 1.620.2cleanly andvictory configdetectedD3D12Core.dll (version 620).c01root-signature refusals and early init crash (#348). Boot, settings, saves, and menus run at 30.0 fps (0dropped draws), and the title reaches world load.Full details and sanitized DRED log in #1305.
@simplesmenterafael on GitHub · 2026-11-24 21:09 UTC · original
Test report for this PR together with #362 (the tests part), on another Windows 10 + NVIDIA machine. Counts only, no title data.
Machine: Windows 10 Pro 22H2 (19045), NVIDIA GeForce RTX 3050 (driver 32.0.16.2124), AMD Ryzen 5 3600, 16 GB.
rustc 1.98.1 (48a229cea 2026-09-01).Before (no Agility runtime): the in-box runtime reports SM 0x65 on the RTX 3050 and SM 0x62 on WARP.
cargo test --workspace --locked --no-fail-fast: 474 passed, 22 failed, 7 ignored. All 22 arevictory-shaderGPU tests failing withno SM 6.6 device available(valu_tests,intersect_tests,waterfall_tests).After (#362 merged,
cargo xtask agilityrun; package SHA-512 matches thex-ms-meta-SHA512nuget.org serves):cargo test --workspace --locked --no-fail-fast: 498 passed, 0 failed, 7 ignored.victory-shader: 210 passed, 2 ignored, and no device was skipped (hardware and WARP both ran). Both clippy runs from CI (-D warnings, with and without--all-features) are clean, andcargo xtask policypasses.Separately,
crash::tests::unwinds_like_the_system_walkfails intermittently here too (#742); it is unrelated to this PR.I have not run the title with this yet.
AI use: run and written with Claude Code (Claude Opus 5.5); the numbers are from real runs on the machine above.
@Calvix2k on GitHub · 2026-11-24 23:00 UTC · original
Test report: Windows 10 + AMD RDNA3, with the title, stacked on #1798.
Machine: Windows 10 22H2 (19045), Ryzen 7 5800X, Radeon RX 7800 XT (driver 32.0.24027.1012), 32 GB, MSVC x64, Rust 1.98.1.
Build:
19aec59rebased onto main70564ae; one conflict in pps/victory/src/main.rs show_config, resolved by keeping both data_dir/idelityfx and the d3d12 sdk block. Stacked on #1798 locally, because the title exe and the dump are separate folders here (without it the run stops at TitleID 00000000 before D3D12).debug/release/diag\\D3D12d3d12 sdk : …\\release\\D3D12\\D3D12Core.dll (version 620)Unsupported bit-flag set (root signature flags c01),0x80070057;drawn=0; crash at+0xb5a5f8after ~4 sdrawn=192/192,dispatched=64/64; the+0xb5a5f8crash is goneSeries X needs commit headroom; that is not a defect of this PR. On the same machine the Series X profile reaches frame 128 and then stops with
mapping physical pages failed (not a placeholder?) … os error 1455(paging file too small) and a title breakpoint at+0x2474680. C: had 5.4 GB free and the system-managed pagefile could not grow, so the host ran out of commit while creating a 2560x1440 R32G32B32A32 target. The README note about Windows error 1455 covers it; a bigger pagefile (or--console series-s) is the workaround.Series S is stable. Two runs (60 s and 135 s): 4,096 frames presented, 20,480/20,480 draws and 2,048/2,048 dispatches, no device removal, no crash, 30 fps. The window is still black at that point on upstream – it looks like the loading stage, and is separate from this PR.
Doc nit: the module comment says that without the
D3D12folder the in-box runtime is used. It is not: with the exports present and no folder, device creation fails (INVALID_REDIST). #467's feature gate or a startup hint would address that.@Calvix2k on GitHub · 2026-11-24 23:29 UTC · original
Addendum to the AMD result above: on this Windows 10 + RX 7800 XT machine the boot/first-boot screens stay black at 30 fps even with Agility (all draws executed, no warnings, GPU ~2% busy, input changes the UI draw count, standard and separated layouts alike, fresh cache alike). Filed with measurements as #1854 so it does not get mixed into this PR's Windows 10 shader-model fix.
@Marvisak on GitHub · 2026-11-25 00:00 UTC · original
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #463. Windows 10 D3D12 runtime opt-in done with an xtask that downloads a package with curl (new
sha2dependency) and exports that are added even when the runtime folder is missing. #463 (clean) does the opt-in only when the DLL is present and downloads nothing.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