fix(shaders,gpu): skip 191ecaed66eea3b1 replacement on NVIDIA 616.x to avoid compiler OOM (#249) #452
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!452
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-452"
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?
@ZerefDragnee1l on GitHub · 2026-12-06 01:01 UTC · original
ZerefDragnee1l:fix/nvidia-616-shadow-shader-oom→main· +51 −0 · 2 files · 1 commits · merged 2026-12-06 01:05 UTCFixes #249 (NVIDIA 616.56 / 616.64 driver compiler OOM on
191ecaed66eea3b1CS_ShadowRenderTiledCascades).Root Cause
Compiling replacement shader
191ecaed66eea3b1.compute.hlslwith DXC-O3produces a flat 2,425-block / 5,182-PHI SSA DAG inmain(), triggering pathological memory growth (40–139 GB private commit /0x8007000E/ system reboots) inside NVIDIA driver616.56/616.64(ptxas), while drivers621.47+, older drivers, Wine/vkd3d-proton, and AMD GPUs are unaffected.Rather than forcing unoptimized
-OdDXIL onto all GPUs and drivers (as an alternative to or complement for #421), this guards191ecaed66eea3b1specifically on affected Windows NVIDIA driver versions at runtime and cleanly falls back to the already-working translated shader (confirmed in #249 to complete startup at normal memory usage).Changes
crates/larp-gpu/src/host.rs: AddedHost::nvidia_driver_version(&self) -> Option<u32>usingIDXGIAdapter::CheckInterfaceSupport(&IDXGIDevice::IID)on native Windows NVIDIA adapters (VendorId == 0x10de && !on_wine()), decoding(c % 10) * 10_000 + d(e.g.,61656for616.56,61664for616.64).crates/larp-gpu/src/shader_replace.rs: Inapply(), skipscomputereplacement191ecaed66eea3b1whennvidia_driver_version()falls in616.00..621.00, logging a warning and falling back to the translated shader (overrideable viaLARP_NVIDIA_SHADOW_REPLACE=1or0). Unaffected drivers and AMD/Linux continue using-O3DXIL with zero GPU cost penalty, and existing PSO caches automatically key on translated vs replacement DXIL.Verification
cargo check -p larpon this branch (exited0, 0 errors, 0 warnings in modified files).