NVIDIA 616.64: replacement shader 191ecaed66eea3b1 (CS_ShadowRenderTiledCascades) makes the driver compiler eat all memory, startup never finishes #249

Closed
opened 2026-12-05 22:13:37 +00:00 by github-bot · 4 comments
Owner

@⁠bkemalbjkbjk-ops on GitHub · 2026-12-05 22:10 UTC · original

PC: RTX 5070 Ti 16 GB, NVIDIA 616.64 (32.0.16.1664), Intel i5-14400F, 32 GB RAM, Windows 11 Insider build 26300
Build: main 8e166ad, built from source (cargo build --release -p larp), Series X, default options.ini

What happens: about 8 s after launch, at the menu hold while pipelines are made, the process commit grows by ~1.5 GB/s until the PC runs out of memory. First launch (no blobs): 117 GB committed, then ptxas fatal: Memory allocation failure and host pipeline: refused ... 0x8007000E, the desktop and Task Manager crashed. Every later launch (53k blobs on disk): 24 GB in 16 s, the same way.

What I measured (diagnostics build, LARP_LOG=info,larp=debug,larp_gpu::pipeline::host=trace):

  • larp's own allocations stay flat at ~0.9 GB (counting allocator); the growth is in private host allocations of 1, 2 and 4 GB (not Rust, not title heaps, not file reads: the process read only 1.4 GB in that time).
  • The pipeline workers are at 100% CPU during the growth.
  • In every run, host pipeline: creating shaders=[compute 191ecaed66eea3b1] (the shader-replace program) starts at ~8 s and never reaches made; the growth starts at the same moment.
  • Ruled out: worker count (LARP_PRELOAD_THREADS=1 grows the same), root signature objects for passed-over pipelines (deferring CreateRootSignature changed nothing).

Workaround: moving bin\shader-replace\191ecaed66eea3b1.compute.dxil out of the folder. With it gone, the same start stays at ~8 GB private for 75 s and pipeline making goes on (257 new pipelines compiled, 1,251 loaded from blobs).

#59 seems to have compiled everything on 621.47, so this may be specific to 616.64 (or to Blackwell). The replacement is 6,548 lines of straight-line code at the top level of main; splitting it, or a driver-version check that falls back to the translated program, would avoid it.

**@⁠bkemalbjkbjk-ops** on GitHub · 2026-12-05 22:10 UTC · [original](https://github.com/gamingwithhomie/larp/issues/249) **PC:** RTX 5070 Ti 16 GB, NVIDIA 616.64 (32.0.16.1664), Intel i5-14400F, 32 GB RAM, Windows 11 Insider build 26300 **Build:** `main` 8e166ad, built from source (`cargo build --release -p larp`), Series X, default `options.ini` **What happens:** about 8 s after launch, at the menu hold while pipelines are made, the process commit grows by ~1.5 GB/s until the PC runs out of memory. First launch (no blobs): 117 GB committed, then `ptxas fatal: Memory allocation failure` and `host pipeline: refused ... 0x8007000E`, the desktop and Task Manager crashed. Every later launch (53k blobs on disk): 24 GB in 16 s, the same way. **What I measured** (diagnostics build, `LARP_LOG=info,larp=debug,larp_gpu::pipeline::host=trace`): - larp's own allocations stay flat at ~0.9 GB (counting allocator); the growth is in private host allocations of 1, 2 and 4 GB (not Rust, not title heaps, not file reads: the process read only 1.4 GB in that time). - The pipeline workers are at 100% CPU during the growth. - In every run, `host pipeline: creating shaders=[compute 191ecaed66eea3b1]` (the `shader-replace` program) starts at ~8 s and never reaches `made`; the growth starts at the same moment. - Ruled out: worker count (`LARP_PRELOAD_THREADS=1` grows the same), root signature objects for passed-over pipelines (deferring `CreateRootSignature` changed nothing). **Workaround:** moving `bin\shader-replace\191ecaed66eea3b1.compute.dxil` out of the folder. With it gone, the same start stays at ~8 GB private for 75 s and pipeline making goes on (257 new pipelines compiled, 1,251 loaded from blobs). #59 seems to have compiled everything on 621.47, so this may be specific to 616.64 (or to Blackwell). The replacement is 6,548 lines of straight-line code at the top level of `main`; splitting it, or a driver-version check that falls back to the translated program, would avoid it.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 22:13:39 +00:00
Author
Owner

@⁠Gabarsolon on GitHub · 2026-12-05 22:36 UTC · original

Also on RTX 5060 Laptop 8 GB, driver 616.56 (so not only 616.64), Ryzen 9 8940HX, 32 GB, Windows 11 Pro build 26200, main 81c1e1d built from source, Series S.

With 191ecaed66eea3b1.compute.dxil in bin\shader-replace, the whole PC froze and rebooted shortly after launch (Kernel-Power 41, no bugcheck, no dump; log stops about 7 s after start). I did not record memory in that run. On an earlier build with the same shader source I saw 40–72 GB private; with the .dxil moved out, precompiling finished 60619/60619, 0 failed, about 1 GB peak.

**@⁠Gabarsolon** on GitHub · 2026-12-05 22:36 UTC · [original](https://github.com/gamingwithhomie/larp/issues/249#issuecomment-7446911819) Also on RTX 5060 Laptop 8 GB, driver **616.56** (so not only 616.64), Ryzen 9 8940HX, 32 GB, Windows 11 Pro build 26200, `main` 81c1e1d built from source, Series S. With `191ecaed66eea3b1.compute.dxil` in `bin\shader-replace`, the whole PC froze and rebooted shortly after launch (Kernel-Power 41, no bugcheck, no dump; log stops about 7 s after start). I did not record memory in that run. On an earlier build with the same shader source I saw 40–72 GB private; with the `.dxil` moved out, precompiling finished 60619/60619, 0 failed, about 1 GB peak.
Author
Owner

@⁠Gabarsolon on GitHub · 2026-12-05 22:52 UTC · original

Workaround that keeps the replacement shader: compile shaders/replace/191ecaed66eea3b1.compute.hlsl with dxc -Od instead of -O3 (other flags as in apps/larp/build.rs), then copy the result over bin\shader-replace\191ecaed66eea3b1.compute.dxil:

dxc -nologo -T cs_6_6 -E main -HV 2021 -Od -Qstrip_reflect 191ecaed66eea3b1.compute.hlsl -Fo 191ecaed66eea3b1.compute.dxil

Tested on RTX 5060 Laptop, driver 616.56, dxc from Windows Kit 10.0.26100.0. Creating that one pipeline on its own, under a 6 GB process memory cap: -O3 and -O1 hit the cap and fail with 0x8007000E after about 9 s (so did -O3 with -all-resources-bound, with -Gfp, with precise removed, or with [branch] added). -Od succeeds in about 5 s at 0.64 GB peak. In game the -Od file is loaded as the replacement and startup completes (0 pipelines left, about 17 GB for the process). GPU cost of the unoptimized DXIL not measured.

Note: I also see blocky tile-shaped shadows (as in #164 / #204), and they are still there with this shader active, so this does not fix those.

**@⁠Gabarsolon** on GitHub · 2026-12-05 22:52 UTC · [original](https://github.com/gamingwithhomie/larp/issues/249#issuecomment-7447121316) Workaround that keeps the replacement shader: compile `shaders/replace/191ecaed66eea3b1.compute.hlsl` with dxc `-Od` instead of `-O3` (other flags as in `apps/larp/build.rs`), then copy the result over `bin\shader-replace\191ecaed66eea3b1.compute.dxil`: ``` dxc -nologo -T cs_6_6 -E main -HV 2021 -Od -Qstrip_reflect 191ecaed66eea3b1.compute.hlsl -Fo 191ecaed66eea3b1.compute.dxil ``` Tested on RTX 5060 Laptop, driver 616.56, dxc from Windows Kit 10.0.26100.0. Creating that one pipeline on its own, under a 6 GB process memory cap: `-O3` and `-O1` hit the cap and fail with `0x8007000E` after about 9 s (so did `-O3` with `-all-resources-bound`, with `-Gfp`, with `precise` removed, or with `[branch]` added). `-Od` succeeds in about 5 s at 0.64 GB peak. In game the `-Od` file is loaded as the replacement and startup completes (0 pipelines left, about 17 GB for the process). GPU cost of the unoptimized DXIL not measured. Note: I also see blocky tile-shaped shadows (as in #164 / #204), and they are still there with this shader active, so this does not fix those.
Author
Owner

@⁠marekpastuszczak-lang on GitHub · 2026-12-06 00:26 UTC · original

Same here on a desktop card, so it's not only the 5060 / laptops.

Setup: RTX 5070 Ti 16 GB (desktop), driver 616.56, i9-9900K, 32 GB RAM, Windows 11 build 26200, main at ce70d35 built from source (dxc 1.9.0.5512), Series X output 2560x1440, DLSS performance + DLSS FG 2x, LARP_NO_MODS=1.

With the stock -O3 191ecaed66eea3b1.compute.dxil:

  • The private commit of larp.exe grew about 12 GB/min during the startup precompile (working set mostly 1-2 GB, the rest paged out, 100k+ page reads/s). It reached ~139 GB, which is the commit limit here (32 GB RAM + ~98 GB pagefiles), and the process died with memory allocation of 1160712 bytes failed (exit 0xC0000409) at ~52k/60.6k pipelines.
  • Restarting with the blob cache did not get past it. After loading the cached blobs, memory kept climbing at the same rate while the remaining ~8k were made, at only ~80-200 pipelines/min because of the paging.
  • LARP_PRELOAD_THREADS=2 instead of the default made no difference to the growth.

With the -Od build from the comment above (same dxc command, only that one file replaced): the precompile finished made=60621 (the ~8k not yet in the blob cache took about 3 minutes), and larp.exe private memory stayed around 9.5-10 GB through it and through the ~22.9k-pipeline batch made while loading the save.

After that it played fine. In the prison intro on foot (1440p, DLSS performance, FG 2x), the game sat at the title's 30 fps cap most of the time, about 27 average counting the hitches. CPU preparing was 5-8 ms/frame, and private memory was ~22.5 GB in the world.

So this confirms the -O3 build of that shader as the cause on 616.56 for desktop Blackwell too. Maybe ship that one file built with -Od (or a per-file flag in build.rs) until NVIDIA fixes the compiler.

**@⁠marekpastuszczak-lang** on GitHub · 2026-12-06 00:26 UTC · [original](https://github.com/gamingwithhomie/larp/issues/249#issuecomment-7448372766) Same here on a desktop card, so it's not only the 5060 / laptops. **Setup:** RTX 5070 Ti 16 GB (desktop), driver **616.56**, i9-9900K, 32 GB RAM, Windows 11 build 26200, `main` at ce70d35 built from source (dxc 1.9.0.5512), Series X output 2560x1440, DLSS performance + DLSS FG 2x, `LARP_NO_MODS=1`. **With the stock `-O3` `191ecaed66eea3b1.compute.dxil`:** - The private commit of `larp.exe` grew about 12 GB/min during the startup precompile (working set mostly 1-2 GB, the rest paged out, 100k+ page reads/s). It reached ~139 GB, which is the commit limit here (32 GB RAM + ~98 GB pagefiles), and the process died with `memory allocation of 1160712 bytes failed` (exit 0xC0000409) at ~52k/60.6k pipelines. - Restarting with the blob cache did not get past it. After loading the cached blobs, memory kept climbing at the same rate while the remaining ~8k were made, at only ~80-200 pipelines/min because of the paging. - `LARP_PRELOAD_THREADS=2` instead of the default made no difference to the growth. **With the `-Od` build from the comment above** (same dxc command, only that one file replaced): the precompile finished `made=60621` (the ~8k not yet in the blob cache took about 3 minutes), and `larp.exe` private memory stayed around 9.5-10 GB through it and through the ~22.9k-pipeline batch made while loading the save. After that it played fine. In the prison intro on foot (1440p, DLSS performance, FG 2x), the game sat at the title's 30 fps cap most of the time, about 27 average counting the hitches. CPU preparing was 5-8 ms/frame, and private memory was ~22.5 GB in the world. So this confirms the `-O3` build of that shader as the cause on 616.56 for desktop Blackwell too. Maybe ship that one file built with `-Od` (or a per-file flag in `build.rs`) until NVIDIA fixes the compiler.
Author
Owner

@⁠vanya890 on GitHub · 2026-12-06 00:42 UTC · original

I opened PR #421 to make the per-shader workaround permanent in apps/larp/build.rs: only 191ecaed66eea3b1.compute.hlsl uses -Od; every other replacement keeps -O3. The build-script test checks that the exception does not leak to other stages or shaders.

I also verified that the local Windows SDK DXC compiles this shader with -Od for both heap-size variants used by the build (1,000,000 and 2,097,152). Runtime GPU cost remains unbenchmarked.

One follow-up risk: PR #408 proposes up to 8 concurrent DXC workers. I flagged to its author that this may amplify peak host-memory use during precompilation, and asked that the worker count be checked against this report before merging.

**@⁠vanya890** on GitHub · 2026-12-06 00:42 UTC · [original](https://github.com/gamingwithhomie/larp/issues/249#issuecomment-7448582294) I opened [PR #421](https://git.gtahub.st/github/gamingwithhomie--larp/pulls/421) to make the per-shader workaround permanent in `apps/larp/build.rs`: only `191ecaed66eea3b1.compute.hlsl` uses `-Od`; every other replacement keeps `-O3`. The build-script test checks that the exception does not leak to other stages or shaders. I also verified that the local Windows SDK DXC compiles this shader with `-Od` for both heap-size variants used by the build (1,000,000 and 2,097,152). Runtime GPU cost remains unbenchmarked. One follow-up risk: PR #408 proposes up to 8 concurrent DXC workers. I flagged to its author that this may amplify peak host-memory use during precompilation, and asked that the worker count be checked against this report before merging.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/gamingwithhomie--larp#249
No description provided.