Bundle the DirectX 12 Agility SDK so SM 6.6 is actually available #286

Open
ZaneIceMaster11 wants to merge 1 commit from upstream-pr/286 into main
ZaneIceMaster11 commented 2026-11-24 23:15:26 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by ZaneIceMaster11 on 2026-11-24T23:15:26Z.


Problem

On Windows 10 22H2 (this fork's test machine, NVIDIA RTX 3060, current driver), the OS in-box d3d12.dll caps shader model at 6.5 on hardware and 6.2 on WARP, even though the driver itself is fully DX12 Ultimate capable. This failed 22 victory-shader GPU tests outright (no SM 6.6 device available), and would have silently gated off victory-gpu's mesh/world path too, since it checks the identical D3D_SHADER_MODEL_6_6 feature (crates/victory-gpu/src/host.rs).

Root cause confirmed by temporarily surfacing the swallowed Host::new() error: hardware reports SM 0x65, WARP reports SM 0x62, both below the 0x66 required. No code in the tree referenced the Agility SDK before this change.

Fix

  • cargo xtask agility-sdk (new): fetches Microsoft.Direct3D.D3D12 1.620.2 from nuget.org (pinned URL + sha256, extracted via Windows' own tar.exe) into target/agility-sdk/ (gitignored, not game data, not committed - matches this repo's no-committed-binaries policy).
  • New build.rs in apps/victory and crates/victory-shader: export the required D3D12SDKVersion/D3D12SDKPath DATA symbols and copy the two redistributable DLLs next to the built exe/test binaries, if fetched.
  • With no fetch and no network, a plain cargo build/cargo test is unaffected (falls back to the OS runtime, today's behaviour) - the tree stays green either way.

Verification

  • cargo test -p victory-shader --features host emit:: went from 22 failed to 108 passed, 0 failed (includes the BVH ray/node tests matching the reference bit for bit on both the hardware adapter and WARP).
  • cargo build --release --workspace and cargo clippy --workspace --all-targets --release: clean, 0 warnings.

Co-authored with Claude Code (Claude Sonnet 5).

<!-- greyfinch-sync:fxceless/victory-fork:issue:6593338829 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/286). Originally posted by [ZaneIceMaster11](https://github.com/ZaneIceMaster11) on 2026-11-24T23:15:26Z. --- ## Problem On Windows 10 22H2 (this fork's test machine, NVIDIA RTX 3060, current driver), the OS in-box `d3d12.dll` caps shader model at **6.5 on hardware** and **6.2 on WARP**, even though the driver itself is fully DX12 Ultimate capable. This failed 22 `victory-shader` GPU tests outright (`no SM 6.6 device available`), and would have silently gated off `victory-gpu`'s mesh/world path too, since it checks the identical `D3D_SHADER_MODEL_6_6` feature (`crates/victory-gpu/src/host.rs`). Root cause confirmed by temporarily surfacing the swallowed `Host::new()` error: hardware reports SM `0x65`, WARP reports SM `0x62`, both below the `0x66` required. No code in the tree referenced the Agility SDK before this change. ## Fix - `cargo xtask agility-sdk` (new): fetches `Microsoft.Direct3D.D3D12` 1.620.2 from nuget.org (pinned URL + sha256, extracted via Windows' own `tar.exe`) into `target/agility-sdk/` (gitignored, not game data, not committed - matches this repo's no-committed-binaries policy). - New `build.rs` in `apps/victory` and `crates/victory-shader`: export the required `D3D12SDKVersion`/`D3D12SDKPath` DATA symbols and copy the two redistributable DLLs next to the built exe/test binaries, if fetched. - With no fetch and no network, a plain `cargo build`/`cargo test` is unaffected (falls back to the OS runtime, today's behaviour) - the tree stays green either way. ## Verification - `cargo test -p victory-shader --features host emit::` went from **22 failed** to **108 passed, 0 failed** (includes the BVH ray/node tests matching the reference bit for bit on both the hardware adapter and WARP). - `cargo build --release --workspace` and `cargo clippy --workspace --all-targets --release`: clean, 0 warnings. Co-authored with Claude Code (Claude Sonnet 5).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/286:upstream-pr/286'
git switch 'upstream-pr/286'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/286'
git switch 'upstream-pr/286'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/286'
git switch 'upstream-pr/286'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/286'
git switch 'main'
git merge --squash 'upstream-pr/286'
git switch 'main'
git merge --ff-only 'upstream-pr/286'
git switch 'main'
git merge 'upstream-pr/286'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!286
No description provided.