Windows 10 support: load the D3D12 Agility SDK runtime from a D3D12 folder #26
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/readmet3xt-lab--foxhound!26
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/26/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?
@Schrubbdiwupp on GitHub · 2026-11-28 19:16 UTC · original
Schrubbdiwupp:windows10-agility-sdk→main· +287 −5 · 9 files · 5 commits · closed without mergingOn Windows 10, the built-in Direct3D 12 refuses the root signatures with directly indexed descriptor heaps (Shader Model 6.6) that every translated shader uses (
Unsupported bit-flag set (root signature flags c00)), so foxhound stops atrequire_direct_heaps. This PR makesvictory.exeexportD3D12SDKVersion(620) andD3D12SDKPath(.\D3D12\). With those exports, Direct3D 12 loads Microsoft's Agility SDK runtime from aD3D12folder beside the exe. Windows 11 is unchanged.apps/victory/src/agility.rs+build.rs: the two exports (/EXPORT:...,DATA)scripts/get-d3d12.ps1: fetchesD3D12Core.dll1.620.2 from nuget.org and keeps it only if it is validly signed by Microsoft. Nothing of Microsoft's is committed (/agility/is git-ignored).build-launcher.ps1 -Packagecopiesagility\D3D12into the release folderTested: Windows 10 22H2 (19045), RTX 5070 Ti, Ryzen 7 5800X. The shaders translate, the ~83k pipelines compile, and the title runs.
dumpbin /exports victory.exelists both symbols.cargo xtask policypasses. Pre-existing fmt/clippy findings outside these files are untouched. The linker now prints "Creating library victory.lib" because the exe has exports; that is expected.— Schrubbdiwupp & TARS 🐾
🤖 Generated with Claude Code
@Schrubbdiwupp on GitHub · 2026-11-28 21:58 UTC · original
Added a follow-up commit (
fb54217): on Windows 10 the launcher now offers to fetch the runtime itself, so release users never need the script.victory get-d3d12: carriesscripts\get-d3d12.ps1(include_str!) and runs it intoD3D12beside the programLauncher.cs:D3d12Check(Windows build < 22000 from the registry,D3D12\D3D12Core.dllmissing). Play asks once and fetches it as the first loading-screen step (get-d3d12.log). Saying no leaves a note in the status line. Windows 11 never sees any of it.Tested on Windows 10 22H2:
victory.exe get-d3d12in an empty folder fetchedD3D12Core.dll1.620.2 (Microsoft signature valid). The launcher builds withbuild-launcher.ps1as before.cargo clippy -p victory --no-depsreports nothing in the changed files (the one finding,warm.rs:92, predates this PR).— Schrubbdiwupp & TARS 🐾
@readmet3xt-lab on GitHub · 2026-11-29 06:14 UTC · original
Thanks for this, and for testing on Windows 10. I ported it and ran it on Windows 11, where it stops at the start:
D3D12folder besidevictory.exe(the case for every Windows 11 user who never runsget-d3d12).D3D12_ERROR_INVALID_REDIST(0x887E0003) fromD3D12SerializeVersionedRootSignature, and the run ended before the window appeared.D3D12SDKVersion= 620 higher than the system's own runtime, Direct3D 12 requires the redistributable and does not fall back to Windows' runtime when the folder is missing.So I took it back out for now. Two ways I see to bring it back:
D3D12Core.dllversion in the folder. Then Windows 11 keeps its own runtime, and Windows 10 loads the folder.D3D12folder. That puts Microsoft's DLL into every release, so I'd rather avoid it.If you can rework it along the lines of (1) and check that Windows 11 without the folder still starts, I'll take it. The launcher's Windows 10 question and the fetch script look good as they are.
@Schrubbdiwupp on GitHub · 2026-11-29 16:45 UTC · original
Thanks for porting and testing it on Windows 11, and for the clear write-up. Reworked along your option (1), but decided at run time instead of with a fixed lower number (commit
18a1f40, rebased on v0.8.1):agility::match_d3d12_core()runs first thing inmain(and again aftervictory get-d3d12). WithD3D12\D3D12Core.dllbeside the program it asks for that file's version; without it, for Windows' own (theD3D12SDKVersionSystem32'sD3D12Core.dllexports, capped at 614). So Windows 11 without the folder keeps its own runtime and never needs the redistributable.D3D12SDKVersionis now anAtomicU32, andd3d12.dllis delay-loaded (/DELAYLOAD:d3d12.dll,delayimp.lib), so Direct3D 12 reads the value set at run time, not the static's first one.main.rs(GPL-3.0-or-later), credited inagility.rs.Tested on Windows 10 22H2 (19045), RTX 5070 Ti, with
victory upscaler-check --device:D3D12folder: the device is created on Windows' own runtime, noINVALID_REDIST; it then says shader model 6.5, as expected on Windows 10 (the launcher's fetch covers that)I can't test Windows 11 here, so a run on your Windows 11 machine without the folder would be the real check.
cargo test -p victory agilitypasses and clippy reports nothing in the changed files.— Schrubbdiwupp & TARS 🐾 (AI-assisted)
@readmet3xt-lab on GitHub · 2026-11-30 02:14 UTC · original
Ported with credit in
fb7468f(to you, and to VIctory-NVIDIA for the version matching). Two small changes: a launcher comment held two control characters where the pathapps\victory\src\agility.rswas (a\vand an\ataken as escapes), fixed; and the README now says the launcher offers to fetch the runtime on Windows 10. On our Windows 11 PC (noD3D12folder)victory.exestill makes its device and runs DLSS. Thanks for reworking it.Pull request closed