d3d12: make Agility SDK 1.621.0 an opt-in (D3D12-AGILITY-621) #3330

Open
ubiquitarianism wants to merge 1 commit from upstream-pr/3330 into main
ubiquitarianism commented 2026-12-03 12:43:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ubiquitarianism on 2026-12-03T12:43:27Z.


Claimed in the coordination issue as D3D12-AGILITY-621.

What and why

Support Microsoft DirectX Agility SDK 1.621.0 through d3d12\Get-D3D12.cmd -Version 1.621.0. The installer now chooses the package and DLL hashes together for the selected version, checks Microsoft's Authenticode signature, and stages each invocation's files separately. The default remains 1.614.1 while the reported frame-time improvement awaits an in-game comparison. Microsoft NuGet package

Tested

  • Against current main at b053a1813, the new 1.621.0 cache test tried to download despite the matching DLL hash. Both installer tests pass with the patch.
  • Exercised the Windows launcher, both official NuGet packages, cache reuse, rollback, and overlapping installs in a scratch destination.
  • A no-game probe using Leonida's existing SDK selection code created a D3D12 device and confirmed Windows loaded the app-local 1.621.0 DLL. With 1.614.1 requested, Windows loaded its inbox runtime on the same host.
  • Passed 59 documentation and repository tests, six Agility unit tests, two Agility integration tests, the clean-room scan, and git diff --check.

GPU tested was the default adapter on Windows 11 25H2 (26200.9974). The system has a Radeon RX 6800 and integrated Radeon graphics on AMD driver 32.0.21030.2001. The probe did not record which adapter Windows selected.

AI-assisted by GPT-6.2 Sol with two independent read-only GPT-6.2 Sol reviews. The second review confirmed the staging fix. Simultaneous installs can leave either package's license copy beside the final DLL. The two license copies differ only in list numbering.

Checklist

  • Based on current main when prepared.
  • One topic.
  • Clean-room scan passed.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5626724001 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3330). Originally posted by [ubiquitarianism](https://github.com/ubiquitarianism) on 2026-12-03T12:43:27Z. --- Claimed in the coordination issue as [D3D12-AGILITY-621](https://github.com/ProjectLeonida/mandy/issues/3312#issuecomment-7378616493). ### What and why Support Microsoft DirectX Agility SDK 1.621.0 through `d3d12\Get-D3D12.cmd -Version 1.621.0`. The installer now chooses the package and DLL hashes together for the selected version, checks Microsoft's Authenticode signature, and stages each invocation's files separately. The default remains 1.614.1 while the reported frame-time improvement awaits an in-game comparison. [Microsoft NuGet package](https://www.nuget.org/packages/Microsoft.Direct3D.D3D12/1.621.0) ### Tested - Against current `main` at `b053a1813`, the new 1.621.0 cache test tried to download despite the matching DLL hash. Both installer tests pass with the patch. - Exercised the Windows launcher, both official NuGet packages, cache reuse, rollback, and overlapping installs in a scratch destination. - A no-game probe using Leonida's existing SDK selection code created a D3D12 device and confirmed Windows loaded the app-local 1.621.0 DLL. With 1.614.1 requested, Windows loaded its inbox runtime on the same host. - Passed 59 documentation and repository tests, six Agility unit tests, two Agility integration tests, the clean-room scan, and `git diff --check`. GPU tested was the default adapter on Windows 11 25H2 (26200.9974). The system has a Radeon RX 6800 and integrated Radeon graphics on AMD driver 32.0.21030.2001. The probe did not record which adapter Windows selected. AI-assisted by GPT-6.2 Sol with two independent read-only GPT-6.2 Sol reviews. The second review confirmed the staging fix. Simultaneous installs can leave either package's license copy beside the final DLL. The two license copies differ only in list numbering. ### Checklist - [x] Based on current `main` when prepared. - [x] One topic. - [x] Clean-room scan passed.
merzleckeier commented 2026-12-03 12:48:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T12:48:39Z.


I checked 57029eff on b053a181. The two official NuGet archives match the pinned package SHA-256 values, and their extracted x64 DLLs match both pinned DLL hashes.

The installer still treats some paths as PowerShell patterns. In PowerShell 7, with -To ".../build [SDK]/D3D12", both versions skipped a matching cached DLL and tried the download. A fresh install using the official archive then failed at the package hash step. Without -To, a checkout whose name contains [SDK] failed earlier at Resolve-Path. The 1.614.1 -To behavior also reproduced on current main.

A local change to use -LiteralPath for Resolve-Path, Test-Path, Get-FileHash, Get-AuthenticodeSignature, and Get-Item passed the cache and fresh-install cases, including the default destination in a bracketed checkout. I used the actual package and DLL bytes with the downloader and signature response stubbed. In the simulated signature rejection, the installed DLL and license remained intact and the temporary files were removed. The Authenticode trust check itself was outside this PowerShell 7 test.

AI-assisted (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7378872820 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3330#issuecomment-7378872820). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T12:48:39Z. --- I checked `57029eff` on `b053a181`. The two official NuGet archives match the pinned package SHA-256 values, and their extracted x64 DLLs match both pinned DLL hashes. The installer still treats some paths as PowerShell patterns. In PowerShell 7, with `-To ".../build [SDK]/D3D12"`, both versions skipped a matching cached DLL and tried the download. A fresh install using the official archive then failed at the package hash step. Without `-To`, a checkout whose name contains `[SDK]` failed earlier at `Resolve-Path`. The 1.614.1 `-To` behavior also reproduced on current main. A local change to use `-LiteralPath` for `Resolve-Path`, `Test-Path`, `Get-FileHash`, `Get-AuthenticodeSignature`, and `Get-Item` passed the cache and fresh-install cases, including the default destination in a bracketed checkout. I used the actual package and DLL bytes with the downloader and signature response stubbed. In the simulated signature rejection, the installed DLL and license remained intact and the temporary files were removed. The Authenticode trust check itself was outside this PowerShell 7 test. AI-assisted (Codex).
EdenBendheim commented 2026-12-03 14:13:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by EdenBendheim on 2026-12-03T14:13:11Z.


RUN — RTX 3090 (24 GiB), Agility SDK compatibility, one 300 s gate per arm. 1.614.1 staged: PASS (inbox runtime actually loaded); 1.621.0 staged: FAIL (present_gap, app-local runtime actually loaded).

  • Exact head 57029effa787b07ba00529c636c2f300d838d20b already contains main b053a1813c8980c4357d51bbe6e69a35dc8c476c (local merge no-op). The only changes are installer, wrapper, README and installer test, so both arms used the same previously verified main renderer executable, SHA-256 8ddb36f22fd4c0883f3d633cb9317f40c26d5b24c73302115939554a8895d576 and identical diagnostics,dlss,mimalloc stamp, verified before and after each arm.
  • RTX 3090 driver 610.88, Windows 11 Home 26200, Ryzen 9 5900X, 32 GiB RAM (profile L); stock Series S stretch, no FG/precompile, same initial hash-matched private pipeline-cache seed and save template, same gate and memory stops.
  • Both official Microsoft NuGet package SHA-256 values and extracted DLL SHA-256 values matched the installer pins. Both DLL Authenticode signatures were Valid, Microsoft Corporation. Fresh installations and subsequent cache reuse succeeded in separate ordinary paths. The two installer regression tests passed on head and both failed when directed at main's installer (unexpected download). Pinned Rust 1.98.1 Agility tests: 6 unit + 2 integration passed; clean-room scan and diff check passed. The previously reported bracketed-path issue was not retested.
MEASURED (one run each) 1.614.1 staged 1.621.0 staged
Actual loaded D3D12Core.dll from owned PID System32: 10.0.26100.9818 app-local: 1.621.0.0.20261130.2
Gate verdict PASS FAIL: present_gap
World seconds / actual process exit 304.100 / 0 302.035 / 0
Present intervals, world+60 s 2350 731
Median / p5 FPS 14.46 / 3.88 12.75 / 1.11
p95 / p99 frame time (ms) 257.42 / 658.29 899.62 / 9566.42
Longest world present gap (s) 6.54 11.14
Draws/frame median 7230 6105
Pipeline-busy frame samples (world+60 s) 0/45 23/32
Peak / end private memory (MiB) 23047 / 22909 22474 / 22226
Minimum commit available (MiB) 6394 6993
Peak VRAM (MiB) / budget 6723 / 23558 5918 / 23558

The 614 arm did not load the 1.614.1 app-local DLL: its observed System32 hash matched the inbox file. The 621 arm's observed module hash matched the explicitly installed 1.621.0 DLL and the runtime reported requesting SDK 1.621; the default 614 selection path is silent in code. Both reached the target stop, saved the cache, suspended the title and exited cleanly without killing; zero crashes, device-loss indicators or ERROR lines. Native placement occurred once each, but only 8/32 and 16/26 location samples were within 1 m, respectively; later placement was overwritten in both. Neither held the intended busy location for the full run. The 621 gate failed the documented >10 s present-gap limit, despite clean termination.

This verifies the opt-in actually selects the requested newer SDK on this host, but the single 621 gate did not pass. Ongoing pipeline activity and different workloads/placement make this an observation, not evidence that the SDK itself caused the gap or any speedup/slowdown. This is not a balanced ABBA measurement; a separately warmed, matched repeat would be needed to establish reproducibility or frame-time attribution.

AI-assisted: GPT-6.2 Sol, independently recomputed raw timings, module metadata and counts by a separate GPT-6.2 Sol parent agent.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7381083483 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3330#issuecomment-7381083483). Originally posted by [EdenBendheim](https://github.com/EdenBendheim) on 2026-12-03T14:13:11Z. --- **RUN — RTX 3090 (24 GiB), Agility SDK compatibility, one 300 s gate per arm. 1.614.1 staged: PASS (inbox runtime actually loaded); 1.621.0 staged: FAIL (`present_gap`, app-local runtime actually loaded).** - Exact head `57029effa787b07ba00529c636c2f300d838d20b` already contains main `b053a1813c8980c4357d51bbe6e69a35dc8c476c` (local merge no-op). The only changes are installer, wrapper, README and installer test, so both arms used the same previously verified main renderer executable, SHA-256 `8ddb36f22fd4c0883f3d633cb9317f40c26d5b24c73302115939554a8895d576` and identical `diagnostics,dlss,mimalloc` stamp, verified before and after each arm. - RTX 3090 driver 610.88, Windows 11 Home 26200, Ryzen 9 5900X, 32 GiB RAM (profile L); stock Series S stretch, no FG/precompile, same initial hash-matched private pipeline-cache seed and save template, same gate and memory stops. - Both official Microsoft NuGet package SHA-256 values and extracted DLL SHA-256 values matched the installer pins. Both DLL Authenticode signatures were Valid, Microsoft Corporation. Fresh installations and subsequent cache reuse succeeded in separate ordinary paths. The two installer regression tests passed on head and both failed when directed at main's installer (unexpected download). Pinned Rust 1.98.1 Agility tests: 6 unit + 2 integration passed; clean-room scan and diff check passed. The previously reported bracketed-path issue was not retested. | MEASURED (one run each) | 1.614.1 staged | 1.621.0 staged | |---|---:|---:| | Actual loaded D3D12Core.dll from owned PID | System32: 10.0.26100.9818 | app-local: 1.621.0.0.20261130.2 | | Gate verdict | PASS | FAIL: present_gap | | World seconds / actual process exit | 304.100 / 0 | 302.035 / 0 | | Present intervals, world+60 s | 2350 | 731 | | Median / p5 FPS | 14.46 / 3.88 | 12.75 / 1.11 | | p95 / p99 frame time (ms) | 257.42 / 658.29 | 899.62 / 9566.42 | | Longest world present gap (s) | 6.54 | 11.14 | | Draws/frame median | 7230 | 6105 | | Pipeline-busy frame samples (world+60 s) | 0/45 | 23/32 | | Peak / end private memory (MiB) | 23047 / 22909 | 22474 / 22226 | | Minimum commit available (MiB) | 6394 | 6993 | | Peak VRAM (MiB) / budget | 6723 / 23558 | 5918 / 23558 | The 614 arm **did not load the 1.614.1 app-local DLL**: its observed System32 hash matched the inbox file. The 621 arm's observed module hash matched the explicitly installed 1.621.0 DLL and the runtime reported requesting SDK 1.621; the default 614 selection path is silent in code. Both reached the target stop, saved the cache, suspended the title and exited cleanly without killing; zero crashes, device-loss indicators or ERROR lines. Native placement occurred once each, but only 8/32 and 16/26 location samples were within 1 m, respectively; later placement was overwritten in both. Neither held the intended busy location for the full run. The 621 gate failed the documented >10 s present-gap limit, despite clean termination. **This verifies the opt-in actually selects the requested newer SDK on this host, but the single 621 gate did not pass.** Ongoing pipeline activity and different workloads/placement make this an observation, not evidence that the SDK itself caused the gap or any speedup/slowdown. This is not a balanced ABBA measurement; a separately warmed, matched repeat would be needed to establish reproducibility or frame-time attribution. AI-assisted: GPT-6.2 Sol, independently recomputed raw timings, module metadata and counts by a separate GPT-6.2 Sol parent agent.
OreoFR commented 2026-12-03 17:19:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-12-03T17:19:44Z.


RUN (in game), Agility SDK 1.621.0 vs Windows' own D3D12: no measurable fps gain on this card (MEASURED n=2, PROVISIONAL).

  • Base: main b053a1813…acb0657e2 lineage, test head 4412cca0a = origin/main + this PR (clean merge), leonida.exe built with build-nvidia.ps1 (diag).
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Windows 11 build 26300.
  • Profile: Series S, -NoDlss -NoFrameGen -PrecompileUsed, LEONIDA_WINDOWS_BAR_MB=0, LEONIDA_TEXTURE_BUDGET_MB=1024, scripted walk, 300 s in the world, stats over the last 240 s. One warm-up run (not counted), then A B B A in one session, same exe and same data template.
  • A = no target\diag\D3D12\ folder. B = Get-D3D12.cmd -Version 1.621.0 (hash + signature checks passed).
  • Loaded DLL, read from the running process 60 s into the world:
    • A: Windows' own D3D12Core.dll, 10.0.26100.10068;
    • B: target\diag\D3D12\D3D12Core.dll, 1.621.0.0.20261130.2.
Run Runtime fps median frame frames > 100 ms pauses > 1 s device lost
A1 Windows 27.28 35.4 ms 2 0 no
B1 Agility 1.621.0 26.48 36.8 ms 3 0 no
B2 Agility 1.621.0 26.95 36.2 ms 3 0 no
A2 Windows 25.53 38.7 ms 2 0 no

Reading:

  • fps: A averages 26.41 fps and B 26.72 (+0.31, +1.2 %). The two A runs differ by 1.75 fps between themselves, so that gap is inside the run-to-run noise.
  • Frame pacing: median frame time is −0.55 ms with B, and frames over 100 ms are 2 vs 3 per run. No difference that stands out.
  • Picture: screenshots at the same spot show no visible difference, no new artifacts in either variant.
  • Stability: no device loss, no crash in any run.
  • Display: no Kernel-Power 566 (display off) event inside any run's window, so the screen stayed on throughout.

Caveats:

  • This is one card, no frame generation, no hardware RT and no DLSS. The player report (RTX 5080) used DLSS Balanced, hardware RT and 2× frame generation, plus other local renderer changes, so a gain on that path is not ruled out by this run.
  • Frames over 50 ms were not counted (main has no such counter).

AI-assisted (oreofr-agent, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7386332615 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3330#issuecomment-7386332615). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-12-03T17:19:44Z. --- **RUN (in game), Agility SDK 1.621.0 vs Windows' own D3D12**: no measurable fps gain on this card (MEASURED n=2, PROVISIONAL). - **Base:** main `b053a1813`…`acb0657e2` lineage, test head `4412cca0a` = origin/main + this PR (clean merge), `leonida.exe` built with `build-nvidia.ps1` (diag). - **Machine:** RTX 4070 Laptop 8 GB, NVIDIA 621.40, Windows 11 build 26300. - **Profile:** Series S, `-NoDlss -NoFrameGen -PrecompileUsed`, `LEONIDA_WINDOWS_BAR_MB=0`, `LEONIDA_TEXTURE_BUDGET_MB=1024`, scripted walk, 300 s in the world, stats over the last 240 s. One warm-up run (not counted), then A B B A in one session, same exe and same data template. - **A** = no `target\diag\D3D12\` folder. **B** = `Get-D3D12.cmd -Version 1.621.0` (hash + signature checks passed). - **Loaded DLL, read from the running process 60 s into the world:** - A: Windows' own `D3D12Core.dll`, 10.0.26100.10068; - B: `target\diag\D3D12\D3D12Core.dll`, 1.621.0.0.20261130.2. | Run | Runtime | fps | median frame | frames > 100 ms | pauses > 1 s | device lost | |---|---|---|---|---|---|---| | A1 | Windows | 27.28 | 35.4 ms | 2 | 0 | no | | B1 | Agility 1.621.0 | 26.48 | 36.8 ms | 3 | 0 | no | | B2 | Agility 1.621.0 | 26.95 | 36.2 ms | 3 | 0 | no | | A2 | Windows | 25.53 | 38.7 ms | 2 | 0 | no | **Reading:** - **fps:** A averages 26.41 fps and B 26.72 (+0.31, +1.2 %). The two A runs differ by 1.75 fps between themselves, so that gap is inside the run-to-run noise. - **Frame pacing:** median frame time is −0.55 ms with B, and frames over 100 ms are 2 vs 3 per run. No difference that stands out. - **Picture:** screenshots at the same spot show no visible difference, no new artifacts in either variant. - **Stability:** no device loss, no crash in any run. - **Display:** no Kernel-Power 566 (display off) event inside any run's window, so the screen stayed on throughout. **Caveats:** - This is one card, no frame generation, no hardware RT and no DLSS. The player report (RTX 5080) used DLSS Balanced, hardware RT and 2× frame generation, plus other local renderer changes, so a gain on that path is not ruled out by this run. - Frames over 50 ms were not counted (main has no such counter). AI-assisted (oreofr-agent, Claude Opus 5.5).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3330:upstream-pr/3330'
git switch 'upstream-pr/3330'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/3330'
git switch 'upstream-pr/3330'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3330'
git switch 'upstream-pr/3330'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3330'
git switch 'main'
git merge --squash 'upstream-pr/3330'
git switch 'main'
git merge --ff-only 'upstream-pr/3330'
git switch 'main'
git merge 'upstream-pr/3330'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!3330
No description provided.