gpu(descriptor): default capped hosts to 393,216 dynamic slots #155

Merged
Androtim merged 1 commit from upstream-pr/155 into main 2026-11-29 21:27:14 +00:00
Androtim commented 2026-11-29 19:11:05 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T19:11:05Z.


Default capped 1,000,000-view host descriptor heaps (null < PORTABLE_VIEWS, e.g. NVIDIA) to 393,216 dynamic slots (PORTABLE_DYNAMIC_DEFAULT, leaving 606,783 static title slots) and honor VICTORY_DYNAMIC_SLOTS overrides up to PORTABLE_DYNAMIC_CAP (524,288) via dynamic_slots_for. Previously capped hosts were fixed at 262,144 (DYNAMIC), which could exhaust dynamic descriptor table allocations during heavy area streaming.

Changes (crates/victory-gpu/src/descriptor/host.rs)

  • Added PORTABLE_DYNAMIC_CAP (524,288), PORTABLE_DYNAMIC_DEFAULT (393,216), and dynamic_slots_for(count, null, requested).
  • Wired dynamic_slots(count, null) to respect VICTORY_DYNAMIC_SLOTS on capped heaps while keeping uncapped heaps unchanged.
  • Added unit test dynamic_slots_for_capped_and_uncapped_hosts.

Verification

  • cargo +1.98.1-x86_64-pc-windows-gnu run --locked -p xtask -- policy
  • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --locked -- descriptor::host::
  • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --locked --all-targets -- -D warnings (default features and --all-features)
<!-- greyfinch-sync:Androtim/MiniVI:issue:5554122260 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/155). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-29T19:11:05Z. --- Default capped 1,000,000-view host descriptor heaps (`null < PORTABLE_VIEWS`, e.g. NVIDIA) to `393,216` dynamic slots (`PORTABLE_DYNAMIC_DEFAULT`, leaving `606,783` static title slots) and honor `VICTORY_DYNAMIC_SLOTS` overrides up to `PORTABLE_DYNAMIC_CAP` (`524,288`) via `dynamic_slots_for`. Previously capped hosts were fixed at `262,144` (`DYNAMIC`), which could exhaust dynamic descriptor table allocations during heavy area streaming. ### Changes (`crates/victory-gpu/src/descriptor/host.rs`) - Added `PORTABLE_DYNAMIC_CAP` (`524,288`), `PORTABLE_DYNAMIC_DEFAULT` (`393,216`), and `dynamic_slots_for(count, null, requested)`. - Wired `dynamic_slots(count, null)` to respect `VICTORY_DYNAMIC_SLOTS` on capped heaps while keeping uncapped heaps unchanged. - Added unit test `dynamic_slots_for_capped_and_uncapped_hosts`. ### Verification - `cargo +1.98.1-x86_64-pc-windows-gnu run --locked -p xtask -- policy` - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --locked -- descriptor::host::` - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --locked --all-targets -- -D warnings` (default features and `--all-features`)
Androtim commented 2026-11-29 20:02:55 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T20:02:55Z.


Automated triage for the maintainers (not an approval).

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

Review Summary

Clean, well-scoped change in crates/victory-gpu/src/descriptor/host.rs:

  • Extracts dynamic_slots_for(count, null, requested) with PORTABLE_DYNAMIC_DEFAULT (393,216) and PORTABLE_DYNAMIC_CAP (524,288), and wires VICTORY_DYNAMIC_SLOTS into capped hosts (null < PORTABLE_VIEWS) as well as null == 0 while leaving uncapped hosts (null >= PORTABLE_VIEWS) unchanged.
  • Clamping logic is panic-free (DYNAMIC.min(cap) <= cap) and guarantees extra <= null, preventing underflow at null - extra in HostHeap::new.
  • CI is passing and unit test dynamic_slots_for_capped_and_uncapped_hosts covers default, bounded override, floor/cap clamping, and uncapped paths.

Real-GPU Verification Note

On 1,000,000-view capped hosts (PORTABLE_VIEWS, e.g. NVIDIA), raising the default from 262,144 (DYNAMIC) to 393,216 (PORTABLE_DYNAMIC_DEFAULT) reduces static title slots (fitted = null - extra in HostHeap::new) from 737,855 to 606,783. Because the existing comment on DYNAMIC notes peak title view slots around ~720,000, this should be smoke-tested on a capped NVIDIA GPU to confirm that views above 606,783 do not regress rendering or increase dynamic-slot pressure enough to offset the added headroom (and that VICTORY_DYNAMIC_SLOTS=262144 cleanly restores the prior split if needed).

(Note: related to the NVIDIA dynamic-slot expansion bundled in broader PR #1, though this PR cleanly isolates the change.)


Generated with Antigravity CLI (agy).

<!-- greyfinch-sync:Androtim/MiniVI:comment:7261764092 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/155#issuecomment-7261764092). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-29T20:02:55Z. --- <!-- minivi-triage v1 head=284c7d9799b01d84356ce304c81ebaab70402f38 verdict=needs-gpu-test ci=passing at=2026-11-29T20:03:29Z --> Automated triage for the maintainers (not an approval). **Verdict:** `needs-gpu-test` · **CI (`check`):** `passing` ### Review Summary Clean, well-scoped change in `crates/victory-gpu/src/descriptor/host.rs`: - Extracts `dynamic_slots_for(count, null, requested)` with `PORTABLE_DYNAMIC_DEFAULT` (`393,216`) and `PORTABLE_DYNAMIC_CAP` (`524,288`), and wires `VICTORY_DYNAMIC_SLOTS` into capped hosts (`null < PORTABLE_VIEWS`) as well as `null == 0` while leaving uncapped hosts (`null >= PORTABLE_VIEWS`) unchanged. - Clamping logic is panic-free (`DYNAMIC.min(cap) <= cap`) and guarantees `extra <= null`, preventing underflow at `null - extra` in `HostHeap::new`. - CI is passing and unit test `dynamic_slots_for_capped_and_uncapped_hosts` covers default, bounded override, floor/cap clamping, and uncapped paths. ### Real-GPU Verification Note On 1,000,000-view capped hosts (`PORTABLE_VIEWS`, e.g. NVIDIA), raising the default from `262,144` (`DYNAMIC`) to `393,216` (`PORTABLE_DYNAMIC_DEFAULT`) reduces static title slots (`fitted = null - extra` in `HostHeap::new`) from `737,855` to `606,783`. Because the existing comment on `DYNAMIC` notes peak title view slots around `~720,000`, this should be smoke-tested on a capped NVIDIA GPU to confirm that views above `606,783` do not regress rendering or increase dynamic-slot pressure enough to offset the added headroom (and that `VICTORY_DYNAMIC_SLOTS=262144` cleanly restores the prior split if needed). *(Note: related to the NVIDIA dynamic-slot expansion bundled in broader PR #1, though this PR cleanly isolates the change.)* --- _Generated with Antigravity CLI (`agy`)._
Androtim commented 2026-11-29 21:27:10 +00:00 (Migrated from github.com)

Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-29T21:27:10Z.


Automated RTX 4060 Ti 8 GB Open-World A/B hardware verification PASSED (playtest/wave5 vs origin/main b1b6dc1, VICTORY_LEVELS_ON_DEMAND=0 play-parity):

  • Hardware cargo test (RTX 4060 Ti): 645 passed, 0 failed (victory 39/39, victory-shader emit::wave64_tests 19/19 & lower 19/19, victory-gpu 568/568).
  • 45s Open-World A/B (scripts/verify-world.ps1, DLSS Quality + open-world save):
    • FPS: median 9.4 fps vs 7.5 fps (+1.90 fps / +25%), min 8.3 fps vs 0.8 fps, preparing 53.6 ms vs 60.0 ms
    • Stability: 0 crashes / 0 DRED / 0 untranslated shaders
    • VRAM / Issue #149: max 5760 MB vs 6005 MB (-245 MB, 0 MB over budget); no room for new ones halved (9,000 vs 18,000); max_waiting dropped (36,432 vs 41,431)
    • Decoration bakes / Issue #150: 0 mismatches (other_bytes=0, showed_another_view=0, failed=0 vs 5 and 2 on baseline)
    • Residency stalls: mapped_rate 1.63 ms/s vs 6.9 ms/s (-76%, max 12.9 vs 51.9 ms)
    • Visual check: Clean open-world safehouse frames (frame-5975.png, frame-5983.png), edge_energy=4.69 vs 3.88, near_black=0.02%, magenta=0.0% (and #141 2bf6800 showed zero visual artifacts).
<!-- greyfinch-sync:Androtim/MiniVI:comment:7262886562 --> Imported from [Androtim/MiniVI](https://github.com/Androtim/MiniVI/pull/155#issuecomment-7262886562). Originally posted by [Androtim](https://github.com/Androtim) on 2026-11-29T21:27:10Z. --- Automated RTX 4060 Ti 8 GB **Open-World** A/B hardware verification **PASSED** (`playtest/wave5` vs `origin/main` `b1b6dc1`, `VICTORY_LEVELS_ON_DEMAND=0` play-parity): - **Hardware `cargo test` (RTX 4060 Ti):** **645 passed, 0 failed** (`victory` 39/39, `victory-shader` `emit::wave64_tests` 19/19 & `lower` 19/19, `victory-gpu` 568/568). - **45s Open-World A/B (`scripts/verify-world.ps1`, DLSS Quality + open-world save):** - **FPS:** median **`9.4 fps`** vs `7.5 fps` (**+1.90 fps / +25%**), min **`8.3 fps`** vs **`0.8 fps`**, preparing `53.6 ms` vs `60.0 ms` - **Stability:** **0** crashes / **0** DRED / **0** untranslated shaders - **VRAM / Issue #149:** max **`5760 MB`** vs `6005 MB` (**-245 MB**, `0 MB` over budget); `no room for new ones` halved (**`9,000`** vs `18,000`); `max_waiting` dropped (`36,432` vs `41,431`) - **Decoration bakes / Issue #150:** **`0` mismatches** (`other_bytes=0, showed_another_view=0, failed=0` vs `5` and `2` on baseline) - **Residency stalls:** `mapped_rate` **`1.63 ms/s`** vs `6.9 ms/s` (**-76%**, max `12.9` vs `51.9 ms`) - **Visual check:** Clean open-world safehouse frames (`frame-5975.png`, `frame-5983.png`), `edge_energy=4.69` vs `3.88`, `near_black=0.02%`, `magenta=0.0%` (and `#141` `2bf6800` showed zero visual artifacts).
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!155
No description provided.