fix(gpu,shader): prepare head blend-shape map early and exempt face LDS bounds (#276) #381

Manually merged
github merged 1 commit from github-bot/gh-381 into gh-pr/381/base 2026-12-04 04:25:34 +00:00 AGit
Owner

@⁠Androtim on GitHub · 2026-12-03 08:51 UTC · original
Androtim:fix/missing-character-head → main · +214 −7 · 5 files · 1 commits · merged 2026-12-04 04:21 UTC

Root Cause

  • Cold-cache missing character head (61e54e90adccaf6a): Compute program \61e54e90adccaf6a\ builds character heads' blend-shape mappings in a single one-shot dispatch at character load. Because it was missing from \scene_input()\ in \crates/victory-gpu/src/pipeline/make.rs, cold-cache launches queued it behind ~1,000 world shaders past the 80 ms per-frame wait budget, dropping that dispatch and leaving character heads missing. Warm-cache runs on the unchanged binary already compiled \61e54e90adccaf6a\ early and rendered the full head cleanly, proving the four unlowered Wave64 compute shaders were unrelated.
  • Cutscene face LDS clamping (FACE_PROGRAMS): 25 face network and blend-shape normal-reconstruction compute programs index group-shared memory past the size declared in their native headers; clamping them under \VICTORY_LDS_BOUNDS\ zeroes their output.

Changes

  • \crates/victory-gpu/src/pipeline/make.rs: Add \HEAD_BLEND_SHAPE_MAP\ (\61e54e90adccaf6a) to \scene_input()\ (adapted from \TrustNo1/Darner, GPL-3.0) + \ he_head_blend_shape_map_is_made_at_creation\ test.
  • \crates/victory-shader/src/emit/mod.rs, \crates/victory-shader/src/emit/lower.rs, \crates/victory-shader/src/emit/lower_tests.rs: Add \FACE_PROGRAMS\ (25 exact hashes, adapted from \TrustNo1/Darner, GPL-3.0) and \VICTORY_LDS_BOUNDS_EXEMPT\ (exact 16-hex hashes, \ll, or \
**@⁠Androtim** on GitHub · 2026-12-03 08:51 UTC · [original](https://github.com/Androtim/MiniVI/pull/381) `Androtim:fix/missing-character-head` → `main` · +214 −7 · 5 files · 1 commits · merged 2026-12-04 04:21 UTC ### Root Cause - **Cold-cache missing character head (61e54e90adccaf6a):** Compute program \61e54e90adccaf6a\ builds character heads' blend-shape mappings in a single one-shot dispatch at character load. Because it was missing from \scene_input()\ in \crates/victory-gpu/src/pipeline/make.rs\, cold-cache launches queued it behind ~1,000 world shaders past the 80 ms per-frame wait budget, dropping that dispatch and leaving character heads missing. Warm-cache runs on the unchanged binary already compiled \61e54e90adccaf6a\ early and rendered the full head cleanly, proving the four unlowered Wave64 compute shaders were unrelated. - **Cutscene face LDS clamping (FACE_PROGRAMS):** 25 face network and blend-shape normal-reconstruction compute programs index group-shared memory past the size declared in their native headers; clamping them under \VICTORY_LDS_BOUNDS\ zeroes their output. ### Changes - \crates/victory-gpu/src/pipeline/make.rs\: Add \HEAD_BLEND_SHAPE_MAP\ (\61e54e90adccaf6a\) to \scene_input()\ (adapted from \TrustNo1/Darner\, GPL-3.0) + \ he_head_blend_shape_map_is_made_at_creation\ test. - \crates/victory-shader/src/emit/mod.rs\, \crates/victory-shader/src/emit/lower.rs\, \crates/victory-shader/src/emit/lower_tests.rs\: Add \FACE_PROGRAMS\ (25 exact hashes, adapted from \TrustNo1/Darner\, GPL-3.0) and \VICTORY_LDS_BOUNDS_EXEMPT\ (exact 16-hex hashes, \ll\, or \
Root cause of missing character heads on cold shader cache launches:
- Compute program 61e54e90adccaf6a builds character heads' blend-shape mappings in a one-shot dispatch at character load. On cold launches without scene_input promotion, it missed the 80 ms frame wait budget behind ~1,000 world shaders, dropping that dispatch and leaving heads unrendered.
- Add HEAD_BLEND_SHAPE_MAP (61e54e90adccaf6a) to scene_input() so it compiles at creation ahead of first bind (adapted from TrustNo1/Darner, GPL-3.0).
- Exempt the 25 face network and normal-reconstruction compute shaders (FACE_PROGRAMS, adapted from TrustNo1/Darner, GPL-3.0) from VICTORY_LDS_BOUNDS clamping via VICTORY_LDS_BOUNDS_EXEMPT (exact 16-hex hashes, all, or 0), include VICTORY_LDS_BOUNDS_EXEMPT in TRANSLATOR_ENV_KEYS, and bump SHADER_CACHE_VERSION from 2 to 3.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 08:56:22 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-12-03 09:03 UTC · original

Read-only static audit of 4d35a2bb (CI check PASS): VERIFIED CLEAN (0 [P0], 0 [P1]).

  • pipeline/make.rs: adds HEAD_BLEND_SHAPE_MAP (61e54e90adccaf6a) to scene_input() with unit test verifying creation-time priority.
  • victory-shader/src/emit/{mod.rs,lower.rs}: adds FACE_PROGRAMS (25 exact 16-hex hashes) and VICTORY_LDS_BOUNDS_EXEMPT (default FACE_PROGRAMS, 0 opt-out, exact 16-hex validation) scoped via emit::translate's with_program() guard.
  • shader_cache.rs: adds VICTORY_LDS_BOUNDS_EXEMPT to TRANSLATOR_ENV_KEYS and bumps SHADER_CACHE_VERSION 2 -> 3 with unit tests.

Holding auto-merge solely for the GPU visual verification note (the PR description appears truncated mid-sentence at or \): once cold-cache head rendering + 0 crashes/DRED verification is posted (or manual green-light given), this is ready to merge immediately.

**@⁠Androtim** on GitHub · 2026-12-03 09:03 UTC · [original](https://github.com/Androtim/MiniVI/pull/381#issuecomment-7373107984) Read-only static audit of `4d35a2bb` (**CI `check` PASS**): **VERIFIED CLEAN (0 `[P0]`, 0 `[P1]`)**. - `pipeline/make.rs`: adds `HEAD_BLEND_SHAPE_MAP` (`61e54e90adccaf6a`) to `scene_input()` with unit test verifying creation-time priority. - `victory-shader/src/emit/{mod.rs,lower.rs}`: adds `FACE_PROGRAMS` (25 exact 16-hex hashes) and `VICTORY_LDS_BOUNDS_EXEMPT` (default `FACE_PROGRAMS`, `0` opt-out, exact 16-hex validation) scoped via `emit::translate`'s `with_program()` guard. - `shader_cache.rs`: adds `VICTORY_LDS_BOUNDS_EXEMPT` to `TRANSLATOR_ENV_KEYS` and bumps `SHADER_CACHE_VERSION` `2 -> 3` with unit tests. Holding auto-merge solely for the GPU visual verification note (the PR description appears truncated mid-sentence at `or \`): once cold-cache head rendering + `0` crashes/DRED verification is posted (or manual green-light given), this is ready to merge immediately.
Author
Owner

@⁠Androtim on GitHub · 2026-12-03 19:32 UTC · original

Marking triage: needs rebase after #402 (158fba11) merged onto main (SHADER_CACHE_VERSION bumped 2 -> 3 in shader_cache.rs; rebase should bump 3 -> 4). Audit Pass #23 was already clean — once rebased with green CI + cold-cache GPU head check, ready to merge!

**@⁠Androtim** on GitHub · 2026-12-03 19:32 UTC · [original](https://github.com/Androtim/MiniVI/pull/381#issuecomment-7389864285) Marking `triage: needs rebase` after `#402` (`158fba11`) merged onto `main` (`SHADER_CACHE_VERSION` bumped `2 -> 3` in `shader_cache.rs`; rebase should bump `3 -> 4`). Audit Pass #23 was already clean — once rebased with green CI + cold-cache GPU head check, ready to merge!
Author
Owner

@⁠Androtim on GitHub · 2026-12-03 20:02 UTC · original

Automated triage for the maintainers (not an approval).

Verdict: needs-rebase · CI (check): passing

This PR no longer merges cleanly into main.

To change the verdict: Rebase onto current main and resolve conflicts; CI and triage will run again automatically.


Generated with Antigravity CLI (agy).

**@⁠Androtim** on GitHub · 2026-12-03 20:02 UTC · [original](https://github.com/Androtim/MiniVI/pull/381#issuecomment-7390621862) <!-- minivi-triage v1 head=4d35a2bb3a816659ade214b119c046a08a57d1aa verdict=needs-rebase ci=passing at=2026-12-03T20:03:04Z --> Automated triage for the maintainers (not an approval). **Verdict:** `needs-rebase` · **CI (`check`):** `passing` This PR no longer merges cleanly into `main`. **To change the verdict:** Rebase onto current `main` and resolve conflicts; CI and triage will run again automatically. --- _Generated with Antigravity CLI (`agy`)._
github-bot force-pushed github-bot/gh-381 from 4d35a2bb3a to 63ac421790 2026-12-04 03:47:44 +00:00 Compare
github-bot force-pushed github-bot/gh-381 from 63ac421790 to d646b723b2 2026-12-04 03:58:25 +00:00 Compare
github-bot force-pushed github-bot/gh-381 from d646b723b2 to 5f808110b0 2026-12-04 04:03:51 +00:00 Compare
github-bot changed target branch from main to gh-pr/381/base 2026-12-04 04:25:32 +00:00
github manually merged commit 5f808110b0 into gh-pr/381/base 2026-12-04 04:25:34 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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/Androtim--MiniVI!381
No description provided.