Agility SDK: delay-load d3d12.dll, writable D3D12SDKVersion, fall back to the OS runtime (part a of #77) #139
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/gamingwithhomie--larp!139
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-139"
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?
@kadiratesdev on GitHub · 2026-12-05 19:31 UTC · original
kadiratesdev:pr/split-a-agility-loader→main· +130 −2 · 5 files · 2 commits · merged 2026-12-06 00:07 UTCThis is part (a) of the split @gamingwithhomie asked for on #77. Part (b) is already up as #126. Part (c) (stack-copy rewrite and watchdog tools) follows as a separate PR. Based on the same
mainas #126 (334be94). Independent of (b) and (c), except that it keeps main's existing/DELAYLOAD:winmm.dll(from #87) next to the new/DELAYLOAD:d3d12.dll.Do not merge before the built-binary startup smoke test. That run is in progress on an RTX 3080 Ti / Windows 11 machine; I will post the full results as a comment on this PR. Early results from a scratch copy of
bin(realCNF-Larp\binwas not overwritten) are already in, but the checklist is not finished.What is in it
build.rsdelay-loadsd3d12.dllso Windows readsD3D12SDKVersionon first use, afteragility::choose()has run at the start ofmain.D3D12SDKVersionis anAtomicU32(same in-memory layout as the previousu32constant, but writable).agility::choose():LARP_AGILITY=0: asks for Windows' own runtime (the version System32'sD3D12Core.dllexports; 4 if that cannot be read).D3D12\D3D12Core.dllbeside the exe: same OS fallback, instead of a loader that makes no device.D3D12Core.dllof another Agility version: asks for that version, instead of0x887E0003.D3D12\): OS runtime, with a log line saying the file is no Agility SDK runtime.LARP_AGILITYinenvironment-variables.md, and a short note under device-removed troubleshooting. TheLARP_AGILITY=0bisect step is not in #126, so it lives here.Default behaviour of a normal start with a matching
bin\D3D12\D3D12Core.dllis unchanged, apart fromd3d12.dllloading on first use rather than at process start.Testing
Cross-built for
x86_64-pc-windows-msvc. Same warning set as currentmain(the extralarp-hleunreachable-pattern /renamedwarnings are already onmainafter the first-person merge).cargo test --release --workspaceunder Wine: everything passes except the one test that also fails onmain:larp-game prompts::font::...within_its_advance(needs a host font Wine lacks). The three newagilityunit tests pass.Built-binary startup smoke test: in progress, not finished. Scratch folder
CNF-Larp\smoke\, sameLARP_CACHE_DIR/LARP_DATA_DIRas the real install, new exe names so the realbin\larp.exe/larp-tr.exewere not touched. So far:D3D12Core.dll)D3D12 runtime:line,device15=true,D3D12Core.dllloaded from the scratchbin\D3D12. Device created, presents at 60 fps.D3D12\D3D12 runtime: asking Windows for SDK version … (no D3D12\D3D12Core.dll beside larp.exe),D3D12Core.dllloaded fromC:\Windows\SYSTEM32. Device created, presents at 60 fps.D3D12\)SDK version 614line and a normal start. Main's exe should fail with0x887E0003.D3D12\(System32's 10.0.x)LARP_AGILITY=0with a normal 1.620 folderD3D12Core.dllloaded.larp-a.exe configandlarp-a.exe nv-profileboth exited 0.I will also run main's exe on cases 2 and 3 for comparison, then post the finished table here.
@copilot-pull-request-reviewer[bot] on GitHub · 2026-12-05 19:31 UTC · original · reviewed
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
@gamingwithhomie on GitHub · 2026-12-05 20:43 UTC · original
Holding per your own note (built-binary startup smoke test not yet posted). Post the RTX 3080 Ti checklist results and we will test-merge part (a) immediately - parts (b) #126 is already merged. Thank you!
@kadiratesdev on GitHub · 2026-12-05 22:43 UTC · original
Built-binary startup smoke test, RTX 3080 Ti (driver 621.47), Windows 11 build 26300 (System32
D3D12Core.dll10.0.26100.10068, which reports SDK version 616).Setup: this PR's head
a036783, cross-built release, run from a scratch copy ofbinaslarp-a.exe. ScratchLARP_DATA_DIRfor cases 3 to 5, so no real saves were used; the shared shader cache was used. Every run wasrun <game> --execute --console series-s -- -skipToIIS. Cases 3 to 5 were closed through the window (the close button'sSC_CLOSE) and exited with code 0. Cases 1 and 2 ran the day before; my script sent a bareWM_CLOSE, which the title ignores, so those two were ended by hand. That says nothing about this PR. "Main" below is an earlier main build without this change (export fixed at 620).a036783)D3D12\D3D12Core.dllD3D12 runtime:line.D3D12Core.dllloaded frombin\D3D12. Device made,device15=true. Presents at 60 fps.D3D12\folderD3D12 runtime: asking Windows for SDK version 616 (no D3D12\D3D12Core.dll beside larp.exe). LoadedC:\Windows\SYSTEM32\D3D12Core.dll. Device made,device15=false. Presents at 60 fps.host device: no D3D12 device ... (0x887E0003), then the title throws0x887e0003(D3D12SerializeVersionedRootSignature) and the process ends with0xE06D7363after about 2 s.D3D12Core.dllinD3D12\D3D12 runtime: asking Windows for SDK version 614 (the version of D3D12\D3D12Core.dll). Windows picked the newer System32 runtime (SYSTEM32\D3D12Core.dll), not the 1.614.1 file. Device made,device15=false. Frames presented (53.5 fps in the first 5 s report).0x887E0003failure and exit as case 2.D3D12Core.dllcopied intoD3D12\D3D12 runtime: asking Windows for SDK version 616 (D3D12\D3D12Core.dll is no Agility SDK runtime). LoadedSYSTEM32\D3D12Core.dll. Device made,device15=false. 60 fps.LARP_AGILITY=0, normal 1.620 folderD3D12 runtime: asking Windows for SDK version 616 (LARP_AGILITY=0). LoadedSYSTEM32\D3D12Core.dll. Device made,device15=false. 60 fps.configandnv-profileexit 0.Not tested: