NVIDIA 616.64: replacement shader 191ecaed66eea3b1 (CS_ShadowRenderTiledCascades) makes the driver compiler eat all memory, startup never finishes #249
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#249
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?
@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:
main8e166ad, built from source (cargo build --release -p larp), Series X, defaultoptions.iniWhat 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 failureandhost 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):host pipeline: creating shaders=[compute 191ecaed66eea3b1](theshader-replaceprogram) starts at ~8 s and never reachesmade; the growth starts at the same moment.LARP_PRELOAD_THREADS=1grows the same), root signature objects for passed-over pipelines (deferringCreateRootSignaturechanged nothing).Workaround: moving
bin\shader-replace\191ecaed66eea3b1.compute.dxilout 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.@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,
main81c1e1dbuilt from source, Series S.With
191ecaed66eea3b1.compute.dxilinbin\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.dxilmoved out, precompiling finished 60619/60619, 0 failed, about 1 GB peak.@Gabarsolon on GitHub · 2026-12-05 22:52 UTC · original
Workaround that keeps the replacement shader: compile
shaders/replace/191ecaed66eea3b1.compute.hlslwith dxc-Odinstead of-O3(other flags as inapps/larp/build.rs), then copy the result overbin\shader-replace\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:
-O3and-O1hit the cap and fail with0x8007000Eafter about 9 s (so did-O3with-all-resources-bound, with-Gfp, withpreciseremoved, or with[branch]added).-Odsucceeds in about 5 s at 0.64 GB peak. In game the-Odfile 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.
@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,
mainatce70d35built from source (dxc 1.9.0.5512), Series X output 2560x1440, DLSS performance + DLSS FG 2x,LARP_NO_MODS=1.With the stock
-O3191ecaed66eea3b1.compute.dxil:larp.exegrew 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 withmemory allocation of 1160712 bytes failed(exit 0xC0000409) at ~52k/60.6k pipelines.LARP_PRELOAD_THREADS=2instead of the default made no difference to the growth.With the
-Odbuild from the comment above (same dxc command, only that one file replaced): the precompile finishedmade=60621(the ~8k not yet in the blob cache took about 3 minutes), andlarp.exeprivate 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
-O3build 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 inbuild.rs) until NVIDIA fixes the compiler.@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: only191ecaed66eea3b1.compute.hlsluses-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
-Odfor 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.
github-bot referenced this issue2026-12-06 01:02:50 +00:00