Device-removal bisect switches, Agility SDK fallback, safer stack walks and watchdog tools (ported from VIctory-NVIDIA) #77

Closed
github-bot wants to merge 10 commits from github-bot/gh-77 into main AGit
Owner

@⁠kadiratesdev on GitHub · 2026-12-05 17:32 UTC · original
kadiratesdev:pr/victory-hardening → main · +593 −18 · 15 files · 10 commits · closed without merging

Several users hit exit -2005270523 (DXGI_ERROR_DEVICE_REMOVED) minutes into play on NVIDIA, e.g. #42 (idling at Bar 919, <10 min) and an RTX 3080 Ti here, with the log reading
no breadcrumbs (... 0x887A0004); device removed: ... (0x887A0005).
I have not found the root cause yet. This PR does not claim to fix it. It makes the crash bisectable from a user's machine, fixes a misleading line in the report, and ports some robustness pieces from VIctory-NVIDIA. Everything that changes behaviour is opt-in, except the d3d12.dll delay-load and the stack-walk hardening.

Diagnosis aids

  • Removal report: without LARP_D3D12_DRED, GetAutoBreadcrumbsOutput returns DXGI_ERROR_UNSUPPORTED (0x887A0004). That read like the removal's reason, but it is not. The report now says breadcrumbs are off and names the switch. The reason is the 0x887A0005 that follows it.
  • LARP_BYTE_VIEWS=0: every buffer SRV is made by element (CreateShaderResourceView) instead of ID3D12Device15::TryCreateShaderResourceView byte-offset views.
  • LARP_AGILITY=0: runs on Windows' own D3D12 runtime instead of the bundled 1.620. D3D12SDKVersion is now writable, and agility::choose sets it first thing in main. build.rs delay-loads d3d12.dll so Windows reads the value set there. As side effects:
    • a missing D3D12\ folder falls back to the system runtime instead of failing to make a device;
    • a D3D12Core.dll of another version is asked for by its own version, instead of 0x887E0003.
      Ported from VIctory-NVIDIA 0f0ada19 and e69e39c5.
  • LARP_SHADER_REPLACE=0: runs with no replacement shaders. Before, the only way was to move the folder, and a missing folder stops larp run.
  • TDR settings (TdrLevel / TdrDelay / TdrDdiDelay) are logged when the device is made, with a warning for level 0 or 1. Ported from VIctory-NVIDIA 474f949c, tests included.
  • The docs get a bisect recipe under exit -2005270523. Order: DRED first, then each switch alone.

Robustness

  • Stack walks: LARP_STACKS walked each suspended thread's live stack, and RtlVirtualUnwind can fault reading through a stale frame register or uncommitted stack pages. In VIctory-NVIDIA that ended the process (43e89ba1). Now:
    • frames_of copies the stack with ReadProcessMemory while the thread is suspended and unwinds the copy;
    • the crash handler's live walk stops at a frame register outside the stack.
  • LARP_STACKS_AT_KILL=1: on the title watchdog's write to address 0 (+0x23cf683), dumps every thread's stack to show what the frame loop was stuck in. Ported from VIctory-NVIDIA c6d5c4d7.
  • LARP_TITLE_WATCHDOG=0: sets the watchdog's quit flag (bit 0 at title+0x71b6340), only on 1.0.2.1 and only when the trap bytes match. A 30 s stall outside the pipeline waits that larp already feeds is then not ended as a crash. Opt-in, because a real hang then stays a hang. Ported from VIctory-NVIDIA aee4c45a.

Not ported, and why

  • VIctory's texture-budget guards (fcec53bd, 3fed39f8, 11cb2ddc). larp's cardmem / texheap / mips rewrite has no small-copy regrowth or room() path to guard. It already aims under budget minus max(budget/16, 256 MB).
  • FOLD_FORCE_MS (930f25ce). larp has no equivalent of VIctory's submit line (queue/behind.rs).
  • HELD_FRAME_MS (62ddb99d). It conflicts with larp's deliberate "wait for every pipeline while feeding the heartbeat" on 1.0.2.1.

Testing

  • Cross-built for x86_64-pc-windows-msvc. No new warnings compared with main (84f8870).
  • cargo test --workspace --release under Wine:
    • main: 152 passed, 1 failed;
    • this branch: 160 passed, 1 failed (8 new tests).
    • The one failure on both is larp-game prompts::font::...within_its_advance, which needs a host font Wine lacks.
  • Run in-game on the affected RTX 3080 Ti with LARP_D3D12_DRED=1: the device was removed again after ~19 min, and the DRED report now lands in the log. I will post the analysis and the switch results here.
**@⁠kadiratesdev** on GitHub · 2026-12-05 17:32 UTC · [original](https://github.com/gamingwithhomie/larp/pull/77) `kadiratesdev:pr/victory-hardening` → `main` · +593 −18 · 15 files · 10 commits · closed without merging Several users hit `exit -2005270523` (DXGI_ERROR_DEVICE_REMOVED) minutes into play on NVIDIA, e.g. #42 (idling at Bar 919, <10 min) and an RTX 3080 Ti here, with the log reading `no breadcrumbs (... 0x887A0004); device removed: ... (0x887A0005)`. I have not found the root cause yet. This PR does **not** claim to fix it. It makes the crash bisectable from a user's machine, fixes a misleading line in the report, and ports some robustness pieces from VIctory-NVIDIA. Everything that changes behaviour is opt-in, except the d3d12.dll delay-load and the stack-walk hardening. ## Diagnosis aids - **Removal report:** without `LARP_D3D12_DRED`, `GetAutoBreadcrumbsOutput` returns DXGI_ERROR_UNSUPPORTED (0x887A0004). That read like the removal's reason, but it is not. The report now says breadcrumbs are off and names the switch. The reason is the 0x887A0005 that follows it. - **`LARP_BYTE_VIEWS=0`:** every buffer SRV is made by element (`CreateShaderResourceView`) instead of `ID3D12Device15::TryCreateShaderResourceView` byte-offset views. - **`LARP_AGILITY=0`:** runs on Windows' own D3D12 runtime instead of the bundled 1.620. `D3D12SDKVersion` is now writable, and `agility::choose` sets it first thing in `main`. `build.rs` delay-loads `d3d12.dll` so Windows reads the value set there. As side effects: - a missing `D3D12\` folder falls back to the system runtime instead of failing to make a device; - a `D3D12Core.dll` of another version is asked for by its own version, instead of 0x887E0003. Ported from VIctory-NVIDIA 0f0ada19 and e69e39c5. - **`LARP_SHADER_REPLACE=0`:** runs with no replacement shaders. Before, the only way was to move the folder, and a missing folder stops `larp run`. - **TDR settings** (`TdrLevel` / `TdrDelay` / `TdrDdiDelay`) are logged when the device is made, with a warning for level 0 or 1. Ported from VIctory-NVIDIA 474f949c, tests included. - The docs get a bisect recipe under `exit -2005270523`. Order: DRED first, then each switch alone. ## Robustness - **Stack walks:** `LARP_STACKS` walked each suspended thread's live stack, and `RtlVirtualUnwind` can fault reading through a stale frame register or uncommitted stack pages. In VIctory-NVIDIA that ended the process (43e89ba1). Now: - `frames_of` copies the stack with `ReadProcessMemory` while the thread is suspended and unwinds the copy; - the crash handler's live walk stops at a frame register outside the stack. - **`LARP_STACKS_AT_KILL=1`:** on the title watchdog's write to address 0 (+0x23cf683), dumps every thread's stack to show what the frame loop was stuck in. Ported from VIctory-NVIDIA c6d5c4d7. - **`LARP_TITLE_WATCHDOG=0`:** sets the watchdog's quit flag (bit 0 at title+0x71b6340), only on 1.0.2.1 and only when the trap bytes match. A 30 s stall outside the pipeline waits that larp already feeds is then not ended as a crash. Opt-in, because a real hang then stays a hang. Ported from VIctory-NVIDIA aee4c45a. ## Not ported, and why - **VIctory's texture-budget guards** (fcec53bd, 3fed39f8, 11cb2ddc). larp's `cardmem` / `texheap` / `mips` rewrite has no small-copy regrowth or `room()` path to guard. It already aims under budget minus max(budget/16, 256 MB). - **`FOLD_FORCE_MS`** (930f25ce). larp has no equivalent of VIctory's submit line (`queue/behind.rs`). - **`HELD_FRAME_MS`** (62ddb99d). It conflicts with larp's deliberate "wait for every pipeline while feeding the heartbeat" on 1.0.2.1. ## Testing - Cross-built for x86_64-pc-windows-msvc. No new warnings compared with main (84f8870). - `cargo test --workspace --release` under Wine: - main: 152 passed, 1 failed; - this branch: 160 passed, 1 failed (8 new tests). - The one failure on both is `larp-game prompts::font::...within_its_advance`, which needs a host font Wine lacks. - Run in-game on the affected RTX 3080 Ti with `LARP_D3D12_DRED=1`: the device was removed again after ~19 min, and the DRED report now lands in the log. I will post the analysis and the switch results here.
A switch to bisect host device removals (0x887A0005) on NVIDIA: with it the
layer takes the ID3D12Device::CreateShaderResourceView path it takes on a
device without ID3D12Device15 / D3D12_OPTIONS22. Default unchanged.
Before, the only way to run without replacements was to move the folder,
and a missing folder stops larp run at its start. With 0 (or off/none) no
replacement is read; pipelines are named by their code, so the ones made
from translations get their own cache entries. Default unchanged.
D3D12SDKVersion becomes writable and agility::choose sets it first thing in
main; build.rs delay-loads d3d12.dll so Windows reads the value set there
(imported the usual way it is loaded before main and reads the constant).

- LARP_AGILITY=0: System32's runtime, by the version its D3D12Core.dll
  exports, to tell a device removal that goes with the 1.620 runtime (and
  byte-offset views, which then fall back to by-element) from one that
  does not.
- No D3D12\D3D12Core.dll beside larp.exe: Windows' own runtime instead of
  a loader that makes no device.
- A D3D12Core.dll of another version: that version, instead of 0x887E0003.

Ported from VIctory-NVIDIA (0f0ada19, e69e39c5), where an RTX 3080 Ti and
an RTX 5080 on Windows 11 were refused Direct3D 12 with a mismatched file.
TdrLevel 0 or 1 turns a GPU hang into a frozen PC or a blue screen instead of
a device removal the layer can report; the log names TdrLevel, TdrDelay and
TdrDdiDelay so a removal report says whether a timeout reset was possible.
Ported from VIctory-NVIDIA (474f949c).
Without LARP_D3D12_DRED, GetAutoBreadcrumbsOutput answers
DXGI_ERROR_UNSUPPORTED and the report read "no breadcrumbs (... not
supported ... 0x887A0004)", which users (and we) took for the removal's
reason. The reason is the 0x887A0005 that follows; the report now says the
data is off and which switch turns it on.
LARP_STACKS walked each suspended thread's live stack with RtlVirtualUnwind,
which reads through a frame register that can hold anything where the
thread was stopped, or stack pages the thread never committed: in
VIctory-NVIDIA the same walk ended the process with an access violation
inside ntdll (its sampling profiler, 43e89ba1).

frames_of now copies the stack (from rsp up, at most 512 KiB, zeros after)
with ReadProcessMemory while the thread is suspended, resumes it, and
unwinds the copy (crash::unwind_copy). unwind_into, the crash handler's
live walk, stops where a frame register lies outside the thread's stack.
Ported from VIctory-NVIDIA 43e89ba1.
The title's watchdog ends a run whose frame loop stopped for 30 s by
writing to address 0 (+0x23cf683, docs/troubleshooting-and-crashes.md).
The first-chance report names only the watchdog thread; with the switch
the first such write also dumps every other thread's stack, to name what
the frame loop was stuck in. Off by default. Ported from VIctory-NVIDIA
c6d5c4d7 (there diagnostics-only; larp's dump_stacks is in every build).
The watchdog's quit flag (bit 0 at title+0x71b6340) is set every half
second, only on 1.0.2.1 and only when the trap bytes are where they were
found. larp already feeds the heartbeat while draws wait for pipelines;
this covers stalls outside those waits. Opt-in. Ported from VIctory-NVIDIA
aee4c45a (default-on there).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 17:36:20 +00:00
Author
Owner

@⁠copilot-pull-request-reviewer[bot] on GitHub · 2026-12-05 17:32 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.

**@⁠copilot-pull-request-reviewer[bot]** on GitHub · 2026-12-05 17:32 UTC · [original](https://github.com/gamingwithhomie/larp/pull/77#pullrequestreview-6204716426) · **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.
Author
Owner

@⁠Proudnoob4 on GitHub · 2026-12-05 18:29 UTC · original

Data for the exit -2005270523 hunt from an RTX 4080 / i5-13600K / 32 GB / Windows 10 19045, Series X,
DLSS, no frame generation:

1. The NVIDIA shader heap 0x001ABC0F = 0x40000000 (1024 MiB, the value larp nv-profile --mb 1024
sets): 4 removals in 4 runs without it, then a 47-minute run with no removal.

  • Without it: device removed after about 3-7 min in the world, every run.
  • With it: 47 min, ended by the title watchdog (below), not a removal.
  • Caveat: a first "I applied it" was false. Profile Inspector saved the profile and both exes but
    0 settings. I read the driver DRS through NVAPI (NvAPI_DRS_FindApplicationByName +
    NvAPI_DRS_GetSetting) to see it; writing it back needs admin (NvAPI_DRS_SetSetting returns
    -137 otherwise). People reporting "the fix did not work" may never have had it applied.
    • A small check/apply script (PowerShell + C#, NVAPI ids from nvapi_interface.h) can be
      shared if useful.
  • What the setting does, measured with a probe exe run as larp.exe (profile) vs another name:
    • device creation maps an extra 8.01 GB view (MEM_MAPPED) into the process;
    • no VRAM (QueryVideoMemoryInfo local usage 0.009 GB both) and no commit charge;
    • GPU address space is unchanged: MaxGPUVirtualAddressBitsPerProcess 40, and 768 GB reservable
      with CreateReservedResource either way.
  • Running GPU VA out with reserved buffers removes the device with reason 0x887A0020
    (DRIVER_INTERNAL_ERROR), not the 0x887A0005 larp reports. So it is not plain GPU VA exhaustion.
    This fits the shader-heap reading: the heap fills as new pipelines are made, and this title makes
    95k+ of them.

2. The watchdog end at 30 s.

  • The 47-min run ended with first-chance 0xc0000005 (write 0x0) at title+0x2215c35, from a thread
    that starts at +0x2215ea0, 32 s after frames stopped.
    • That differs from the +0x23cf683 in this PR; our image hash is b99f876b74d4a77f.
  • During that stall: GPU 0%, hard faults ~150/s, no larp thread waiting.
  • LARP_STALL_S=8 gets the every-thread dump (at 3x = 24 s) before the watchdog fires.

3. Memory on a 32 GB PC.

  • Sampled every 5 s for the whole 47-min run:
    • larp private bytes: median 31 GB, max 36 GB;
    • working set: about 13 GB;
    • available RAM: median 2.1 GB;
    • hard faults: median 2,249/s, peak 108,735/s.
  • The audio stutters from mid-run line up with that paging.

This PR merges cleanly onto main (0f03265) together with #76. We carry it, with the shader heap set,
in https://github.com/Proudnoob4/larp and will report the switch and DRED results from this machine.

**@⁠Proudnoob4** on GitHub · 2026-12-05 18:29 UTC · [original](https://github.com/gamingwithhomie/larp/pull/77#issuecomment-7443176041) Data for the `exit -2005270523` hunt from an RTX 4080 / i5-13600K / 32 GB / Windows 10 19045, Series X, DLSS, no frame generation: **1. The NVIDIA shader heap `0x001ABC0F = 0x40000000` (1024 MiB, the value `larp nv-profile --mb 1024` sets): 4 removals in 4 runs without it, then a 47-minute run with no removal.** - Without it: device removed after about 3-7 min in the world, every run. - With it: 47 min, ended by the title watchdog (below), not a removal. - Caveat: a first "I applied it" was false. Profile Inspector saved the profile and both exes but 0 settings. I read the driver DRS through NVAPI (`NvAPI_DRS_FindApplicationByName` + `NvAPI_DRS_GetSetting`) to see it; writing it back needs admin (`NvAPI_DRS_SetSetting` returns -137 otherwise). People reporting "the fix did not work" may never have had it applied. - A small check/apply script (PowerShell + C#, NVAPI ids from `nvapi_interface.h`) can be shared if useful. - What the setting does, measured with a probe exe run as `larp.exe` (profile) vs another name: - device creation maps an extra **8.01 GB view** (MEM_MAPPED) into the process; - no VRAM (`QueryVideoMemoryInfo` local usage 0.009 GB both) and no commit charge; - GPU address space is unchanged: `MaxGPUVirtualAddressBitsPerProcess` 40, and 768 GB reservable with `CreateReservedResource` either way. - Running GPU VA out with reserved buffers removes the device with reason **`0x887A0020`** (DRIVER_INTERNAL_ERROR), not the `0x887A0005` larp reports. So it is not plain GPU VA exhaustion. This fits the shader-heap reading: the heap fills as new pipelines are made, and this title makes 95k+ of them. **2. The watchdog end at 30 s.** - The 47-min run ended with first-chance `0xc0000005` (write 0x0) at title+0x2215c35, from a thread that starts at +0x2215ea0, 32 s after frames stopped. - That differs from the +0x23cf683 in this PR; our image hash is b99f876b74d4a77f. - During that stall: GPU 0%, hard faults ~150/s, no larp thread waiting. - `LARP_STALL_S=8` gets the every-thread dump (at 3x = 24 s) before the watchdog fires. **3. Memory on a 32 GB PC.** - Sampled every 5 s for the whole 47-min run: - larp private bytes: median 31 GB, max 36 GB; - working set: about 13 GB; - available RAM: median 2.1 GB; - hard faults: median 2,249/s, peak 108,735/s. - The audio stutters from mid-run line up with that paging. This PR merges cleanly onto main (0f03265) together with #76. We carry it, with the shader heap set, in https://github.com/Proudnoob4/larp and will report the switch and DRED results from this machine.
Author
Owner

@⁠kadiratesdev on GitHub · 2026-12-05 18:39 UTC · original

Thanks a lot for the detailed data, this matches what we saw here. Our DRED capture of the removal had empty breadcrumbs and no page fault, which pointed outside larp's command lists, and the shader heap was our main suspect.

On our side (RTX 3080 Ti 12 GB, Windows 11) we applied the heap with larp nv-profile --mb 2048 from an admin shell; its output reported the setting written for larp.exe. Note that the profile matches by exe name, so a renamed build needs its own --exe. We'll post the long-run result once we have it.

The check/apply script you mention would be useful, especially since a profile can be saved with 0 settings and look applied. Also good to know about the +0x2215c35 watchdog end and the memory pressure on 32 GB; we'll try LARP_STALL_S=8 if we hit a stall.

**@⁠kadiratesdev** on GitHub · 2026-12-05 18:39 UTC · [original](https://github.com/gamingwithhomie/larp/pull/77#issuecomment-7443317089) Thanks a lot for the detailed data, this matches what we saw here. Our DRED capture of the removal had empty breadcrumbs and no page fault, which pointed outside larp's command lists, and the shader heap was our main suspect. On our side (RTX 3080 Ti 12 GB, Windows 11) we applied the heap with `larp nv-profile --mb 2048` from an admin shell; its output reported the setting written for `larp.exe`. Note that the profile matches by exe name, so a renamed build needs its own `--exe`. We'll post the long-run result once we have it. The check/apply script you mention would be useful, especially since a profile can be saved with 0 settings and look applied. Also good to know about the +0x2215c35 watchdog end and the memory pressure on 32 GB; we'll try `LARP_STALL_S=8` if we hit a stall.
Author
Owner

@⁠kadiratesdev on GitHub · 2026-12-05 18:41 UTC · original

Interim result from the RTX 3080 Ti 12 GB / Windows 11 machine, Series S profile, DLSS:

  • A build with this PR (plus the LARP_HOST_NAME change from #87) has been running for 41+ minutes with no device removal so far; the session is still going. Before, the same machine removed the device (0x887A0005, empty DRED breadcrumbs) at about 19 minutes.
  • Frame rate in the world: 53-56 fps (60 cap), no dropped draws.
  • larp private bytes at this point: about 26 GB.
  • Shader heap: nv-profile --mb 2048 was applied for larp.exe and larp-pr.exe. This run used a renamed exe (larp-tr.exe), and I haven't confirmed the profile covers that name, so take the heap part of this result with that caveat.

I'll post the final length and how the session ended once it's over.

**@⁠kadiratesdev** on GitHub · 2026-12-05 18:41 UTC · [original](https://github.com/gamingwithhomie/larp/pull/77#issuecomment-7443341849) Interim result from the RTX 3080 Ti 12 GB / Windows 11 machine, Series S profile, DLSS: - A build with this PR (plus the `LARP_HOST_NAME` change from #87) has been running for 41+ minutes with no device removal so far; the session is still going. Before, the same machine removed the device (`0x887A0005`, empty DRED breadcrumbs) at about 19 minutes. - Frame rate in the world: 53-56 fps (60 cap), no dropped draws. - larp private bytes at this point: about 26 GB. - Shader heap: `nv-profile --mb 2048` was applied for `larp.exe` and `larp-pr.exe`. This run used a renamed exe (`larp-tr.exe`), and I haven't confirmed the profile covers that name, so take the heap part of this result with that caveat. I'll post the final length and how the session ended once it's over.
Author
Owner

@⁠gamingwithhomie on GitHub · 2026-12-05 18:50 UTC · original

Reviewed in detail - the opt-in bisect switches (LARP_BYTE_VIEWS=0, LARP_SHADER_REPLACE=0), TDR registry log, and DRED-message fix are all excellent and close to zero-risk.

Holding merge as a single PR because it also bundles always-on changes to how every Windows user loads D3D12: d3d12.dll delay-load (apps/larp/build.rs), the D3D12SDKVersion export changing to AtomicU32, and agility::choose() silently falling back to the OS runtime when the bundled D3D12Core.dll is missing/mismatched (today thats a loud 0x887E0003 failure). If that loader assumption is wrong, the failure mode is 'game doesnt start at all' for everyone, and no unit test can cover it.

Please split into:

  • (a) delay-load + choose() + Agility fallback (merge after a built-binary startup smoke test),
  • (b) TDR log, DRED message, LARP_BYTE_VIEWS=0, LARP_SHADER_REPLACE=0, docs (ready to merge freely),
  • (c) stack-copy rewrite, LARP_STACKS_AT_KILL, LARP_TITLE_WATCHDOG (merge after a LARP_STACKS stall-dump sanity run).

Happy to merge (b) immediately as its own PR. Thank you!

**@⁠gamingwithhomie** on GitHub · 2026-12-05 18:50 UTC · [original](https://github.com/gamingwithhomie/larp/pull/77#issuecomment-7443483679) Reviewed in detail - the opt-in bisect switches (`LARP_BYTE_VIEWS=0`, `LARP_SHADER_REPLACE=0`), TDR registry log, and DRED-message fix are all excellent and close to zero-risk. **Holding merge as a single PR** because it also bundles always-on changes to how every Windows user loads D3D12: `d3d12.dll` delay-load (`apps/larp/build.rs`), the `D3D12SDKVersion` export changing to `AtomicU32`, and `agility::choose()` silently falling back to the OS runtime when the bundled `D3D12Core.dll` is missing/mismatched (today thats a loud `0x887E0003` failure). If that loader assumption is wrong, the failure mode is 'game doesnt start at all' for everyone, and no unit test can cover it. Please split into: - (a) delay-load + `choose()` + Agility fallback (merge after a built-binary startup smoke test), - (b) TDR log, DRED message, `LARP_BYTE_VIEWS=0`, `LARP_SHADER_REPLACE=0`, docs (ready to merge freely), - (c) stack-copy rewrite, `LARP_STACKS_AT_KILL`, `LARP_TITLE_WATCHDOG` (merge after a `LARP_STACKS` stall-dump sanity run). Happy to merge (b) immediately as its own PR. Thank you!
Author
Owner

@⁠Proudnoob4 on GitHub · 2026-12-05 18:54 UTC · original

Built-binary startup smoke test for the (a) part (delay-load, agility::choose, fallback).

Setup: Windows 10 19045, RTX 4080, game driver profile with the 1024 MiB shader heap. Build: main 0f03265 + this PR, release, MSVC, built on the machine itself.

  • Bundled runtime present (bin\D3D12\D3D12Core.dll 1.620.2.0 beside larp.exe, the normal layout):
    • choose() printed nothing, which is the path that keeps the bundled runtime (agility.rs:51 speaks only on a fallback).
    • The game started, played 15 min in the world (Series X, 30 fps cap), and closed by the user with exit 0.
    • The TDR line from (b) logged: level=default delay=default ddi_delay=default.
    • An earlier session of the same build on this machine also started and ran normally.
  • No D3D12\ folder (the build run from target\release):
    • larp.exe --help printed D3D12 runtime: asking Windows for SDK version 4 (no D3D12\D3D12Core.dll beside larp.exe) and ran.
    • That case made no device, so only the startup path is covered.

For (c): LARP_STALL_S=8 printed one warning during the loading screen (no frame begun for 8 s (frame 2)). The 3x dump did not fire because frames began before 24 s. So no stall dump has been exercised yet. We'll post one if we hit a freeze.

On the "saved with 0 settings" trap: larp nv-profile with no arguments already reads the driver's value back for larp.exe. Here it prints profile "cnf", shader heap 1024 MiB (0x40000000). That is the check we'd suggest people run after Profile Inspector, so our separate script isn't needed.

**@⁠Proudnoob4** on GitHub · 2026-12-05 18:54 UTC · [original](https://github.com/gamingwithhomie/larp/pull/77#issuecomment-7443540597) Built-binary startup smoke test for the (a) part (delay-load, `agility::choose`, fallback). Setup: Windows 10 19045, RTX 4080, game driver profile with the 1024 MiB shader heap. Build: main 0f03265 + this PR, release, MSVC, built on the machine itself. - **Bundled runtime present** (`bin\D3D12\D3D12Core.dll` 1.620.2.0 beside `larp.exe`, the normal layout): - `choose()` printed nothing, which is the path that keeps the bundled runtime (`agility.rs:51` speaks only on a fallback). - The game started, played 15 min in the world (Series X, 30 fps cap), and closed by the user with exit 0. - The TDR line from (b) logged: `level=default delay=default ddi_delay=default`. - An earlier session of the same build on this machine also started and ran normally. - **No `D3D12\` folder** (the build run from `target\release`): - `larp.exe --help` printed `D3D12 runtime: asking Windows for SDK version 4 (no D3D12\D3D12Core.dll beside larp.exe)` and ran. - That case made no device, so only the startup path is covered. For (c): `LARP_STALL_S=8` printed one warning during the loading screen (`no frame begun for 8 s (frame 2)`). The 3x dump did not fire because frames began before 24 s. So no stall dump has been exercised yet. We'll post one if we hit a freeze. On the "saved with 0 settings" trap: `larp nv-profile` with no arguments already reads the driver's value back for `larp.exe`. Here it prints `profile "cnf", shader heap 1024 MiB (0x40000000)`. That is the check we'd suggest people run after Profile Inspector, so our separate script isn't needed.
Author
Owner

@⁠kadiratesdev on GitHub · 2026-12-05 19:02 UTC · original

Final result of that session (RTX 3080 Ti 12 GB, Windows 11, Series S profile, DLSS):

  • About 54 minutes in the world with no device removal. It ended when I closed the window (title: suspending (window closed)), not a crash. Before, the same machine removed the device at about 19 minutes.
  • Frame rate was 53-56 fps (60 cap) for most of the run and fell to about 33-37 fps in the last minutes. Private bytes were about 26 GB at 41 minutes, so this may be the same memory pressure you saw on 32 GB.
  • No dropped draws in the steady state; a few larp_gpu::regions "window of title memory ... over a buffer the GPU owns" errors were logged around the 13-14 minute mark, with no visible effect.
  • Same caveat as before: the 2048 MiB shader heap was applied for larp.exe and larp-pr.exe, and this run used the renamed larp-tr.exe, which I haven't confirmed the profile covers.
**@⁠kadiratesdev** on GitHub · 2026-12-05 19:02 UTC · [original](https://github.com/gamingwithhomie/larp/pull/77#issuecomment-7443655739) Final result of that session (RTX 3080 Ti 12 GB, Windows 11, Series S profile, DLSS): - About 54 minutes in the world with no device removal. It ended when I closed the window (`title: suspending (window closed)`), not a crash. Before, the same machine removed the device at about 19 minutes. - Frame rate was 53-56 fps (60 cap) for most of the run and fell to about 33-37 fps in the last minutes. Private bytes were about 26 GB at 41 minutes, so this may be the same memory pressure you saw on 32 GB. - No dropped draws in the steady state; a few `larp_gpu::regions` "window of title memory ... over a buffer the GPU owns" errors were logged around the 13-14 minute mark, with no visible effect. - Same caveat as before: the 2048 MiB shader heap was applied for `larp.exe` and `larp-pr.exe`, and this run used the renamed `larp-tr.exe`, which I haven't confirmed the profile covers.
Author
Owner

@⁠kadiratesdev on GitHub · 2026-12-05 19:17 UTC · original

Part (b) of the split is now up as #126 (TDR log, DRED message fix, LARP_BYTE_VIEWS=0, LARP_SHADER_REPLACE=0, docs). Parts (a) (d3d12.dll delay-load / Agility fallback) and (c) (stack-copy rewrite, LARP_STACKS_AT_KILL, LARP_TITLE_WATCHDOG) will follow as separate PRs after the built-binary startup smoke test and the LARP_STACKS stall-dump run you asked for.

**@⁠kadiratesdev** on GitHub · 2026-12-05 19:17 UTC · [original](https://github.com/gamingwithhomie/larp/pull/77#issuecomment-7443866229) Part (b) of the split is now up as #126 (TDR log, DRED message fix, LARP_BYTE_VIEWS=0, LARP_SHADER_REPLACE=0, docs). Parts (a) (d3d12.dll delay-load / Agility fallback) and (c) (stack-copy rewrite, LARP_STACKS_AT_KILL, LARP_TITLE_WATCHDOG) will follow as separate PRs after the built-binary startup smoke test and the LARP_STACKS stall-dump run you asked for.
Author
Owner

@⁠kadiratesdev on GitHub · 2026-12-05 19:31 UTC · original

Parts (a) and (c) of the split are now up:

  • (a) Agility / d3d12.dll delay-load: #139
  • (c) stack-copy rewrite, LARP_STACKS_AT_KILL, LARP_TITLE_WATCHDOG: #140
  • (b) was already #126

The built-binary startup smoke test for (a) and the LARP_STACKS stall-dump run for (c) are in progress; results will be posted on those PRs. #77 stays open.

**@⁠kadiratesdev** on GitHub · 2026-12-05 19:31 UTC · [original](https://github.com/gamingwithhomie/larp/pull/77#issuecomment-7444061350) Parts (a) and (c) of the split are now up: - (a) Agility / d3d12.dll delay-load: https://git.gtahub.st/github/gamingwithhomie--larp/pulls/139 - (c) stack-copy rewrite, LARP_STACKS_AT_KILL, LARP_TITLE_WATCHDOG: https://git.gtahub.st/github/gamingwithhomie--larp/pulls/140 - (b) was already #126 The built-binary startup smoke test for (a) and the LARP_STACKS stall-dump run for (c) are in progress; results will be posted on those PRs. #77 stays open.
github-bot closed this pull request 2026-12-06 00:07:58 +00:00
Author
Owner

@⁠kadiratesdev on GitHub · 2026-12-06 00:03 UTC · original

Closing this as superseded by the split you asked for: (b) #126 (merged), (a) #139 and (c) #140, which now have their smoke-test results posted. Thanks for the review.

**@⁠kadiratesdev** on GitHub · 2026-12-06 00:03 UTC · [original](https://github.com/gamingwithhomie/larp/pull/77#issuecomment-7448043462) Closing this as superseded by the split you asked for: (b) #126 (merged), (a) #139 and (c) #140, which now have their smoke-test results posted. Thanks for the review.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.