Build: a GNU (non-MSVC) build exports no D3D12SDKVersion/D3D12SDKPath, so every start asks Windows for SM 6.5 #1899
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA#1899
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@wzl271 on GitHub · 2026-11-29 02:01 UTC · original
What happens
Building with a GNU toolchain (
x86_64-pc-windows-gnu, MinGW-w64) produces avictory.exethat refuses to start:The
D3D12\D3D12Core.dll(Agility 1.614.1) is beside the exe, and the driver is fine — the same folder starts fine with the MSVC-built releasev2026.11.28.03.Why
apps/victory/build.rsexports the two names Direct3D 12 reads, but only for the MSVC target:GNU
ldhas no/EXPORT:switch, so the exe's export directory stays empty (objdump -p victory.exe→Export Directory ... 0000000000000000 00000000) and Windows falls back to its ownd3d12.dll(SM 6.5 on Windows 10 19045).Fix that works here
A module definition file as a link input covers both, and being exported also keeps the two statics from
--gc-sections:After that,
objdump -pshows both names in the export table and the log says:Note
d3d12.dllstays a normal import on this path, so it is loaded beforemain—match_d3d12_core()then only ever confirms the 614 the static already holds, which is harmless (the D3D12 folder here is 1.614.1). Delay-loading would still be nicer for people who drop a different Agility version in place.Environment
stable-x86_64-pc-windows-gnu), MinGW-W64 gcc 16.2.0,CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=gcccargo build --release --locked -p victory --target x86_64-pc-windows-gnu— builds clean apart from warnings@kalberts0089-hash on GitHub · 2026-11-29 08:00 UTC · original
Two things to add to the analysis above, plus a corroborating link test. I don't have MinGW (Windows 11, RTX 4070 Ti, MSVC toolchain), so I couldn't check anything against GNU
lditself.Nothing would catch a GNU build that has lost the exports.
apps/victory/build.rs:11-16has no non-MSVC branch.rust-toolchain.tomllists onlyx86_64-pc-windows-msvc..github/workflows/ci.ymlbuilds only onwindows-latestwith that toolchain. The MSVC builds are fine. The published v2026.11.28.03 exe, my build of that tag and my build of main ate1f2eb6all show the same thing:The error message points at the driver in this case.
apps/victory/src/play.rs:827-829says "it is the graphics driver" wheneverD3D12Core.dllis in the D3D12 folder, so a build with no exports gets the same message as a real driver problem.exported_sdk_version()(apps/victory/src/main.rs:63) already parses a PE export table. Run onstd::fs::read(current_exe()), it tells the two cases apart. With a throwaway test calling it on the exes below and on the release exes:exported_sdk_version()None.definputSome(614)/EXPORT:...,DATASome(614)victory.exeSome(614)e1f2eb6release buildSome(614)Link test with rust-lld (not GNU ld). I used the pinned 1.98.1 toolchain with the
x86_64-pc-windows-gnustd,-Clinker-flavor=ld.lldand stub libs. The test is ano_stdexe declaring the same two statics asmain.rs:45-49andmain.rs:195-200:dumpbin /headersexport directory0 [0]victory-exports.def(the one in this issue)2038 [61], both names/EXPORT:D3D12SDKVersion,DATAetc.2038 [63], both namesThe
/EXPORT:row only shows that lld's MinGW driver passes/options through. It says nothing about GNUld.On delay-loading: with
d3d12.dllas a normal import, a GNU build always asks for 614. Permain.rs:30-43, asking for 614 failed with 0x887E0003 in two cases: with a 1.618/1.620 D3D12 folder, and on Windows 11 22H2 with no folder. That is what0f0ada1fixed for MSVC. A possible route for GNU is a delay-import library fromdlltool -y(--output-delaylib) ford3d12.dll. I haven't tried it.