GPU: load the Agility SDK through ID3D12SDKConfiguration1 (#749) #969
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!969
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-969"
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?
@mgunes1311-lab on GitHub · 2026-11-24 14:36 UTC · original
mgunes1311-lab:agility-device-factory→main· +568 −22 · 6 files · 17 commits · openLoads the DirectX 12 Agility SDK (
D3D12Core.dll) at runtime viaID3D12SDKConfiguration1::CreateDeviceFactorywithout exportingD3D12SDKVersionorD3D12SDKPathfromvictory.exe.Summary of Changes
crates/victory-shader/src/emit/agility.rs&mod.rs:D3D12Core.dllfromVICTORY_D3D12_AGILITY(if set) orD3D12\D3D12Core.dllbeside the executable, supporting a DLL path, directory, or unpacked NuGet package (build\native\bin\x64\D3D12Core.dll).D3D12SDKVersionfromD3D12Core.dll's PE export table (sdk_version) without loading or executing the DLL.ID3D12SDKConfiguration1and creates a process-wideID3D12DeviceFactory(Factory::load), configuringD3D12_DEVICE_FACTORY_FLAG_ALLOW_RETURNING_EXISTING_DEVICE,ApplyToGlobalState,CLSID_D3D12Debug, andCLSID_D3D12DeviceRemovedExtendedData.serialize_versioned_root_signature, routing serialization throughID3D12DeviceConfiguration::SerializeVersionedRootSignaturewhen supported by the device so0xc01heap-indexing root signatures work on Windows 10 without touching an older in-boxd3d12.dllserializer.d3d12.dllwhen no Agility SDK is configured or loading fails. The shader test/host path uses the system runtime when no SDK is configured, but propagates an SDK loading error instead of falling back.VICTORY_D3D12_AGILITYdevice +0xc01root-signature test.crates/victory-shader/src/emit/host.rs: Usesagility::Factory::load()andagility::serialize_versioned_root_signature.crates/victory-gpu/Cargo.toml,src/host.rs,src/pipeline/host.rs: Enables thehostfeature onvictory-shaderfor Windows and wiresFactory(includingapply_global, debug layer, DRED, WARP/hardware device creation) andserialize_versioned_root_signatureinto the host GPU.README.md: Documents Windows 10 (22H2 with KB5029331 or newer) Agility SDK setup (D3D12\D3D12Core.dllorVICTORY_D3D12_AGILITY=<dir>).Verification
cargo test, Clippy,xtaskasset policy checks, and live GPU tests against Agility SDK v620.Closes #749
@EduBertozzi on GitHub · 2026-11-24 14:38 UTC · original
Tested
f3457f8(on currentmain) on Windows 10 22H2 19045.6456 with a GTX 1060 6 GB (Pascal, driver 32.0.15.8266). The in-box runtime there stops at SM 6.5. I used the 1.620.2D3D12Core.dll.VICTORY_D3D12_AGILITYunsetD3D12Core.dllcargo test -p victory-shader --libneither hardware nor WARP SM 6.6 device availablecreates_device_and_serializes_heap_indexed_root_signature_when_configuredcargo test -p victory-gpu --libSo on this Windows 10 build,
CreateDeviceFactoryloads the newer core and the0xc01root signatures serialize, withoutD3D12SDKVersion/D3D12SDKPathexports.One consequence worth noting next to #175, #463, #362 and #486: because no exe exports are needed, test binaries get SM 6.6 from the environment variable alone. On this machine that made the Windows 10 test-binary work (#486, #362) unnecessary for these two crates.
AI-assisted (Claude Code).
@Zipettte on GitHub · 2026-11-24 15:13 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
f3457f8:cargo test -p victory-gpu -p victory-shaderpasses, 173 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@mauri9911 on GitHub · 2026-11-24 18:48 UTC · original
Tested this branch (
f3457f8) on a configuration that is not in the PR description:Get-HotFixshows it is not installed), so below the 22H2 + KB5029331 the README asks forVICTORY_D3D12_AGILITYpointing at the folder withD3D12Core.dllResults:
cargo test -p victory-shader --release: 123 passed, 1 ignored. Onmainthe GPU ones (valu_tests,waterfall_tests) fail here with "neither hardware nor WARP SM 6.6 device available".cargo test -p victory-gpu --release: 50 passed, 1 ignored.run ... --execute, 45 s): log showsAgility SDK ready version=619, noroot signature flags c01warnings, and frames presented withdraws=5319 drawn=5319(onmainit wasdrawn=0).So the
CreateDeviceFactoryroute works on 19044 too. In my own attempt (#1518, exports only) the runtime-onlyID3D12SDKConfiguration::SetSDKVersionreturnedDXGI_ERROR_INVALID_CALLfor every path and version I tried, and the exe-exports route needs the exe to carry them and leaves the unit tests without SM 6.6.I'll close #1518 as a duplicate of this one if the maintainer prefers this approach.
AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 00:30 UTC · original · edited 2026-11-25 22:16 UTC
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main(conflict incrates/victory-shader/src/emit/host.rs). It will be reviewed again once it is rebased.From the earlier needs-work note: the code read as sound, but it needs the maintainer's decision, since it loads and runs a user-chosen
D3D12Core.dllfrom outside the repo (one of several approaches to #749).Generated by Claude Code
@AsterionXeity on GitHub · 2026-11-25 02:45 UTC · original
Can confirm this works on my 4080S on windows 10
@HAL9000RELOADED on GitHub · 2026-11-25 22:53 UTC · original
Windows 10 + AMD data point for
bb176b6: RX 7900 XTX (RDNA3), driver 32.0.32015.7029, Windows 10 22H2 (19045.6456), Agility SDK 1.620.2 from NuGet,VICTORY_D3D12_AGILITYpointing at its folder. Merged on main13f91ca.victory-shader: 273 passed, 0 failed. The newcreates_device_and_serializes_heap_indexed_root_signature_when_configuredpasses, soCreateDeviceFactoryworks on this Windows 10 build with a Radeon.victory-gpu: 195 passed, 0 failed.victory-shadertests fail, as on main. So the opt-in leaves the default path unchanged.No Developer Mode, no exports on the test executables.
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.