GPU: load the Agility SDK through ID3D12SDKConfiguration1 (#749) #969
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from Marvisak/VIctory. Originally posted by mgunes1311-lab on 2026-11-24T14:36:09Z.
Loads 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
Imported from Marvisak/VIctory. Originally posted by EduBertozzi on 2026-11-24T14:38:41Z.
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).
Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T15:13:10Z.
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).
Imported from Marvisak/VIctory. Originally posted by mauri9911 on 2026-11-24T18:48:57Z.
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).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:30:42Z.
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
upstream-sync referenced this pull request2026-11-25 02:05:56 +00:00
Imported from Marvisak/VIctory. Originally posted by AsterionXeity on 2026-11-25T02:45:41Z.
Can confirm this works on my 4080S on windows 10
Imported from Marvisak/VIctory. Originally posted by thegl0w on 2026-11-25T03:39:55Z.
A data point on the minimum Windows 10 version for the
CreateDeviceFactoryroute.d3d12.dllandD3D12Core.dllare 10.0.19041.1266. AMD gfx1013, on a launch PS5 via ps5win.D3D12GetInterface(CLSID_D3D12SDKConfiguration, ...)returns E_NOINTERFACE (0x80004002), soID3D12SDKConfiguration1::CreateDeviceFactoryis never reached.D3D12SDKVersion620 +D3D12SDKPath, as in #463). It loads Agility 1.620.2, and the device reports SM 6.6.D3D12GetInterfacefails, or keeping the export route as a fallback, would help machines this old.upstream-sync referenced this pull request2026-11-25 04:07:05 +00:00
Imported from Marvisak/VIctory. Originally posted by HAL9000RELOADED on 2026-11-25T22:53:17Z.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.