Iter 17: Wave32 water tile slots, strict VRAM pool gate, and NVIDIA book guard #2

Merged
Androtim merged 1 commit from upstream-pr/2 into main 2026-11-28 21:16:47 +00:00
Androtim commented 2026-11-28 00:12:41 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T00:12:41Z.


Summary

Ports three targeted stability, rendering, and VRAM-governance improvements onto main (f3c0c33), crediting fxceless/victory-fork and xss3009:

  1. Wave32 Open-Water Tile-Slot Fix (crates/victory-shader/src/emit/water_tile_slots.rs, emit/mod.rs, apps/victory/src/translate.rs):
    • Ported from fxceless/victory-fork (cd93552, idea by xss3009): rewrites CS_TransmissionVolumetrics_GenerateTiles before translation on 32-lane hosts so every lane allocates 1 slot cleanly, preventing second-wave slots from overwriting first-wave slots and eliminating dark 16x16 patches on open water around boats, piers, and lamps (VICTORY_WATER_TILE_SLOTS=0 opts out).
    • Wired identically in both runtime translate_plain and offline apps/victory/src/translate.rs.
  2. Strict VRAM Texture-Block Budget Gate (crates/victory-gpu/src/{pool,resource,draw,shadow,host}.rs):
    • Ported from fxceless/victory-fork (2eade68) while preserving MiniVI's 8 GB VRAM targets_room_kept_bytes (<= budget / 4 on <= 9 GiB GPUs) and memory_card_budget scaling:
    • Gates new 64 MiB texture blocks (VICTORY_POOL_GATE=1, default on) + adds fullest-block-first packing (VICTORY_POOL_FULLEST=1, default on) so unplaceable waitable heap textures hold their existing slot instead of overflowing DXGI VRAM budgets, and reserves targets_to_come inside block_room and shadow::by_address (by_address_room).
    • Adds detailed "texture blocks..." telemetry in host.rs.
  3. Eliminate Bogus Non-AMD Pool Error (crates/victory-gpu/src/book.rs):
    • Guards book::texture_address with if !crate::indirect::amd(&host.device) { return None; } because book::decode parses AMD RDNA 2+ descriptors and produced spurious POOL: the card reads a pooled texture's first level past the end... ERROR logs on NVIDIA GPUs.

Rig Specs Tested On

  • CPU: Intel Core i7-13700F
  • GPU & VRAM: NVIDIA GeForce RTX 4060 Ti 8 GB
  • System RAM: 32 GB
  • OS & GPU Driver: Windows 11 Home x64 (driver 32.0.16.2124)

Run Settings & Profile

  • Build & Commit SHA: diag & release (standalone -C link-self-contained=yes, bad_dlls=0) @ feat/iter17-vram-pool-gate-and-water-tiles
  • Console Profile & Internal Resolution / Scale: series-s — 720p (0.6666667 render scale)
  • Ray Tracing: off
  • Upscaling: DLSS quality (Streamline v2.14.16)
  • Frame Generation: off (unattended smoke test baseline)
  • Launcher Command / Preset & Extra VICTORY_* Overrides: verify-live.ps1 Series S 720p preset (VICTORY_NO_WATCHDOG=1, VICTORY_EARLY_DEPTH=1, VICTORY_NAN_SCRUB=1, VICTORY_SKIP_BINK=1, VICTORY_DLSS=1, VICTORY_DLSS_MODE=quality, VICTORY_D3D12_DRED=light)
  • Scene / Area & Session Length: Automated boot-to-menu smoke test (34s–120s), plus offline full shaders cache warm

Measurements & Verification

  • Base FPS (without Frame Gen): 30.0 FPS on menu (33.3 ms/frame) (unattended smoke baseline — interactive in-world boat/post-landing playtest pending)
  • Automated Checks (Local GNU 1.98.1):
    • cargo clippy --workspace --all-targets --locked -- -D warnings (passed)
    • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings (passed)
    • cargo test --locked -p xtask (6 passed; 0 failed, asset policy: 295 files ok)
    • cargo test -p victory-shader --lib water_tile_slots -- --test-threads=1 (2 passed; 0 failed)
    • cargo test -p victory-gpu -- --test-threads=1 (452 passed; 0 failed; 36 ignored, including 4 new pool + resource tests)
  • (CI run, offline shader warm count, and smoke-test verification will be posted in a comment once completed.)
<!-- greyfinch-sync:Androtim/MiniVI:issue:5534801055 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/2). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-28T00:12:41Z. --- ## Summary Ports three targeted stability, rendering, and VRAM-governance improvements onto `main` (`f3c0c33`), crediting `fxceless/victory-fork` and `xss3009`: 1. **Wave32 Open-Water Tile-Slot Fix (`crates/victory-shader/src/emit/water_tile_slots.rs`, `emit/mod.rs`, `apps/victory/src/translate.rs`):** - Ported from `fxceless/victory-fork` (`cd93552`, idea by `xss3009`): rewrites `CS_TransmissionVolumetrics_GenerateTiles` before translation on 32-lane hosts so every lane allocates 1 slot cleanly, preventing second-wave slots from overwriting first-wave slots and eliminating dark `16x16` patches on open water around boats, piers, and lamps (`VICTORY_WATER_TILE_SLOTS=0` opts out). - Wired identically in both runtime `translate_plain` and offline `apps/victory/src/translate.rs`. 2. **Strict VRAM Texture-Block Budget Gate (`crates/victory-gpu/src/{pool,resource,draw,shadow,host}.rs`):** - Ported from `fxceless/victory-fork` (`2eade68`) while **preserving MiniVI's 8 GB VRAM `targets_room_kept_bytes` (`<= budget / 4` on `<= 9 GiB` GPUs) and `memory_card_budget` scaling**: - Gates new 64 MiB texture blocks (`VICTORY_POOL_GATE=1`, default on) + adds fullest-block-first packing (`VICTORY_POOL_FULLEST=1`, default on) so unplaceable waitable heap textures hold their existing slot instead of overflowing DXGI VRAM budgets, and reserves `targets_to_come` inside `block_room` and `shadow::by_address` (`by_address_room`). - Adds detailed `"texture blocks..."` telemetry in `host.rs`. 3. **Eliminate Bogus Non-AMD Pool Error (`crates/victory-gpu/src/book.rs`):** - Guards `book::texture_address` with `if !crate::indirect::amd(&host.device) { return None; }` because `book::decode` parses AMD RDNA 2+ descriptors and produced spurious `POOL: the card reads a pooled texture's first level past the end...` `ERROR` logs on NVIDIA GPUs. ## Rig Specs Tested On - **CPU:** Intel Core i7-13700F - **GPU & VRAM:** NVIDIA GeForce RTX 4060 Ti 8 GB - **System RAM:** 32 GB - **OS & GPU Driver:** Windows 11 Home x64 (driver `32.0.16.2124`) ## Run Settings & Profile - **Build & Commit SHA:** `diag` & `release` (standalone `-C link-self-contained=yes`, `bad_dlls=0`) @ `feat/iter17-vram-pool-gate-and-water-tiles` - **Console Profile & Internal Resolution / Scale:** `series-s` — `720p` (`0.6666667` render scale) - **Ray Tracing:** `off` - **Upscaling:** `DLSS quality` (Streamline `v2.14.16`) - **Frame Generation:** `off` (unattended smoke test baseline) - **Launcher Command / Preset & Extra `VICTORY_*` Overrides:** `verify-live.ps1` Series S 720p preset (`VICTORY_NO_WATCHDOG=1`, `VICTORY_EARLY_DEPTH=1`, `VICTORY_NAN_SCRUB=1`, `VICTORY_SKIP_BINK=1`, `VICTORY_DLSS=1`, `VICTORY_DLSS_MODE=quality`, `VICTORY_D3D12_DRED=light`) - **Scene / Area & Session Length:** Automated boot-to-menu smoke test (`34s`–`120s`), plus offline full `shaders` cache warm ## Measurements & Verification - **Base FPS (without Frame Gen):** `30.0` FPS on menu (`33.3 ms/frame`) *(unattended smoke baseline — interactive in-world boat/post-landing playtest pending)* - **Automated Checks (Local GNU 1.98.1):** - [x] `cargo clippy --workspace --all-targets --locked -- -D warnings` (passed) - [x] `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` (passed) - [x] `cargo test --locked -p xtask` (`6 passed; 0 failed`, `asset policy: 295 files ok`) - [x] `cargo test -p victory-shader --lib water_tile_slots -- --test-threads=1` (`2 passed; 0 failed`) - [x] `cargo test -p victory-gpu -- --test-threads=1` (`452 passed; 0 failed; 36 ignored`, including 4 new `pool` + `resource` tests) - *(CI run, offline shader warm count, and smoke-test verification will be posted in a comment once completed.)*
Androtim commented 2026-11-28 00:30:17 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T00:30:17Z.


CI & Local Verification Complete (de65b67)

  • GitHub Actions CI: https://github.com/Androtim/MiniVI/actions/runs/46086667541 — success (clippy, clippy --all-features, xtask, workspace tests, victory-shader, victory-gpu)
  • Standalone Binaries (-C link-self-contained=yes): diag/victory.exe, diag/victory_sm.exe, release/victory.exe all built with bad_dlls=0
  • Offline Shader Cache Warm (VICTORY_EARLY_DEPTH=1, VICTORY_NAN_SCRUB=1):
    • 25,759 shaders cached, 226 untranslated (684 s)
    • 0 failures across watched water/lighting/hair digests including f5d10cde74333782 (CS_TransmissionVolumetrics_GenerateTiles rewritten via water_tile_slots.rs)
  • Unattended Live Boot Smoke Test (verify-live.ps1): 7/7 [PASS] in 34 s
    • Watchdog hooks applied=2 (VICTORY_NO_WATCHDOG=1)
    • Menu rendering 30.0 fps / 33.3 ms/frame (11 draws/frame x3 windows)
    • DLSS / Streamline clean (loaded=2, fails=0, Streamline v2.14.16)
    • 0 crashes / DRED resets, 0 critical wave64 shader failures, 0 lingering processes
    • pool_errors=0 (confirmed book::texture_address NVIDIA guard eliminated the bogus ERROR victory_gpu::pool messages)
    • 8 GB gate telemetry active cleanly: texture blocks: 5 blocks (320 MB), 29 MB free; a new block: 1166 MB + 64 MB + 850 MB buffers + 278 MB targets to come = 2358 MB vs 6462 MB line
<!-- greyfinch-sync:Androtim/MiniVI:comment:7230965009 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/2#issuecomment-7230965009). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-28T00:30:17Z. --- ### CI & Local Verification Complete (`de65b67`) - **GitHub Actions CI:** https://github.com/Androtim/MiniVI/actions/runs/46086667541 — **`success`** (`clippy`, `clippy --all-features`, `xtask`, workspace tests, `victory-shader`, `victory-gpu`) - **Standalone Binaries (`-C link-self-contained=yes`):** `diag/victory.exe`, `diag/victory_sm.exe`, `release/victory.exe` all built with `bad_dlls=0` - **Offline Shader Cache Warm (`VICTORY_EARLY_DEPTH=1`, `VICTORY_NAN_SCRUB=1`):** - `25,759` shaders cached, `226` untranslated (`684 s`) - **`0`** failures across watched water/lighting/hair digests including `f5d10cde74333782` (`CS_TransmissionVolumetrics_GenerateTiles` rewritten via `water_tile_slots.rs`) - **Unattended Live Boot Smoke Test (`verify-live.ps1`):** **7/7 `[PASS]`** in `34 s` - Watchdog hooks `applied=2` (`VICTORY_NO_WATCHDOG=1`) - Menu rendering `30.0 fps` / `33.3 ms/frame` (`11 draws/frame` x3 windows) - `DLSS / Streamline clean` (`loaded=2, fails=0`, Streamline `v2.14.16`) - `0` crashes / DRED resets, `0` critical wave64 shader failures, `0` lingering processes - **`pool_errors=0`** (confirmed `book::texture_address` NVIDIA guard eliminated the bogus `ERROR victory_gpu::pool` messages) - 8 GB gate telemetry active cleanly: `texture blocks: 5 blocks (320 MB), 29 MB free; a new block: 1166 MB + 64 MB + 850 MB buffers + 278 MB targets to come = 2358 MB vs 6462 MB line`
Androtim commented 2026-11-28 00:43:06 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T00:43:06Z.


Automated triage for the maintainers (not an approval).

Verdict: needs-gpu-test · CI (check): passing

Technical Review — PR #2

Verdict: needs-gpu-test (CI passing; logic and safety look solid, but in-world real-GPU verification is warranted for the wave32 shader rewrite and strict VRAM pool gate).

What Looks Good

  1. Wave32 water tile-slot rewrite (crates/victory-shader/src/emit/water_tile_slots.rs, emit/mod.rs, apps/victory/src/translate.rs):
    • Strictly gated on lower::host_max_wave() == 32, exact container digest (CONTAINER), HwStage::Cs, wave64, byte length (2112), and FNV-1a hash (CODE), with VICTORY_WATER_TILE_SLOTS=0 opt-out.
    • Wired consistently in both runtime (translate_plain) and offline (apps/victory/src/translate.rs) via emit::host_form.
    • Replaces the wave-wide ballot/prefix-sum append with per-lane v_mov_b32 v5, 1 (0x80 | 1) + the original atomic add/waits/size-load, padded with s_nop so branch targets and surrounding code stay aligned.
  2. Strict VRAM pool gate & fullest-first packing (crates/victory-gpu/src/{pool,resource,draw,shadow,host}.rs):
    • Pool::take_ripe (Grow::Yes/Must/No), no_fit caching (invalidated on add and reclaim), and VICTORY_POOL_FULLEST / VICTORY_POOL_GATE opt-outs are clean and well-tested.
    • draw.rs (State::heap_textures) runs pool::waiting(|| resource::host_resource(...)) before mutating a slot when pool::full() is active; resource::host_texture_as and resource::hosted respect pool::waits() so waitable textures neither fall back to standalone committed resources nor get permanently marked refused.
    • MiniVI's 8 GiB VRAM scaling (targets_room_kept_bytes and shadow::memory_card_budget) is preserved, while block_room and shadow::by_address (by_address_room) now reserve targets_to_come.
  3. Non-AMD book::texture_address guard (crates/victory-gpu/src/book.rs):
    • Guarding with !crate::indirect::amd(&host.device) cleanly prevents AMD RDNA 2+ descriptor decoding from running on NVIDIA/Intel descriptors and emitting bogus POOL: errors.

Minor Non-Blocking Notes

  • water_tile_slots::tests::an_append_becomes_one_add_a_lane_and_keeps_its_length duplicates the rewrite loop body rather than calling a shared helper used by rewrite(), so future edits to rewrite() wouldn't be directly exercised by that test.
  • resource::block_fits uses plain + (used + kept + POOL_BLOCK <= line); using saturating_add (as in by_address_fits) would be slightly more defensive.

Local GPU Verification Needed

Because the PR body notes only a boot-to-menu smoke test so far, please run an in-world playtest on an NVIDIA 8 GB Wave32 host (e.g. RTX 4060 Ti) covering open water (boats/piers/lamps) and sustained VRAM pressure before merging.

(Automated technical triage review — does not constitute formal maintainer approval.)


Generated with Antigravity CLI (agy).

<!-- greyfinch-sync:Androtim/MiniVI:comment:7231139913 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/2#issuecomment-7231139913). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-28T00:43:06Z. --- <!-- minivi-triage v1 head=de65b678d4d2ce37b5f196bbb4f5f71db7914008 verdict=needs-gpu-test ci=passing at=2026-11-28T00:43:34Z --> Automated triage for the maintainers (not an approval). **Verdict:** `needs-gpu-test` · **CI (`check`):** `passing` ### Technical Review — PR #2 **Verdict:** `needs-gpu-test` (CI passing; logic and safety look solid, but in-world real-GPU verification is warranted for the wave32 shader rewrite and strict VRAM pool gate). #### What Looks Good 1. **Wave32 water tile-slot rewrite (`crates/victory-shader/src/emit/water_tile_slots.rs`, `emit/mod.rs`, `apps/victory/src/translate.rs`):** - Strictly gated on `lower::host_max_wave() == 32`, exact container digest (`CONTAINER`), `HwStage::Cs`, `wave64`, byte length (`2112`), and FNV-1a hash (`CODE`), with `VICTORY_WATER_TILE_SLOTS=0` opt-out. - Wired consistently in both runtime (`translate_plain`) and offline (`apps/victory/src/translate.rs`) via `emit::host_form`. - Replaces the wave-wide ballot/prefix-sum append with per-lane `v_mov_b32 v5, 1` (`0x80 | 1`) + the original atomic add/waits/size-load, padded with `s_nop` so branch targets and surrounding code stay aligned. 2. **Strict VRAM pool gate & fullest-first packing (`crates/victory-gpu/src/{pool,resource,draw,shadow,host}.rs`):** - `Pool::take_ripe` (`Grow::Yes`/`Must`/`No`), `no_fit` caching (invalidated on `add` and `reclaim`), and `VICTORY_POOL_FULLEST` / `VICTORY_POOL_GATE` opt-outs are clean and well-tested. - `draw.rs` (`State::heap_textures`) runs `pool::waiting(|| resource::host_resource(...))` before mutating a slot when `pool::full()` is active; `resource::host_texture_as` and `resource::hosted` respect `pool::waits()` so waitable textures neither fall back to standalone committed resources nor get permanently marked `refused`. - MiniVI's 8 GiB VRAM scaling (`targets_room_kept_bytes` and `shadow::memory_card_budget`) is preserved, while `block_room` and `shadow::by_address` (`by_address_room`) now reserve `targets_to_come`. 3. **Non-AMD `book::texture_address` guard (`crates/victory-gpu/src/book.rs`):** - Guarding with `!crate::indirect::amd(&host.device)` cleanly prevents AMD RDNA 2+ descriptor decoding from running on NVIDIA/Intel descriptors and emitting bogus `POOL:` errors. #### Minor Non-Blocking Notes - `water_tile_slots::tests::an_append_becomes_one_add_a_lane_and_keeps_its_length` duplicates the rewrite loop body rather than calling a shared helper used by `rewrite()`, so future edits to `rewrite()` wouldn't be directly exercised by that test. - `resource::block_fits` uses plain `+` (`used + kept + POOL_BLOCK <= line`); using `saturating_add` (as in `by_address_fits`) would be slightly more defensive. #### Local GPU Verification Needed Because the PR body notes only a boot-to-menu smoke test so far, please run an in-world playtest on an NVIDIA 8 GB Wave32 host (e.g. RTX 4060 Ti) covering open water (boats/piers/lamps) and sustained VRAM pressure before merging. *(Automated technical triage review — does not constitute formal maintainer approval.)* --- _Generated with Antigravity CLI (`agy`)._
Androtim commented 2026-11-28 21:11:08 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T21:11:08Z.


Real-GPU Playtest Report (Combined Build 1 Stack — RT OFF)

Tested in combined Build 1 (origin/main + Build 1 PRs #2, #3, #4, #6, #7, #9, #10, #11, #12, #14, #15, #18, #19, #22, #25, #26, #27, #33, #34, #36, #40, #43, #44, #46) on NVIDIA GeForce RTX 4060 Ti (8 GB), Windows, Series S (quality-720p, DLSS Quality):

  • Duration & Stability: 21-minute open-world session (1a-build1-world.log) — 0 crashes, 0 DRED resets, clean exit.
  • Performance: 28.2 fps (35.4 ms/frame) mid-run, 16.9 fps (59.3 ms/frame, 4,446 draws/frame) in heavy scene.
  • Key Subsystems Verified in Logs:
    • Swap chain / tearing: tearing=true, 0 refused presents.
    • Underwater compute (926c46bab3b86bd6): Translated and built host PSO cleanly.
    • Descriptor slots (VICTORY_THIN_GATE): Active (0 no free dynamic descriptor slots warnings).
    • VRAM & texture pool: Bounded at 6,934 MB in use (33 texture blocks = 2,112 MB, 1,036 MB free), 0 bogus POOL: errors.
    • DLSS: 16,577 upscalings (0 failed).
  • Visual observation during heavy initial streaming: Character top briefly appeared solid black while 8,802 textures were still queued / 206 non-RT draws dropped without a host pipeline; no D3D12 errors.
<!-- greyfinch-sync:Androtim/MiniVI:comment:7245833534 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/2#issuecomment-7245833534). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-28T21:11:08Z. --- ### Real-GPU Playtest Report (Combined Build 1 Stack — RT OFF) Tested in combined Build 1 (`origin/main` + Build 1 PRs `#2, #3, #4, #6, #7, #9, #10, #11, #12, #14, #15, #18, #19, #22, #25, #26, #27, #33, #34, #36, #40, #43, #44, #46`) on **NVIDIA GeForce RTX 4060 Ti (8 GB), Windows, Series S (`quality-720p`, DLSS Quality)**: - **Duration & Stability:** **21-minute** open-world session (`1a-build1-world.log`) — **0 crashes, 0 DRED resets**, clean exit. - **Performance:** `28.2 fps` (`35.4 ms/frame`) mid-run, `16.9 fps` (`59.3 ms/frame`, `4,446` draws/frame) in heavy scene. - **Key Subsystems Verified in Logs:** - **Swap chain / tearing:** `tearing=true`, `0` refused presents. - **Underwater compute (`926c46bab3b86bd6`):** Translated and built host PSO cleanly. - **Descriptor slots (`VICTORY_THIN_GATE`):** Active (`0` `no free dynamic descriptor slots` warnings). - **VRAM & texture pool:** Bounded at `6,934 MB` in use (`33` texture blocks = `2,112 MB`, `1,036 MB` free), `0` bogus `POOL:` errors. - **DLSS:** `16,577` upscalings (`0` failed). - **Visual observation during heavy initial streaming:** Character top briefly appeared solid black while `8,802` textures were still queued / `206` non-RT draws dropped without a host pipeline; no D3D12 errors.
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!2
No description provided.