Windows 10: load the Agility SDK runtime from a D3D12 folder beside v… #3628
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3628"
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 Marvisak/VIctory. Originally posted by grosso1337 on 2026-11-27T23:41:49Z.
…ictory.exe
Windows 10's in-box Direct3D 12 runtime refuses root signatures with CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED and SAMPLER_HEAP_DIRECTLY_INDEXED (flags 0xc01), so every host pipeline is refused and the title crashes reading a null pipeline once it draws.
d3d12.dll loads an app-local D3D12Core.dll only when the executable exports D3D12SDKVersion and D3D12SDKPath. victory.exe now exports them (SDK 1.620, path .\D3D12); Rust does not export statics from a binary, so build.rs passes /EXPORT for both to the MSVC linker. Without the folder, d3d12.dll keeps the system runtime, so Windows 11 is unchanged.
Tested on Windows 10 22H2 (19045), RX 6800 XT: pipelines are created and the world is drawn.
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T23:48:04Z.
I built the exact
3a3d04fMSVC CLI andmain63bcca4on Windows 10 22H2 (19045.6456). The PR binary exports both SDK symbols. I ranvictory translate --cache --pipelinesagainst a generated pack containing one compute pipeline, with a fresh cache for each runtime setup.main, in-box D3D12 and WARP0x887E0003The last setup also got one library hit on a repeat. I launched it from a working directory separate from the executable. An additional cold control on
main, with the app-local DLLs in place, still made zero pipelines. This is the CLI counterpart to the synthetic signature and pipeline checks in #3618. Runtime matrix in #3618The issue to address before merge is the missing-folder case. With the two exports enabled, the tested Windows 10
D3D12CreateDevicepath fails with0x887E0003instead of creating the in-box device. Please consider keeping SDK selection optional, or document the SDK folder as required for the exported build. The README's Windows 11 fallback claim still needs a Windows 11 run. Microsoft's Agility diagnosticsAI-assisted with Codex.
Imported from Marvisak/VIctory. Originally posted by grosso1337 on 2026-11-27T23:48:31Z.
Tested this branch on Windows 10 22H2 (Ryzen 7 9800X3D, RX 6800 XT): without the D3D12 folder every pipeline is refused and the title crashes; with it, the title boots and plays up to the intro cutscene (at the expected ~1 fps).
Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-27T23:57:33Z.
Thanks for making the exports opt-in in
0ff8ece. I checked that head with the feature on and no SDK folder. The startup check also blocks commands that never create a D3D12 device.victory configexits 1, and the existingcensus_reports_unreadable_files_and_continues_scanningtest fails with the missing-SDK message.7d04554is a single commit on your exact head. It runs the check fortranslate --pipelinesandrun --execute, the commands that request the GPU path. The other commands keep their CPU-only behavior.On Windows 10 22H2 without the SDK folder, the patched opt-in build passes all 18 CLI tests.
configworks andtranslate --cachetranslates both generated shaders. Adding--pipelinesstill produces the installation message and exits 1. With Agility 1.620.2 and WARP 1.0.22 in place, it builds the synthetic pipeline and hits the library on the repeat. The default build exported neither SDK symbol and started the in-box WARP device. Strict CLI Clippy and the asset policy passed.Please keep the Git author on a cherry-pick or rebase. If folding the change into another commit, please add
Co-authored-by: andrewpozdnakov7-jpg <[email protected]>. AI-assisted with Codex.Imported from Marvisak/VIctory. Originally posted by grosso1337 on 2026-11-28T00:07:43Z.
Thanks! Took
7d04554as is (fast-forward, so your authorship is kept), plus a rustfmt-only commit on top (6cb0996). The startup check now runs only forrun --executeandtranslate --pipelines.Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-28T00:50:32Z.
An alternative route to the same runtime, for comparison (read from xcl's source, not run here: I have no Windows 10 machine).
xcl loads an app-supplied
D3D12Core.dllwithout PE exports, throughID3D12SDKConfiguration1::CreateDeviceFactory(xclcrates/xcl/src/gpu/agility.rs:1-17):%XCL_D3D12_DIR%, then<exe>\D3D12,<exe>and%LOCALAPPDATA%\XCL\D3D12, and takes the first folder whoseD3D12Core.dllexportsD3D12SDKVersion.D3D12CreateDevice.Compared with the exports here:
build.rs/EXPORTflags, and the restriction tovictory.exe. Any binary could use the factory, including thecargo testexecutables, which don't carry the two exports and so stay on the in-box runtime on Windows 10.D3D12CreateDevicesites:victory-gpu/src/host.rs:190,:193and:718, and the shader test host'semit/host.rs:88. The exports, by contrast, switch the whole process with no code change at those sites.So the exports are the smaller change for
run. The factory would also cover the test binaries on Windows 10, if that matters.Added 2026-11-28: five open PRs now do this (read from the PR texts and diffs, not run):
build.rs, version read from the stagedD3D12Core.dll, scoped tobin=victory, plus avictory agility-probecommandbuild.rs(sdkpath.rs)build.rsCreateDeviceFactory, in its ownvictory-agilitycrateCreateDeviceFactory, no exportsThe export PRs are rival answers to the same thing, and #3667 says it supersedes #463. #3033 and #969 are the factory route above, which would also cover the test binaries.
AI-assisted (Claude Code, Claude Opus 5.5 read both projects' code).
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.