GPU: load optional D3D12 Agility SDK at runtime for Windows 10 SM 6.6 #12
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/DexNom--VIctory!12
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-12"
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?
@molodayamama on GitHub · 2026-11-25 17:53 UTC · original
molodayamama:gpu/agility-sdk-runtime→main· +722 −30 · 8 files · 1 commits · openSummary
Adds optional runtime loading of the Microsoft DirectX 12 Agility SDK (
D3D12Core.dll) throughID3D12SDKConfiguration1::CreateDeviceFactory, enabling Shader Model 6.6 and directly indexed descriptor heaps on Windows 10 (build 19041+) without embeddingD3D12SDKVersion/D3D12SDKPathexports or shipping any binary files in the repository.When no Agility SDK is configured or present beside the executable, behavior is unchanged and the system
d3d12.dllis used as before.Changes
crates/victory-shader/src/emit/agility.rs(classified inOUTSIDE_TRANSLATIONinlib.rsso cached shader translations are not invalidated):D3D12Core.dllfromVICTORY_D3D12_AGILITY(direct DLL path, containing folder,D3D12\subfolder, or unpackedMicrosoft.Direct3D.D3D12NuGet root) or fromD3D12\D3D12Core.dllbeside the executable.D3D12SDKVersionu32directly from the PE/PE32+ export table without loading or executing the DLL.ID3D12SDKConfiguration1::CreateDeviceFactoryand creates a process-wideID3D12DeviceFactory(D3D12_DEVICE_FACTORY_FLAG_ALLOW_RETURNING_EXISTING_DEVICE,ApplyToGlobalState, andGetConfigurationInterfacefor Debug Layer / DRED).serialize_versioned_root_signature, routing serialization throughID3D12DeviceConfiguration::SerializeVersionedRootSignaturewhen supported by the device so SM 6.6CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | SAMPLER_HEAP_DIRECTLY_INDEXEDroot signatures succeed on Windows 10.crates/victory-shader/src/emit/host.rs: Usesagility::load()andagility::serialize_versioned_root_signaturewhen creating shader test devices and root signatures.crates/victory-gpu/Cargo.toml,src/host.rs,src/pipeline/host.rs: Enablesvictory-shader/hoston Windows (no new crates,Cargo.lockunchanged), uses the Agility SDK factory for device/debug/DRED creation with a clean fallback to systemd3d12.dllif unavailable, and serializes root signatures viaserialize_versioned_root_signature.README.md: Documents the opt-in Windows 10 Agility SDK setup (D3D12\D3D12Core.dllorVICTORY_D3D12_AGILITY).Testing
Tested on Windows 10 22H2 (build 19045.5794, in-box
d3d12.dllcapped at SM 6.5) with an NVIDIA GeForce RTX 4060 and Microsoft DirectX 12 Agility SDK1.614.1(D3D12SDKVersion = 614, placed outside the repository):cargo clippy --workspace --all-targets --locked -- -D warnings: passed (0 warnings)cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: passed (0 warnings)cargo test --locked -p xtask: 4 passed, 0 failed (repository_passes_policypassed)cargo test --locked -p victory-shader --lib emit::agility(withoutVICTORY_D3D12_AGILITYand withVICTORY_D3D12_AGILITY): 4 passed, 0 failed in both modescargo test --locked -p victory-gpu --libwithVICTORY_D3D12_AGILITY: 188 passed, 0 failed (previously failedpipeline::host::tests::depth_bounds_pipeline_loads_and_filters_drawswithE_INVALIDARGon in-boxD3D12SerializeVersionedRootSignature)cargo test --locked -p victory-shader --libwithVICTORY_D3D12_AGILITY: all 24 previously failing SM 6.6 hardware GPU tests (32/64-bit BVH intersection, VALU, waterfall, wave64-on-wave32) passed on hardware (3 unrelated failures remain on this box: 2 pre-existingdxil.dllPSV0 rejections from Windows SDK10.0.22621.0, and 1 WARP-only test because Windows 10's in-box WARP stays at SM 6.2).git diff --check: clean. In-game gameplay was not tested (no local game files on this machine).@Artking175 on GitHub · 2026-11-25 18:48 UTC · original
Independently verified exact head
999fd75on Windows 10 22H2 (19045), RTX 2060 (NVIDIA 531.41), and Rust 1.98.1 MSVC. I used the Microsoft Agility SDK 1.614.1 throughVICTORY_D3D12_AGILITYin a separate checkout with no executable exports or system changes.cargo test --locked -p victory-shader --lib emit::agility -- --nocapture --test-threads=1passed all four tests both with the setting unset and with it set. With the SDK set, the live test confirmed SM 6.6 and heap-indexed root signature creation.depth_bounds_pipeline_loads_and_filters_drawstest executable reproduced0x80070057with the setting unset, then passed with Agility configured.cargo test --locked -p victory-gpu --lib -- --test-threads=1with Agility configured gave 188 passed, zero failed, and three ignored.I did not run the game on this head.
@HAL9000RELOADED on GitHub · 2026-11-25 22:53 UTC · original
First Windows 10 + Radeon run of
999fd75: RX 7900 XTX (RDNA3), driver 32.0.32015.7029, Windows 10 22H2 (19045.6456), Agility SDK 1.620.2 throughVICTORY_D3D12_AGILITY. Base: main2e01ab4.victory-gpu: 188 passed, 0 failed.depth_bounds_pipeline_loads_and_filters_drawspasses too.victory-shader: 240 passed, 1 failed. On main without the PR, 26 shader tests fail here (SM 6.5). The newemit::agilitytests pass.warp_ray_probe_distinguishes_active_visits_and_finite_triangle_candidates: "WARP is required to validate the probe: the device supports SM 0x62 only". It fails on main too. Its WARP device stays on SM 6.2 with the factory. On this machine the system WARP does reach SM 6.6 when the executable exportsD3D12SDKVersion(another fork's #44), so maybe that test makes its WARP device outside the factory. I haven't checked.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.