[P1] Reflections wide-wave fold, uploaded/submission texture ordering, park compaction, and HW-RT safety (#276, #339) #373

Merged
Androtim merged 2 commits from upstream-pr/373 into main 2026-12-03 07:19:19 +00:00
Androtim commented 2026-12-03 06:34:44 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T06:34:44Z.


Summary

Adapts visual fidelity, texture streaming/compaction, and HW-RT safety improvements cleanly from GPL-3.0 upstream (TrustNo1/Darner and linkoovosh/LinkoArts-build):

  1. Reflections Temporal-Resolve Wide-Wave Folding (TrustNo1/Darner #74/#210/#267, GPL-3.0):
    • Port ictory-shader::fold + VICTORY_EXACT64=71883e40620a567a+7168dd781ca7efb9 default setting so the two temporal-resolve reflection shaders use exact 64-lane folding while keeping the SSR pre-pass (34992f2b65a789a5) excluded.
    • Include VICTORY_EXACT64 in shader_cache::TRANSLATOR_ENV_KEYS and remove the outdated stale-check bypass cleanly.
  2. Texture Stand-In & Streaming Fixes (GPL-3.0):
    • VICTORY_SHOW_UPLOADED=1 (linkoovosh/LinkoArts-build e1ccf31): hold texture descriptor slots until their first GPU upload completes so near geometry/foliage never flashes flat stand-in textures on 8 GB cards.
    • VICTORY_THIN_UPLOAD_ORDER & VICTORY_THIN_HEAP_ORDER (TrustNo1/Darner 623f176): process texture uploads ( exture/hoist.rs) and heap buffer refreshes (host/heap_order.rs) in thin submission order.
    • Continuous RAM/commit headroom caps & parked block compaction (TrustNo1/Darner 010323, cf5f2ea):
      esidency::shared_headroom continuously scales headroom from live free RAM/commit floors and VICTORY_PARK_COMPACT_WASTE=1 compacts mostly-empty parked blocks.
  3. HW-RT DRED Policy & Transform Snapshots (TrustNo1/Darner #293 & a84f7e/#294, GPL-3.0):
    • host/dred.rs: keep DRED breadcrumbs off under VICTORY_HW_RT=1 unless explicitly requested (VICTORY_D3D12_DRED=1 or light).
    • hwrt/sanitize.rs & hwrt.rs: snapshot Transform3x4 ( x_copy) at queue time so deferred BLAS builds never read recycled title transforms (VICTORY_HW_RT_TX_COPY=0 disables).
  4. Asset Policy Compliance (xtask policy):
    • Extract PostDom / RegionWalker into crates/victory-shader/src/emit/lower/post_dom.rs and host::batch_tests into crates/victory-gpu/src/host/batch_tests.rs to stay cleanly under the 640 KiB per-file policy cap.

Verification

Tested on an 8 GB VRAM / 32 GB RAM desktop GPU:

  • cargo xtask policy: 349 files ok
  • cargo clippy --workspace --all-targets --locked -- -D warnings & --all-features:
<!-- greyfinch-sync:Androtim/MiniVI:issue:5621329058 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/373). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-03T06:34:44Z. --- ## Summary Adapts visual fidelity, texture streaming/compaction, and HW-RT safety improvements cleanly from GPL-3.0 upstream (TrustNo1/Darner and linkoovosh/LinkoArts-build): 1. **Reflections Temporal-Resolve Wide-Wave Folding (TrustNo1/Darner #74/#210/#267, GPL-3.0):** - Port ictory-shader::fold + VICTORY_EXACT64=71883e40620a567a+7168dd781ca7efb9 default setting so the two temporal-resolve reflection shaders use exact 64-lane folding while keeping the SSR pre-pass (34992f2b65a789a5) excluded. - Include VICTORY_EXACT64 in shader_cache::TRANSLATOR_ENV_KEYS and remove the outdated stale-check bypass cleanly. 2. **Texture Stand-In & Streaming Fixes (GPL-3.0):** - VICTORY_SHOW_UPLOADED=1 (linkoovosh/LinkoArts-build e1ccf31): hold texture descriptor slots until their first GPU upload completes so near geometry/foliage never flashes flat stand-in textures on 8 GB cards. - VICTORY_THIN_UPLOAD_ORDER & VICTORY_THIN_HEAP_ORDER (TrustNo1/Darner 623f176): process texture uploads ( exture/hoist.rs) and heap buffer refreshes (host/heap_order.rs) in thin submission order. - Continuous RAM/commit headroom caps & parked block compaction (TrustNo1/Darner 010323, cf5f2ea): esidency::shared_headroom continuously scales headroom from live free RAM/commit floors and VICTORY_PARK_COMPACT_WASTE=1 compacts mostly-empty parked blocks. 3. **HW-RT DRED Policy & Transform Snapshots (TrustNo1/Darner #293 & a84f7e/#294, GPL-3.0):** - host/dred.rs: keep DRED breadcrumbs off under VICTORY_HW_RT=1 unless explicitly requested (VICTORY_D3D12_DRED=1 or light). - hwrt/sanitize.rs & hwrt.rs: snapshot Transform3x4 ( x_copy) at queue time so deferred BLAS builds never read recycled title transforms (VICTORY_HW_RT_TX_COPY=0 disables). 4. **Asset Policy Compliance (xtask policy):** - Extract PostDom / RegionWalker into crates/victory-shader/src/emit/lower/post_dom.rs and host::batch_tests into crates/victory-gpu/src/host/batch_tests.rs to stay cleanly under the 640 KiB per-file policy cap. ## Verification Tested on an 8 GB VRAM / 32 GB RAM desktop GPU: - cargo xtask policy: 349 files ok - cargo clippy --workspace --all-targets --locked -- -D warnings & --all-features:
Androtim commented 2026-12-03 06:57:30 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T06:57:30Z.


Pass #7 Static Audit — NEEDS FIX (3 [P1], 5 [P2]; full verdict table posted to #282):

  • [P1] crates/victory-gpu/src/resource.rs:3246 (VICTORY_PARK_COMPACT_WASTE): Phase 1 filters by clamped evict_idle_ms (<= 60 s) while Phase 3 still checks unclamped idle_ms (600 s when VRAM is healthy), causing sparse-block descriptor slot eviction thrash with zero compaction (fix: check evict_idle_ms).
  • [P1] crates/victory-shader/src/fold.rs:1106-1138, 1579-1581 (v_writelane_b32 & CFG dirty): v_writelane_b32 runs under EXEC_LO = E.hi (silently dropped by lower.rs when upper lanes are inactive / group <= 32), and linear dirty omits s_or_b32 exec_lo, e, e+1 at leaders reachable with EXEC_LO = VCC or unsettled E. (Texture ordering/headroom, VICTORY_HW_RT=0 zero-overhead, DRED/tx-copy alignment, GPL-3.0 credits, and clean-room checks all verified clean.)
<!-- greyfinch-sync:Androtim/MiniVI:comment:7370428204 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/373#issuecomment-7370428204). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-03T06:57:30Z. --- **Pass #7 Static Audit — NEEDS FIX** (`3 [P1]`, `5 [P2]`; full verdict table posted to #282): - **`[P1]` `crates/victory-gpu/src/resource.rs:3246`** (`VICTORY_PARK_COMPACT_WASTE`): Phase 1 filters by clamped `evict_idle_ms` (`<= 60 s`) while Phase 3 still checks unclamped `idle_ms` (`600 s` when VRAM is healthy), causing sparse-block descriptor slot eviction thrash with zero compaction (fix: check `evict_idle_ms`). - **`[P1]` `crates/victory-shader/src/fold.rs:1106-1138, 1579-1581`** (`v_writelane_b32` & CFG `dirty`): `v_writelane_b32` runs under `EXEC_LO = E.hi` (silently dropped by `lower.rs` when upper lanes are inactive / `group <= 32`), and linear `dirty` omits `s_or_b32 exec_lo, e, e+1` at `leaders` reachable with `EXEC_LO = VCC` or unsettled `E`. (Texture ordering/headroom, `VICTORY_HW_RT=0` zero-overhead, DRED/tx-copy alignment, GPL-3.0 credits, and clean-room checks all verified clean.)
Androtim commented 2026-12-03 07:17:20 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T07:17:20Z.


Pass #7.5 Targeted Sign-Off (34a701f6) — VERIFIED CLEAN (Green Light) (0 [P0], 0 [P1]; CI check passed; details posted to #282).
All 3 Pass #7 [P1] blockers (fold.rs v_writelane_b32 EXEC_LO = -1 & leader dirty/e_written reset; resource.rs unified evict_idle_ms in slot_evict Phases 1/3) plus 3 [P2] notes (mask9, v_cmpx side.writes, waste_evict_need cap) are soundly resolved with zero new [P0]/[P1] regressions.

<!-- greyfinch-sync:Androtim/MiniVI:comment:7370817376 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/373#issuecomment-7370817376). Originally posted by [Androtim](https://github.com/Androtim) on 2026-12-03T07:17:20Z. --- **Pass #7.5 Targeted Sign-Off (`34a701f6`) — VERIFIED CLEAN (Green Light)** (`0 [P0]`, `0 [P1]`; CI `check` passed; details posted to #282). All 3 Pass #7 `[P1]` blockers (`fold.rs` `v_writelane_b32` `EXEC_LO = -1` & leader `dirty`/`e_written` reset; `resource.rs` unified `evict_idle_ms` in `slot_evict` Phases 1/3) plus 3 `[P2]` notes (`mask9`, `v_cmpx` `side.writes`, `waste_evict_need` `cap`) are soundly resolved with zero new `[P0]`/`[P1]` regressions.
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Androtim/MiniVI!373
No description provided.