Windows 10: load the D3D12 Agility SDK runtime for shader model 6.6 #402
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/402"
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?
Imported from fxceless/victory-fork. Originally posted by domints on 2026-11-25T00:25:27Z.
Windows 10's in-box D3D12 stops at shader model 6.5 and refuses root signatures with the directly indexed heap flags (c01), so every translated pipeline was refused and nothing drew (#84).
victory.exe now exports D3D12SDKVersion (620) and D3D12SDKPath (.\D3D12), and
cargo xtask agilityfetches Microsoft.Direct3D.D3D12 1.620.2 from nuget.org, checks its published SHA-512, and puts D3D12Core.dll and d3d12SDKLayers.dll in target<profile>\D3D12. The DLLs never enter the repository. Windows 11, or a missing folder, keeps the in-box runtime.victory configreports whether the runtime is in place, and the SM 6.5 error names the command.This PR is just an extraction of single relevant commit from #22 which grows in more and more unrelated commits
Imported from fxceless/victory-fork. Originally posted by HAL9000RELOADED on 2026-11-25T13:00:34Z.
Tested on Windows 10, where this matters, with an AMD card.
Setup: Windows 10 Pro 22H2 (19045), Radeon RX 7900 XTX (RDNA3), Adrenalin 32.0.32015.7029, Rust 1.98.1, DXIL validator and PC dxc from SDK 10.0.26100.
e24d4b0merged ontomaina253706(no conflict), plus the stack-headroom test fix from Marvisak/VIctory#742.Results
cargo xtask agility: victory-shader gives 192 passed and 23 failed. The failures are the GPU tests with "no SM 6.6 device available", the in-box behaviour, so nothing changes without the runtime. Its test executable then exports nothing (checked withdumpbin /exports).cargo xtask agility: it downloaded 1.620.2 and placed it intarget\{debug,release,diag}\D3D12\.Two notes
depth_bounds_pipeline_loads_and_filters_draws. Its root signature is refused there withE_INVALIDARG; see #850 and #692.build.rscould cover victory-gpu's tests the same way.victory.exeexports unconditionally (dumpbinshows both symbols). With the exports and noD3D12\D3D12Core.dllbeside the executable,D3D12CreateDevicefails with0x887E0003(D3D12_ERROR_INVALID_REDIST) on this Windows 10. I checked that with a standalone probe. So avictory.exebuilt withoutcargo xtask agilitywould have no host device. This is the same note as on #69.The runs behind this, with the three fixes that make victory-gpu's tests pass on Windows 10 (#875, #849, #692): https://github.com/fxceless/victory-fork/issues/850#issuecomment-7163161066
Imported from fxceless/victory-fork. Originally posted by domints on 2026-11-25T13:20:14Z.
@HAL9000RELOADED as far as I understand, Note 2 is irrelevant - it doesn't change behaviour on Windows 11, because this D3D12Core.dll in correct version is available in the OS by default, and also the whole point of this Agility fix is that Windows 10 has outdated version and it REQUIRES new version downloaded from NuGet so obviously it won't run without those DLLs downloaded.
Imported from fxceless/victory-fork. Originally posted by domints on 2026-11-25T13:34:21Z.
@HAL9000RELOADED Added the fix to gpu crate, also revalidated note 2, and added the condition to symbol export. Tested on my Windows 10, works properly.
Imported from fxceless/victory-fork. Originally posted by HAL9000RELOADED on 2026-11-25T14:05:37Z.
Re-tested the new head
fb5da17on Windows 10 22H2 (19045) with an RX 7900 XTX (plus the stack-headroom test fix from Marvisak/VIctory#742). No game data used.victory.exeand the victory-shader and victory-gpu test executables export nothing (dumpbin /exports).cargo xtask agilityand a plaincargo build/cargo test --no-run, with no clean: all three exportD3D12SDKVersionandD3D12SDKPath.warp_budget_saturates…, which also fails onmain(#849).depth_bounds_pipeline_loads_and_filters_drawsnow passes; before, on the in-box runtime, it failed withE_INVALIDARG.Both notes are covered here. Thanks for picking them up, @domints, and for fixing them so quickly.
f85101b: the same four refusals, plus pipelines left "being made" for the whole run #903Imported from fxceless/victory-fork. Originally posted by GamingRipperDoc on 2026-11-26T06:52:05Z.
Tested on Windows 10 22H2 (19045), AMD RX 9070 XT (Adrenalin 32.0.32015.7029), Rust 1.98.1. This PR (
d95e86e) merged locally with currentmain(46bf535); the merge was clean.cargo xtask agility: fetched Microsoft.Direct3D.D3D12 1.620.2 from nuget.org, and putD3D12Core.dllandd3d12SDKLayers.dllintarget\{debug,release,diag}\D3D12\.victory config:d3d12 sdk : ...\target\release\D3D12\D3D12Core.dll (version 620).cargo test -p victory-shader --lib --locked: 217 passed, 0 failed. Without a runtime on this machine, 23 of these fail for want of an SM 6.6 device.cargo test -p victory-gpu --lib --locked -- --test-threads=1: 209 passed, 0 failed,depth_bounds_pipeline_loads_and_filters_drawsincluded (it fails on Windows 10 without the runtime).VICTORY_*variables: pipelines are created and the title runs into its 3D frames. That needed #1213 merged as well. Without it, AMD's shader compiler crashes 4 s in atamdxc64.dll+0x861b9f, which #1213 is about. The crash comes frommain's translated shaders, not from this PR: it happened at this PR's own head too, and the runtime is the same 1.620.2 as in my old runs. With #1213 (and #317, #1216, also merged for this run) it ran 3 minutes past frame 1,790 with 2,871 pipelines bound and no device removal.So on this machine the runtime loads and is used as described.
No game data in this comment.
AI-assisted (Claude Code); I ran the checks above on my machine.
Imported from fxceless/victory-fork. Originally posted by cbw2580147369-commits on 2026-11-28T03:11:25Z.
Two notes for Windows 10 users, after the 27 November base switch.
main carries no Agility exports any more.
apps/victory/src/agility.rsandapps/victory/build.rsare gone from the tree based on VIctory-NVIDIA, whilecrates/victory-gpu/src/host.rsstill setsD3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED(line 1129-1130). On Windows 11 the in-box runtime takes both and answers SM 6.6, so nothing there needs a shim; on Windows 10 19045 the in-box runtime refuses them and the title never starts.The shim from the older tree still fits the new one unchanged. What I put back on
2f3f3993(Windows 10 22H2 19045, Arc B580):apps/victory/src/agility.rs:#[unsafe(no_mangle)] pub static D3D12SDKVersion: u32 = 620;#[unsafe(no_mangle)] pub static D3D12SDKPath: SdkPath = SdkPath(c".\\D3D12\\".as_ptr());plus
runtime_dir()/runtime_present()helpers.apps/victory/build.rs(MSVC only):cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKVersion,DATAcargo:rustc-link-arg-bins=/EXPORT:D3D12SDKPath,DATAapps/victory/src/main.rs:mod agility;D3D12\besidevictory.exe(D3D12Core.dll4874024 B,d3d12SDKLayers.dll).With that,
cargo build --profile diag -p victory --features diagnosticsproduces a 15.3 MBvictory.exe, both symbols show instrings, and the title runs to its menus with the full UI and into the intro on an Arc B580. Diagnostics from that run are in #1370.If keeping the export in-tree is unwanted for Windows 11 builds, a
cfg(windows)module guarded by a feature, or acargo xtask agilitythat always emits the two exports, would both do; the point is that the two symbols have to be on the executable for 19045 to loadD3D12\D3D12Core.dll.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.