[P0] Fix shader cache invalidation, Wave64 compute hang / NaN white-out, and 8 GB 4K VRAM headroom (#276) #372

Manually merged
github merged 1 commit from github-bot/gh-372 into gh-pr/372/base 2026-12-03 04:33:04 +00:00 AGit
Owner

@⁠Androtim on GitHub · 2026-12-03 04:04 UTC · original
Androtim:fix/p0-visuals-cache-and-vram → main · +733 −158 · 11 files · 1 commits · merged 2026-12-03 04:31 UTC

Fixes P0 visual regressions, shader cache invalidation, and 8 GB 4K VRAM headroom for #276.

Changes

  1. Shader Cache Auto-Invalidation & Build Tracking (crates/victory-gpu/src/shader_cache.rs, crates/victory-gpu/build.rs)

    • Bump SHADER_CACHE_VERSION from 1 to 2 so stale DXIL translations from earlier builds (.08/.09/.12/.03.01) are never reused across translator codegen fixes (#346/#356/#358/#370).
    • Recurse crates/victory-shader/src/ in uild.rs
      erun-if-changed so submodule changes always update the embedded translator fingerprint.
  2. Root-Cause & Fix: Blank White Screen / Dropped Compute Pipelines / Character Body & Night Starburst (crates/victory-shader/src/structure.rs, crates/victory-shader/src/emit/lower.rs, crates/victory-gpu/src/compose.rs)

    • Wave64 lowering regression (#356) + worker compile hang: On 2026.12.03.01, #356 broke 7 compute shaders (
      o wave32 lowering for this wave64 program is not supported) and pinned a pipeline worker inside O(N^2 * W) post-dominator bitset construction on a large compute shader, stalling
**@⁠Androtim** on GitHub · 2026-12-03 04:04 UTC · [original](https://github.com/Androtim/MiniVI/pull/372) `Androtim:fix/p0-visuals-cache-and-vram` → `main` · +733 −158 · 11 files · 1 commits · merged 2026-12-03 04:31 UTC Fixes P0 visual regressions, shader cache invalidation, and 8 GB 4K VRAM headroom for #276. ### Changes 1. **Shader Cache Auto-Invalidation & Build Tracking** (crates/victory-gpu/src/shader_cache.rs, crates/victory-gpu/build.rs) - Bump SHADER_CACHE_VERSION from 1 to 2 so stale DXIL translations from earlier builds (.08/.09/.12/.03.01) are never reused across translator codegen fixes (#346/#356/#358/#370). - Recurse crates/victory-shader/src/ in uild.rs erun-if-changed so submodule changes always update the embedded translator fingerprint. 2. **Root-Cause & Fix: Blank White Screen / Dropped Compute Pipelines / Character Body & Night Starburst** (crates/victory-shader/src/structure.rs, crates/victory-shader/src/emit/lower.rs, crates/victory-gpu/src/compose.rs) - **Wave64 lowering regression (#356) + worker compile hang**: On 2026.12.03.01, #356 broke 7 compute shaders ( o wave32 lowering for this wave64 program is not supported) and pinned a pipeline worker inside O(N^2 * W) post-dominator bitset construction on a large compute shader, stalling
- Bump SHADER_CACHE_VERSION from 1 to 2 in shader_cache.rs and recurse crates/victory-shader/src/ in victory-gpu/build.rs so stale DXIL translations from earlier builds are never reused after translator fixes (#346/#356/#358/#370).
- Fix compose.rs clean1() so NaN maps to 0.0 (transparent/black instead of 1.0 solid white), only +Inf maps to 1.0, and add D3D12 hardware regression test.
- Fix victory-shader structure.rs / emit/lower.rs Wave64 lowering (#356 regression): restrict multi-wave v_readfirstlane_b32 split_lds/widening to wave64 hosts without split LDS, avoid false vcc_outside_branch widening across scalar branches, and replace O(N^2 * W) post-dom bitsets with Cooper-Harvey-Kennedy PostDom + RegionWalker (fixes compute pipeline compile hang / dropped post-process pipelines).
- Reserve 640 MiB DXGI budget headroom by default on <= 8 GB adapters (budget_mb <= 7500) in host::planned_budget() (inspired by TrustNo1/Darner aa2bd4b, GPL-3.0) and tighten 4K <= 8 GB streaming/eviction thresholds (TEXTURE_ROOM=84, SLOT_EVICT=82/74) in play.rs so 4K dedicated VRAM stays strictly below DXGI budget.
- Add opt-in scheduled backbuffer capture (VICTORY_SCREENSHOT_AT_S) in host/screenshot.rs for unattended visual verification.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 04:07:03 +00:00
github-bot changed target branch from main to gh-pr/372/base 2026-12-03 04:33:01 +00:00
github manually merged commit 90086b6095 into gh-pr/372/base 2026-12-03 04:33:03 +00:00
Author
Owner

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

Deep Static Logic Audit — Pass #6 (90086b60): VERIFIED CLEAN (Green Light)

  • SHADER_CACHE_VERSION = 2 (shader_cache.rs:204), recursive victory-shader/src rerun-if-changed (build.rs:7-36), compose.rs:32-45 NaN->0.0 + pre-blend clean (R8G8B8A8_UNORM), CHK PostDom/RegionWalker + v_readfirstlane_b32/lds_wave (lower.rs:614-891, 2188-2240), and forward-join EXEC/vcc_unknown_exec (structure.rs:486, 741-785, lower.rs:5868) are sound with zero Wave32 NVIDIA, RDNA 4 Wave64, or VICTORY_HW_RT=0 regressions.
  • planned_budget() (host.rs:1259) + system_video_memory() (host.rs:13712, panel.rs, telemetry.rs) + play.rs:425-446 4K <= 8 GB thresholds keep dedicated_mb safely below DXGI budget_mb with zero underflow/overflow across 6–24 GB cards and preserve manual overrides; see Androtim/MiniVI#282 for full Pass #6 table and 3 non-blocking [P2] notes.
**@⁠Androtim** on GitHub · 2026-12-03 04:27 UTC · [original](https://github.com/Androtim/MiniVI/pull/372#issuecomment-7367660542) **Deep Static Logic Audit — Pass #6 (`90086b60`): VERIFIED CLEAN (Green Light)** - `SHADER_CACHE_VERSION = 2` (`shader_cache.rs:204`), recursive `victory-shader/src` `rerun-if-changed` (`build.rs:7-36`), `compose.rs:32-45` NaN->`0.0` + pre-blend `clean` (`R8G8B8A8_UNORM`), CHK `PostDom`/`RegionWalker` + `v_readfirstlane_b32`/`lds_wave` (`lower.rs:614-891, 2188-2240`), and forward-join `EXEC`/`vcc_unknown_exec` (`structure.rs:486, 741-785`, `lower.rs:5868`) are sound with zero Wave32 NVIDIA, RDNA 4 Wave64, or `VICTORY_HW_RT=0` regressions. - `planned_budget()` (`host.rs:1259`) + `system_video_memory()` (`host.rs:13712`, `panel.rs`, `telemetry.rs`) + `play.rs:425-446` 4K `<= 8 GB` thresholds keep `dedicated_mb` safely below DXGI `budget_mb` with zero underflow/overflow across 6–24 GB cards and preserve manual overrides; see `Androtim/MiniVI#282` for full Pass #6 table and 3 non-blocking `[P2]` notes.
Author
Owner

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

Deep Static Logic Audit Pass #6 (#282 comment 7367659732) signed off 90086b60 as VERIFIED CLEAN (Green Light) (0 [P0], 0 [P1] blockers — fixing all 3 Directive #37 P0/P1 regressions: SHADER_CACHE_VERSION = 2 + recursive victory-shader/src build.rs, CHK PostDom compute compile hang & #356 Wave64 compute recovery, compose.rs bit-level NaN -> 0.0, and 640 MiB <= 8 GB 4K DXGI headroom) and CI 47032544524 is GREEN. Merging to main — v2026.12.03.02 will be cut once main CI turns green!

**@⁠Androtim** on GitHub · 2026-12-03 04:31 UTC · [original](https://github.com/Androtim/MiniVI/pull/372#issuecomment-7367733901) Deep Static Logic Audit Pass #6 (`#282` comment `7367659732`) signed off `90086b60` as **VERIFIED CLEAN (Green Light)** (`0` `[P0]`, `0` `[P1]` blockers — fixing all 3 Directive `#37` P0/P1 regressions: `SHADER_CACHE_VERSION = 2` + recursive `victory-shader/src` `build.rs`, CHK `PostDom` compute compile hang & `#356` Wave64 compute recovery, `compose.rs` bit-level `NaN -> 0.0`, and `640 MiB` `<= 8 GB` 4K DXGI headroom) and CI `47032544524` is **GREEN**. Merging to `main` — **`v2026.12.03.02`** will be cut once `main` CI turns green!
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!372
No description provided.