win10: export D3D12SDKVersion=621 at load time so the Agility SDK is actually used #39
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/ReTerryDavis--ReVIctory!39
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-38"
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?
@gianlukin2001-ops on GitHub · 2026-12-04 05:35 UTC · original
gianlukin2001-ops:fix/agility-load-time-version→main· +11 −2 · 2 files · 1 commits · merged 2026-12-04 07:03 UTCSummary
On Windows 10, v0.4.0 crashes at launch with
0xC0000005(access violation) during GPU init. The log shows the host never reached the Agility SDK:Cause
d354c69("agility: opt into D3D12SDKVersion only when local D3D12Core.dll exists") changed the exported value from a static621to anAtomicU32initialized to0, then stored621frommain():d3d12.dllreadsD3D12SDKVersionwhen it is loaded, beforemainruns. It sees0, uses the OS in-box runtime, and Windows 10's in-box runtime refuses the SM 6.6 directly-indexed heap root-signature flags (0xc00). Every host pipeline is then refused and the title crashes at init with0xC0000005.Fix
Put
621back in the file and drop the runtime store:SDK_VERSIONremains621, matching the shippedD3D12Core.dll1.621.0. One file, +7/−23,apps/victory/src/main.rsonly.Trade-off
With the version in the file, a host without
D3D12\D3D12Core.dllfails device creation withD3D12_ERROR_INVALID_REDIST(0x887E0003) instead of silently falling back to the in-box runtime. That is the documented Agility SDK behavior and the README already tells users to install the folder; the silent fallback is what caused this regression.Testing
D3D12Core.dll1.621.0 next tovictory.exe.0xC0000005at init; the log has the in-box / SM 6.6 error and refused root signatures.host D3D12 device readywith no in-box / SM 6.6 / root-signature messages, and the title continues into streaming init.621in initialized.rdata(not a zeroed.bssslot).Credits
d354c69.@dokidokinh on GitHub · 2026-12-04 06:51 UTC · original
ReVIctory simply won't run on Windows 10 at all. Both versions 0.2.0 and 0.4.0 do the same thing: they throw an error during the warm-up phase, and even if you force it to run, not a single frame gets rendered.
23acc223fcto6e5fa0db65@ReTerryDavis on GitHub · 2026-12-04 07:03 UTC · original
Thanks for catching the load-time bug on Windows 10!
Exporting a static
D3D12SDKVersion = 621breaks Windows 11 hosts that don't have a localD3D12\D3D12Core.dll(D3D12CreateDevicefails with0x887E0003/D3D12_ERROR_INVALID_REDIST). Instead, I updated this PR to keepD3D12SDKVersioninitialized to0and linkd3d12.dllwith/DELAYLOAD:d3d12.dll(+delayimp.lib) inapps/victory/build.rssoagility::init()runs at the top ofmain()befored3d12.dllloads.Verified live on Windows:
D3D12\D3D12Core.dll: loadsC:\WINDOWS\SYSTEM32\D3D12Core.dll(no0x887E0003).D3D12\D3D12Core.dll(1.621.0):agility::init()writes621before delay-load andd3d12.dllloads the localD3D12\D3D12Core.dll.Merging now!