Windows 10: the D3D12 Agility SDK runtime for shader model 6.6 (upstream #362) #69
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/fxceless--victory-fork!69
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-69"
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?
@simplesmenterafael on GitHub · 2026-11-24 21:08 UTC · original
simplesmenterafael:gpu/agility-sdk-win10→main· +453 −3 · 13 files · 5 commits · openBrings Marvisak/VIctory#362 (stacked on Marvisak/VIctory#175, for Marvisak/VIctory#84) into this fork: Windows 10's in-box D3D12 runtime stops at shader model 6.5, so on Windows 10 no SM 6.6 device exists and every translated pipeline is refused. Both upstream PRs are still open; this takes them as they are, plus one manifest fix.
What is in it
19aec59,f3c7333and its merge of upstreammain, authors kept):victory.exeexportsD3D12SDKVersion = 620andD3D12SDKPath = ".\D3D12\"(apps/victory/build.rs,apps/victory/src/agility.rs);victory configsays whether the runtime is beside the executable.victory-shader's test executables export the same two symbols (path..\D3D12\), only when the runtime is intarget\<profile>\D3D12\(crates/victory-shader/build.rs,src/agility.rs). Without it nothing changes.cargo xtask agilitydownloadsMicrosoft.Direct3D.D3D121.620.2 from nuget.org, checks the SHA-512 nuget.org publishes, and putsD3D12Core.dllandd3d12SDKLayers.dllintarget\{debug,release,diag}\D3D12\. Nothing of Microsoft's enters the repository.cargo xtask agility; the README's getting-started section (upstream part, upstream's own text) mentions it.crates/victory-shader/src/lib.rs: this fork'spub mod bvh;and the PR'smod agility;, both kept.sha2moved to[workspace.dependencies](0.10.9, the versionCargo.lockalready has; MIT OR Apache-2.0). The upstream PR named it inxtask/Cargo.tomlonly.Tested
rustc 1.98.1 (48a229cea 2026-09-01).mainat90228a7, no runtime): the RTX 3050 reports SM 0x65 and WARP SM 0x62 (checked with a small probe outside the repo).cargo test --workspace --locked --no-fail-fast: 474 passed, 22 failed, 7 ignored: all 22 arevictory-shaderGPU tests (no SM 6.6 device available). Separately,victory-loader'scrash::tests::unwinds_like_the_system_walkfails intermittently on this machine (Marvisak/VIctory#742, unrelated; it passed in the runs counted here).cargo xtask agilityrun):cargo test --workspace --locked --no-fail-fast: 498 passed, 0 failed, 7 ignored (the 2 extra tests are the newxtask agilityones);victory-shader210 passed, 2 ignored, no device skipped (hardware and WARP both ran).cargo clippy --workspace --all-targets --locked -- -D warnings: clean.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: clean.cargo xtask policy: 174 files ok.Before / after
Title run: NOT RUN at the time of opening (will be reported in a comment if done).
Not tested / known limits
cargo xtask agility); a fresh clone on Windows 10 still fails the GPU tests until it is.VICTORY_*switch and noshortcut:.Asset policy
cargo xtask policypasses. The Agility SDK DLLs and the NuGet package are kept undertarget\only; nothing derived from the game is included.AI use
Claude Code with Claude Opus 5.5: found the existing upstream work, read the PR's code before running it, merged it and resolved the conflict, moved
sha2, ran the tests and checks above, and wrote this description. The user asked for the merge, the push and this PR.🤖 Generated with Claude Code
Windows 10's in-box D3D12 stops at shader model 6.5, so no SM 6.6 device existed on this machine and 22 victory-shader GPU tests failed ("no SM 6.6 device available"). This merges Marvisak/VIctory#362 (stacked on #175): victory.exe and the victory-shader test executables export D3D12SDKVersion/D3D12SDKPath, and `cargo xtask agility` fetches Microsoft.Direct3D.D3D12 1.620.2 (SHA-512 checked) into target/<profile>/D3D12/. Nothing of Microsoft's enters the repository. One conflict, in crates/victory-shader/src/lib.rs: this fork's `pub mod bvh;` and the PR's `mod agility;`; both kept. Checked on Windows 10 19045, RTX 3050 (driver 32.0.16.2124), Ryzen 5 3600, rustc 1.98.1: cargo test --workspace --locked --no-fail-fast 498 passed, 0 failed, 7 ignored (was 22 failed); both clippy runs from CI clean; cargo xtask policy ok. The title was not run. Co-Authored-By: Claude Opus 5.5 <[email protected]>@simplesmenterafael on GitHub · 2026-11-24 21:21 UTC · original
Title run with this branch (
2cd8b02, release build, Series X profile) on the machine in the description. In words only, no captures.target\release\victory.exe run <game dir>\game_scarlett_master.exe --execute, withD3D12Core.dll1.620.2 intarget\release\D3D12\.XUserAddAsync(the point where Marvisak/VIctory#741/#789/#998 crash on Windows 10 + NVIDIA) went by without a crash.E_INVALIDARG), 1 shader that does not translate, no device removal, nocrashes.logentry, no driver reset.Before (
main): NOT RUN; on this machinemainhas no SM 6.6 device, so its pipelines would be refused (Marvisak/VIctory#84).Run and written with Claude Code (Claude Opus 5.5).
@avt0m4t48 on GitHub · 2026-11-24 22:37 UTC · original
I checked exact head
2cd8b023with an MSVC-target build script and a minimal Windows PE made from the app's export definitions. It exports SDK version 620 and its path even when the local Core DLL is missing. On a machine whose inbox runtime is older than the exported version, the loader requires the local runtime. Microsoft Agility SDK loader specificationI tested a follow-up that gates the exports on the installed Core DLL at build time and makes the installer invalidate both Cargo build scripts. The PE and directive controls, installer-style invalidation fixture, six xtask tests, and Windows-target app check with
blake3/purepassed. Native Windows D3D12 device creation remains unverified. Tested follow-up commitAI-assisted using Codex.
github-bot referenced this pull request2026-11-26 04:01:55 +00:00
@HAL9000RELOADED on GitHub · 2026-11-25 01:52 UTC · original
A data point for this approach on AMD + Windows 10, and two notes. They come from #401, now closed as a duplicate of this PR.
Machine: Windows 10 Pro 22H2 (19045), Radeon RX 7900 XTX, Adrenalin 32.0.32015.7029, i7-13700KF, Rust 1.98.1. No game data used.
0x65.Microsoft.Direct3D.D3D121.620.2 in.\D3D12\(D3D12SDKVersion = 620), checked with a standalone C probe:D3D12CreateDevicesucceeds, withD3D12Core.dllloaded from.\D3D12\.HighestShaderModel = 0x69andMeshShaderTier = 1.mainwith an equivalent patch): 22 failed (no SM 6.6 device available) became 210 passed on the card. On this machine WARP still reports below 6.6 and skips.main(c96b4f2) plus the same patch and #742's stack-headroom test fix: 0 failed, and clippy with all features is clean.Note 1:
victory.exewithout the runtime folder.apps/victory/build.rsexports unconditionally.apps/victory/src/agility.rssays that without the folder the in-box runtime is used. That is not what happens here: a probe exportingD3D12SDKVersion = 620with noD3D12\folder gets0x887E0003(D3D12_ERROR_INVALID_REDIST) fromD3D12CreateDeviceand no device.victory.exebuilt withoutcargo xtask agilitywould have no host GPU. I have not checked Windows 11; there it presumably depends on whether the in-box runtime is at least 620.crates/victory-shader/build.rsalready says this in its comment and only exports when the runtime is present. The binary might want the same treatment, or a clear error namingcargo xtask agility.Note 2: victory-gpu's tests get no exports here. victory-gpu's unit-test harness also creates host devices:
host(), the mesh pipeline test inpipeline/host.rs, and the WARP harnesses inindirect.rsandinplace.rs. Without the exports, its SM 6.6 and mesh-dependent tests keep skipping silently on Windows 10.github-bot referenced this pull request2026-11-26 04:02:20 +00:00
@domints on GitHub · 2026-11-25 10:04 UTC · original
This PR has merge conflicts.
Moreover adds unnecessary
miniz_oxideback to the root Cargo.toml leaving app with two zip unpacking packages.I suggest closing both this and #420 (which also has conflicts, but also doesn't resolve
miniz_oxideproblem) in favor of #402 which is minimal change, resolves conflicts and useszlib-rsinstead of just re-pullingminiz_oxide.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.