fix(gpu): revert broken RT-skip and opaque stand-in defaults and fix stale ambient reflection gather #409

Manually merged
github merged 2 commits from github-bot/gh-409 into gh-pr/409/base 2026-12-03 22:37:15 +00:00 AGit
Owner

@⁠Androtim on GitHub · 2026-12-03 20:29 UTC · original
Androtim:fix/revert-broken-rt-skip-and-standin-defaults → main · +220 −54 · 5 files · 2 commits · merged 2026-12-03 21:02 UTC

Summary

Hotfix for the v2026.12.03.08 visual regressions observed in live Series S + DLSS FG 2X runs (blinding white surfaces/puddles, horizontal smears, broken character skinning/hollow face) introduced across #401 (a86f871) and #402 (158fba1):

  1. crates/victory-gpu/src/pipeline.rs & draw.rs (from #401):

    • Changed VICTORY_RT_SKIP_RESOLVE and VICTORY_RT_SKIP_DEAD from default-on to default-off (== Some("1") opt-in only).
    • Removed CSComputeSkinning from DeadRt::Feeds so character skinning and mesh deformation are never classified as dead RT.
    • Kept VICTORY_BVH_STUB, DOM_LOADS polling-loop pinning, and VICTORY_CUDA_PRELOAD intact.
  2. crates/victory-gpu/src/descriptor/host.rs (from #402):

    • Changed VICTORY_STANDIN_OPAQUE from default-on ([0x80, 0x80, 0x80, 0xff]) to default-off ([0x80, 0x80, 0x80, 0x80], opt-in with =1) so unmapped/evicted overlay, decal, puddle, and mask textures do not evaluate with opaque 1.0 alpha.
    • Tightened gray_fits() to also exclude single-channel mask formats (R8_UNORM, BC4_UNORM, BC4_TYPELESS) and HDR lighting/reflection float/BC6H formats (R16G16B16A16_FLOAT, R11G11B10_FLOAT, BC6H_*) so those stay null (0,0,0,0) while keeping neutral gray stand-ins for color/YCbCr/BC5/BC7 textures.
  3. crates/victory-gpu/src/ambient.rs (from #401):

    • Replaced sticky boolean miss_needs_gather(set, GATHERED) with per-frame GATHERED_FRAME tracking (miss_needs_gather(set, gathered_frame, current_frame)): Role::Miss only skips place + gather when cells/points were already populated in the current frame, preventing reflect_light from reading frozen/stale buffers when Role::Resolve is skipped or runs later.
    • Gated without_depth() (bound_light) gathered-points blending on recent GATHERED_FRAME freshness (<= 1 frame), falling back to cells[CELLS].rgb otherwise.
    • Verified WORDS = 19 cbuffer layout (filter, chroma_scrub, least) matches both RS and RS_BOUND cleanly.
  4. crates/victory-gpu/src/streamline.rs (from #402):

    • Audited camera.planes_in_order() against plan::Camera::constants() and plan::projection(): projection() requires near < far (far <= near triggers the infinite-far fallback with b = near), and framegen already used planes_in_order(). Left intact.

Verification

  • cargo test -p victory-gpu --lib pipeline (45 passed)
  • cargo test -p victory-gpu --lib ambient (23 passed, 1 ignored)
  • cargo test -p victory-gpu --lib streamline (all passed)
  • cargo test -p victory-gpu --lib descriptor (103 passed, 1 ignored)
  • cargo clippy --workspace --all-targets -- -D warnings (clean)
  • cargo xtask policy (asset policy: 357 files ok)
**@⁠Androtim** on GitHub · 2026-12-03 20:29 UTC · [original](https://github.com/Androtim/MiniVI/pull/409) `Androtim:fix/revert-broken-rt-skip-and-standin-defaults` → `main` · +220 −54 · 5 files · 2 commits · merged 2026-12-03 21:02 UTC ## Summary Hotfix for the `v2026.12.03.08` visual regressions observed in live Series S + DLSS FG 2X runs (blinding white surfaces/puddles, horizontal smears, broken character skinning/hollow face) introduced across #401 (`a86f871`) and #402 (`158fba1`): 1. **`crates/victory-gpu/src/pipeline.rs` & `draw.rs` (from #401):** - Changed `VICTORY_RT_SKIP_RESOLVE` and `VICTORY_RT_SKIP_DEAD` from default-on to **default-off** (`== Some("1")` opt-in only). - Removed `CSComputeSkinning` from `DeadRt::Feeds` so character skinning and mesh deformation are never classified as dead RT. - Kept `VICTORY_BVH_STUB`, `DOM_LOADS` polling-loop pinning, and `VICTORY_CUDA_PRELOAD` intact. 2. **`crates/victory-gpu/src/descriptor/host.rs` (from #402):** - Changed `VICTORY_STANDIN_OPAQUE` from default-on (`[0x80, 0x80, 0x80, 0xff]`) to **default-off** (`[0x80, 0x80, 0x80, 0x80]`, opt-in with `=1`) so unmapped/evicted overlay, decal, puddle, and mask textures do not evaluate with opaque `1.0` alpha. - Tightened `gray_fits()` to also exclude single-channel mask formats (`R8_UNORM`, `BC4_UNORM`, `BC4_TYPELESS`) and HDR lighting/reflection float/BC6H formats (`R16G16B16A16_FLOAT`, `R11G11B10_FLOAT`, `BC6H_*`) so those stay null `(0,0,0,0)` while keeping neutral gray stand-ins for color/YCbCr/BC5/BC7 textures. 3. **`crates/victory-gpu/src/ambient.rs` (from #401):** - Replaced sticky boolean `miss_needs_gather(set, GATHERED)` with per-frame `GATHERED_FRAME` tracking (`miss_needs_gather(set, gathered_frame, current_frame)`): `Role::Miss` only skips `place` + `gather` when `cells`/`points` were already populated in the **current frame**, preventing `reflect_light` from reading frozen/stale buffers when `Role::Resolve` is skipped or runs later. - Gated `without_depth()` (`bound_light`) gathered-points blending on recent `GATHERED_FRAME` freshness (`<= 1` frame), falling back to `cells[CELLS].rgb` otherwise. - Verified `WORDS = 19` cbuffer layout (`filter`, `chroma_scrub`, `least`) matches both `RS` and `RS_BOUND` cleanly. 4. **`crates/victory-gpu/src/streamline.rs` (from #402):** - Audited `camera.planes_in_order()` against `plan::Camera::constants()` and `plan::projection()`: `projection()` requires `near < far` (`far <= near` triggers the infinite-far fallback with `b = near`), and `framegen` already used `planes_in_order()`. Left intact. ## Verification - `cargo test -p victory-gpu --lib pipeline` (45 passed) - `cargo test -p victory-gpu --lib ambient` (23 passed, 1 ignored) - `cargo test -p victory-gpu --lib streamline` (all passed) - `cargo test -p victory-gpu --lib descriptor` (103 passed, 1 ignored) - `cargo clippy --workspace --all-targets -- -D warnings` (clean) - `cargo xtask policy` (`asset policy: 357 files ok`)
Fixes the visual regressions introduced in v2026.12.03.08 (#401, #402):

1. pipeline.rs / draw.rs:
   - Default VICTORY_RT_SKIP_RESOLVE and VICTORY_RT_SKIP_DEAD to OFF (opt-in =1 only) instead of default-on.
   - Never classify CSComputeSkinning as DeadRt::Feeds so character skinning and mesh deformation stay intact.
   - Preserves VICTORY_BVH_STUB, DOM_LOADS polling-loop pinning, and VICTORY_CUDA_PRELOAD.

2. descriptor/host.rs:
   - Default VICTORY_STANDIN_OPAQUE to OFF (opt-in =1 only) so neutral fallback stand-ins use 0x80 alpha instead of 0xff opaque alpha.
   - Exclude single-channel mask formats (R8_UNORM, BC4_UNORM/TYPELESS) and HDR lighting/reflection float/BC6H formats (R16G16B16A16_FLOAT, R11G11B10_FLOAT, BC6H_*) from gray_fits() so unmapped/evicted mask and HDR slots stay null (0,0,0,0) while preserving neutral gray stand-ins for color/YCbCr/BC5/BC7 textures.

3. ambient.rs:
   - Track GATHERED_FRAME (frame index of the latest place+gather pass) so Role::Miss only skips place+gather when cells/points were already gathered in the current frame, preventing reflect_light from reading stale or uninitialized buffers when Role::Resolve is skipped or runs later.
   - Gate without_depth() (bound_light) gathered-points blending on recent GATHERED_FRAME freshness, falling back to cells[CELLS].rgb otherwise.

4. streamline.rs:
   - Verified camera.planes_in_order() is mathematically required by Camera::constants() / projection() for reverse-Z (matches framegen) and left intact.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 20:31:25 +00:00
Author
Owner

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

Read-only full diff audit (7fbc01d5, 4 files +113/-45, 100% title-neutral): VERIFIED CLEAN (0 P0/P1).

  • Surgically resolves all three v2026.12.03.08 live visual regressions:
    1. Reverts VICTORY_RT_SKIP_RESOLVE / VICTORY_RT_SKIP_DEAD to default-off and removes CSComputeSkinning from DeadRt::Feeds (fixes character skinning / hollow faces).
    2. Reverts VICTORY_STANDIN_OPAQUE to default-off ([0x80, 0x80, 0x80, 0x80]) and excludes single-channel mask (R8_UNORM, BC4_*) and HDR float/BC6H_* formats from gray_fits() (fixes blown-out white surfaces/puddles).
    3. Replaces sticky GATHERED with per-frame GATHERED_FRAME in ambient.rs (prevents stale reflect_light / without_depth reads).
  • Ready for fast squash-merge + v2026.12.03.09 hotfix release once CI check completes green.
**@⁠Androtim** on GitHub · 2026-12-03 20:32 UTC · [original](https://github.com/Androtim/MiniVI/pull/409#issuecomment-7391405225) Read-only full diff audit (`7fbc01d5`, 4 files `+113/-45`, 100% title-neutral): **VERIFIED CLEAN (0 P0/P1)**. - Surgically resolves all three `v2026.12.03.08` live visual regressions: 1. Reverts `VICTORY_RT_SKIP_RESOLVE` / `VICTORY_RT_SKIP_DEAD` to default-off and removes `CSComputeSkinning` from `DeadRt::Feeds` (fixes character skinning / hollow faces). 2. Reverts `VICTORY_STANDIN_OPAQUE` to default-off (`[0x80, 0x80, 0x80, 0x80]`) and excludes single-channel mask (`R8_UNORM`, `BC4_*`) and HDR float/`BC6H_*` formats from `gray_fits()` (fixes blown-out white surfaces/puddles). 3. Replaces sticky `GATHERED` with per-frame `GATHERED_FRAME` in `ambient.rs` (prevents stale `reflect_light` / `without_depth` reads). - Ready for fast squash-merge + `v2026.12.03.09` hotfix release once CI `check` completes green.
When SW-RT (VICTORY_BVH_BUILDER=1) or HW-RT is active on a cold shader cache, CS_RaytracingResolve shaders (~600-1000 variants taking 1-3+ s each) are no longer left out and previously flooded Queue::requested and Queue::early ahead of fast world, lighting, and post-processing compute pipelines, starving all pipeline workers for minutes and leaving the 3D scene pure black while 2D screen-pass HUD draws still rendered.

- Tag CS_RaytracingResolve pipelines on Pending (rt_resolve) and route them into the slow-throttled queues (Queue::slow for EARLY, Queue::requested_slow for REQUESTED) bounded by slow_limit so fast world/lighting/post-process pipelines always drain first.
- Skip blocking frame wait_budget() on rt_resolve dispatches so cold RT resolve dispatches never exhaust the shared 80 ms per-frame wait budget.
- Add unit tests covering Queue throttling/promotion/non-blocking wait for rt_resolve and VICTORY_AMBIENT_RT=0.5,2.0,0.8 band bounds under SW-RT.
github-bot changed target branch from main to gh-pr/409/base 2026-12-03 21:09:10 +00:00
Author
Owner

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

Audited follow-up commit 9de107b8 (pipeline/make.rs + ambient.rs, CI check PASS): VERIFIED CLEAN (0 P0/P1).

  • Clean Queue::requested_slow + slow_limit throttling and unclaimed(..., REQUESTED) guard prevent CS_RaytracingResolve from starving fast world/lighting/post-FX pipelines or burning the 80 ms per-frame wait budget on cold SW-RT/HW-RT caches, with exact was_slow / slow_now accounting.
  • Merging this P0 v2026.12.03.08 hotfix via squash now (v2026.12.03.09 queued once main CI completes green).
**@⁠Androtim** on GitHub · 2026-12-03 21:02 UTC · [original](https://github.com/Androtim/MiniVI/pull/409#issuecomment-7392184899) Audited follow-up commit `9de107b8` (`pipeline/make.rs` + `ambient.rs`, **CI `check` PASS**): **VERIFIED CLEAN (0 P0/P1)**. - Clean `Queue::requested_slow` + `slow_limit` throttling and `unclaimed(..., REQUESTED)` guard prevent `CS_RaytracingResolve` from starving fast world/lighting/post-FX pipelines or burning the 80 ms per-frame wait budget on cold SW-RT/HW-RT caches, with exact `was_slow` / `slow_now` accounting. - Merging this P0 `v2026.12.03.08` hotfix via squash now (`v2026.12.03.09` queued once `main` CI completes green).
github manually merged commit 9de107b807 into gh-pr/409/base 2026-12-03 22:37:15 +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!409
No description provided.