LARP_PIPELINE_WAIT_MS>0 drops one-time BRDF/lighting LUT & DecorationBlend pixel shaders on world entry (black skin, dark lighting, broken hair) #335

Closed
opened 2026-12-05 23:23:40 +00:00 by github-bot · 1 comment
Owner

@⁠bcefedgn on GitHub · 2026-12-05 23:17 UTC · original

issue-logs.zip

Ekran Görüntüsü (177) Ekran Görüntüsü (179) Ekran Görüntüsü (180) Ekran Görüntüsü (181) Ekran Görüntüsü (182) Ekran Görüntüsü (183)

play.log

Summary

Enabling LARP_PIPELINE_WAIT_MS=8 (documented in README.md and docs/environment-variables.md) bypasses waits_for_all() in crates/larp-gpu/src/pipeline/make.rs for graphics pipelines where !p.lasting(). On world entry, this drops one-time BRDF/lighting LUT and PS_DecorationBlend draws even with a warm 88,500+ pipeline cache, leaving those targets zeroed (pitch-black skin, dark/crushed interiors, white eyebrows, and broken hair lighting) on both Series S and Series X.

Root Cause in Code (verified on origin/main deb2a0d)

  1. In crates/larp-gpu/src/pipeline/make.rs (ready()):
    if !p.lasting()
        && let Some(budget) = pipeline_wait_budget()
    {
        wait_budgeted(p, frame, budget);
    } else if waits_for_all() {
        wait_for(p, frame);
    }
    
    When LARP_PIPELINE_WAIT_MS > 0, any non-lasting() graphics pipeline whose driver/blob load takes longer than the budget drops the draw instead of waiting for waits_for_all().
  2. Pending::lasting() (crates/larp-gpu/src/pipeline/make.rs) currently only returns true for compute pipelines and the four PS_BakeDecorations_* pixel shaders in crates/larp-gpu/src/draw.rs (BAKE_PIXEL_SHADERS):
    pub(crate) const BAKE_PIXEL_SHADERS: [&str; 4] =
        ["c0a7fe77b1862e10", "0d1575a396dfe513", "b7cfd8dda91ebb6b", "280967ad158cee0b"];
    

Exact Dropped One-Time Shaders (from --features diagnostics with LARP_PIPELINE_WAIT_MS=8)

Even with all 88,500+ shaders/pipelines cached (without_a_stored_shader=0, created_without_blob=0), loading them from blobs on world entry still exceeds the 8 ms per-frame budget and drops the following one-time graphics pipelines:

Frame Pixel Shader Hash Shader Entry Name
11938 fcee612943c008e0 PS_DecorationBlend_0011_ff00f5de_Wrapped
11939 d126bcae5d5d8d26 PS_DecorationBlend_0000_ff00f5de_Wrapped
12063 a467d848ace5810d PS_IntegrateEnvBRDF_e4d137db_Wrapped
12063 8992ac65c3b6b5eb PS_IntegrateEnvBRDF_Beckmann_e4d137db_Wrapped
12063 f9b6e2728e0628b0 PS_IntegrateEnvBRDF_ThinFilm_e4d137db_Wrapped
12063 1b86ffadd1d70850 PS_IridescenceSpectralIntegration_e4d137db_Wrapped
12063 8919e24c5ce2816a PS_AreaLightIlluminance_e4d137db_Wrapped
12063 2a0d503ba0532798 PS_AnisotropicPhaseFunction_e4d137db_Wrapped

Notice why triggering a live frame_reset in-game (e.g., toggling upscaler in the F10 menu) partially restores skin and shadows: by that point the e4d137db LUT pipelines have finished loading in the background, and the frame_reset re-runs those 6 LUT passes, whereas earlier character PS_DecorationBlend passes from loading do not re-run.

Confirmed Workaround & Verification

Unsetting LARP_PIPELINE_WAIT_MS (or setting LARP_PIPELINE_WAIT_MS=0) restores waits_for_all() == true (0 without a host pipeline dropped) and completely fixes skin, lighting, shadows, and hair lighting from frame 1 (tested with 0 frame resets, both DLSS Performance and DLSS Quality + DLSS 2x Frame Generation on RTX 4070 Laptop 8 GB, Windows 11, driver 621.47).

Suggested Fix

Include the one-time BRDF/lighting LUT (e4d137db) and PS_DecorationBlend pixel shader hashes (plus any remaining PS_DecorationBlend_* variants if present) in BAKE_PIXEL_SHADERS / LASTING_PIXEL_SHADERS checked by Pending::lasting() in crates/larp-gpu/src/pipeline/make.rs + crates/larp-gpu/src/draw.rs so LARP_PIPELINE_WAIT_MS=8 still works safely without breaking initial world/character lighting:

pub(crate) const BAKE_PIXEL_SHADERS: [&str; 12] = [
    // PS_BakeDecorations_*
    "c0a7fe77b1862e10",
    "0d1575a396dfe513",
    "b7cfd8dda91ebb6b",
    "280967ad158cee0b",
    // PS_DecorationBlend_*
    "fcee612943c008e0",
    "d126bcae5d5d8d26",
    // One-time env BRDF / area light / hair phase LUT integration (e4d137db)
    "a467d848ace5810d",
    "8992ac65c3b6b5eb",
    "f9b6e2728e0628b0",
    "1b86ffadd1d70850",
    "8919e24c5ce2816a",
    "2a0d503ba0532798",
];

Additional Observation (Brief Note on Live frame_reset VRAM Retention)

While diagnosing this via F10 upscaler / upscaler_mode switches, diag.log also showed that a live frame_reset retains old alias pool + texture-object VRAM (499 MB -> 1011 MB alias pool, 785 MB -> 1403 MB texture objects, total card VRAM 6778 MB -> 7456 MB even 15s later), causing 8 GB GPUs to spill into Shared RAM (~2 FPS) on a subsequent live frame_reset. Happy to open a separate issue with full diag.log details if helpful.

Environment

  • OS: Windows 11 Pro (Build 26300)
  • CPU: AMD Ryzen 9 7940HS
  • GPU: NVIDIA GeForce RTX 4070 Laptop GPU 8 GB (Driver 32.0.16.2147 / 621.47)
  • RAM: 16 GB
  • larp: Checked against origin/main (deb2a0d, same BAKE_PIXEL_SHADERS / LARP_PIPELINE_WAIT_MS logic)
**@⁠bcefedgn** on GitHub · 2026-12-05 23:17 UTC · [original](https://github.com/gamingwithhomie/larp/issues/335) [issue-logs.zip](https://github.com/user-attachments/files/35924320/issue-logs.zip) <img width="1280" height="760" alt="Ekran Görüntüsü (177)" src="https://github.com/user-attachments/assets/74a85b55-7b0f-4d07-8b1c-94400f565945" /> <img width="1280" height="759" alt="Ekran Görüntüsü (179)" src="https://github.com/user-attachments/assets/fd381476-fd5a-480d-8d1c-1d57c5edd8e5" /> <img width="1280" height="762" alt="Ekran Görüntüsü (180)" src="https://github.com/user-attachments/assets/49289085-e4c0-49d9-b162-491d7c73775d" /> <img width="1280" height="761" alt="Ekran Görüntüsü (181)" src="https://github.com/user-attachments/assets/7619a83f-93ef-40d7-b9c0-d2b8c54e6593" /> <img width="1280" height="760" alt="Ekran Görüntüsü (182)" src="https://github.com/user-attachments/assets/1b014fea-6501-4abd-8e94-111e3847a558" /> <img width="1280" height="761" alt="Ekran Görüntüsü (183)" src="https://github.com/user-attachments/assets/d8c72816-ed1d-4f1e-b432-e371e13f3926" /> [play.log](https://github.com/user-attachments/files/35924332/play.log) ### Summary Enabling `LARP_PIPELINE_WAIT_MS=8` (documented in `README.md` and `docs/environment-variables.md`) bypasses `waits_for_all()` in `crates/larp-gpu/src/pipeline/make.rs` for graphics pipelines where `!p.lasting()`. On world entry, this drops one-time BRDF/lighting LUT and `PS_DecorationBlend` draws even with a warm 88,500+ pipeline cache, leaving those targets zeroed (pitch-black skin, dark/crushed interiors, white eyebrows, and broken hair lighting) on both Series S and Series X. ### Root Cause in Code (verified on `origin/main` `deb2a0d`) 1. In `crates/larp-gpu/src/pipeline/make.rs` (`ready()`): ```rust if !p.lasting() && let Some(budget) = pipeline_wait_budget() { wait_budgeted(p, frame, budget); } else if waits_for_all() { wait_for(p, frame); } ``` When `LARP_PIPELINE_WAIT_MS > 0`, any non-`lasting()` graphics pipeline whose driver/blob load takes longer than the budget drops the draw instead of waiting for `waits_for_all()`. 2. `Pending::lasting()` (`crates/larp-gpu/src/pipeline/make.rs`) currently only returns `true` for compute pipelines and the four `PS_BakeDecorations_*` pixel shaders in `crates/larp-gpu/src/draw.rs` (`BAKE_PIXEL_SHADERS`): ```rust pub(crate) const BAKE_PIXEL_SHADERS: [&str; 4] = ["c0a7fe77b1862e10", "0d1575a396dfe513", "b7cfd8dda91ebb6b", "280967ad158cee0b"]; ``` ### Exact Dropped One-Time Shaders (from `--features diagnostics` with `LARP_PIPELINE_WAIT_MS=8`) Even with all 88,500+ shaders/pipelines cached (`without_a_stored_shader=0`, `created_without_blob=0`), loading them from blobs on world entry still exceeds the 8 ms per-frame budget and drops the following one-time graphics pipelines: | Frame | Pixel Shader Hash | Shader Entry Name | | --- | --- | --- | | `11938` | `fcee612943c008e0` | `PS_DecorationBlend_0011_ff00f5de_Wrapped` | | `11939` | `d126bcae5d5d8d26` | `PS_DecorationBlend_0000_ff00f5de_Wrapped` | | `12063` | `a467d848ace5810d` | `PS_IntegrateEnvBRDF_e4d137db_Wrapped` | | `12063` | `8992ac65c3b6b5eb` | `PS_IntegrateEnvBRDF_Beckmann_e4d137db_Wrapped` | | `12063` | `f9b6e2728e0628b0` | `PS_IntegrateEnvBRDF_ThinFilm_e4d137db_Wrapped` | | `12063` | `1b86ffadd1d70850` | `PS_IridescenceSpectralIntegration_e4d137db_Wrapped` | | `12063` | `8919e24c5ce2816a` | `PS_AreaLightIlluminance_e4d137db_Wrapped` | | `12063` | `2a0d503ba0532798` | `PS_AnisotropicPhaseFunction_e4d137db_Wrapped` | Notice why triggering a live `frame_reset` in-game (e.g., toggling `upscaler` in the F10 menu) partially restores skin and shadows: by that point the `e4d137db` LUT pipelines have finished loading in the background, and the `frame_reset` re-runs those 6 LUT passes, whereas earlier character `PS_DecorationBlend` passes from loading do not re-run. ### Confirmed Workaround & Verification Unsetting `LARP_PIPELINE_WAIT_MS` (or setting `LARP_PIPELINE_WAIT_MS=0`) restores `waits_for_all() == true` (`0 without a host pipeline` dropped) and completely fixes skin, lighting, shadows, and hair lighting from frame 1 (tested with `0` frame resets, both DLSS Performance and DLSS Quality + DLSS 2x Frame Generation on RTX 4070 Laptop 8 GB, Windows 11, driver `621.47`). ### Suggested Fix Include the one-time BRDF/lighting LUT (`e4d137db`) and `PS_DecorationBlend` pixel shader hashes (plus any remaining `PS_DecorationBlend_*` variants if present) in `BAKE_PIXEL_SHADERS` / `LASTING_PIXEL_SHADERS` checked by `Pending::lasting()` in `crates/larp-gpu/src/pipeline/make.rs` + `crates/larp-gpu/src/draw.rs` so `LARP_PIPELINE_WAIT_MS=8` still works safely without breaking initial world/character lighting: ```rust pub(crate) const BAKE_PIXEL_SHADERS: [&str; 12] = [ // PS_BakeDecorations_* "c0a7fe77b1862e10", "0d1575a396dfe513", "b7cfd8dda91ebb6b", "280967ad158cee0b", // PS_DecorationBlend_* "fcee612943c008e0", "d126bcae5d5d8d26", // One-time env BRDF / area light / hair phase LUT integration (e4d137db) "a467d848ace5810d", "8992ac65c3b6b5eb", "f9b6e2728e0628b0", "1b86ffadd1d70850", "8919e24c5ce2816a", "2a0d503ba0532798", ]; ``` ### Additional Observation (Brief Note on Live `frame_reset` VRAM Retention) While diagnosing this via F10 `upscaler` / `upscaler_mode` switches, `diag.log` also showed that a live `frame_reset` retains old `alias pool` + texture-object VRAM (`499 MB -> 1011 MB` alias pool, `785 MB -> 1403 MB` texture objects, total card VRAM `6778 MB -> 7456 MB` even 15s later), causing 8 GB GPUs to spill into Shared RAM (~2 FPS) on a subsequent live `frame_reset`. Happy to open a separate issue with full `diag.log` details if helpful. ### Environment - **OS:** Windows 11 Pro (Build 26300) - **CPU:** AMD Ryzen 9 7940HS - **GPU:** NVIDIA GeForce RTX 4070 Laptop GPU 8 GB (Driver `32.0.16.2147` / `621.47`) - **RAM:** 16 GB - **larp:** Checked against `origin/main` (`deb2a0d`, same `BAKE_PIXEL_SHADERS` / `LARP_PIPELINE_WAIT_MS` logic) ```
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 23:23:40 +00:00
Author
Owner

@⁠gamingwithhomie on GitHub · 2026-12-05 23:51 UTC · original

Fixed in v1.1.6 (building now) - thank you for the exact hashes and root cause. Two layers: (1) your suggested list is in - BAKE_PIXEL_SHADERS now covers the 2 PS_DecorationBlend + 6 e4d137db LUT hashes, so those pipelines are lasting() and always waited for; (2) systemic: any pipeline that has already lost a draw to the budget is never budget-dropped again (dropped_once -> full wait on next ask), so an unknown one-time draw can be lost at most once per pipeline instead of forever. Please verify black skin/lighting are gone with LARP_PIPELINE_WAIT_MS=8 on v1.1.6. Your frame_reset VRAM observation matches #367 - linked there.

**@⁠gamingwithhomie** on GitHub · 2026-12-05 23:51 UTC · [original](https://github.com/gamingwithhomie/larp/issues/335#issuecomment-7447897622) Fixed in **v1.1.6** (building now) - thank you for the exact hashes and root cause. Two layers: (1) your suggested list is in - `BAKE_PIXEL_SHADERS` now covers the 2 `PS_DecorationBlend` + 6 `e4d137db` LUT hashes, so those pipelines are `lasting()` and always waited for; (2) systemic: any pipeline that has already lost a draw to the budget is never budget-dropped again (`dropped_once` -> full wait on next ask), so an unknown one-time draw can be lost at most once per pipeline instead of forever. Please verify black skin/lighting are gone with `LARP_PIPELINE_WAIT_MS=8` on v1.1.6. Your frame_reset VRAM observation matches #367 - linked there.
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#335
No description provided.