fix(gpu,victory): bound 8 GB 4K VRAM with lazy depth twins, pool quarantine, and tiered eviction #400

Manually merged
github merged 3 commits from github-bot/gh-400 into gh-pr/400/base 2026-12-03 18:54:47 +00:00 AGit
Owner

@⁠Androtim on GitHub · 2026-12-03 16:42 UTC · original
Androtim:fix/vram-8gb-4k-eviction-headroom → main · +2145 −762 · 13 files · 3 commits · merged 2026-12-03 18:54 UTC

Root-Cause Findings from 8 GB 4K Drive-Around Telemetry (\ 2026.12.03.07)

Inspecting the RTX 4060 Ti 8 GB 4K drive-around logs (\minivi-play-20261203-153217-38612.log\ RT-off and \minivi-play-20261203-154257-16304.log\ RT-SW) revealed five compounding causes behind dedicated VRAM climbing to 7,750 MB (7,751 MB peak, 5,343-5,590 MB shared spill) against DXGI budgets of 6,591-6,725 MB:

  1. **Unreachable 4K room line & silenced \slot_evict**:
    • \host::planned_budget()\ already subtracts 640 MiB from DXGI's budget, so \VICTORY_TEXTURE_ROOM_PERCENT=84\ set the texture line to 4,999-5,111 MB — already below the active 4K world-entry footprint (5,688 MB, \5,414 > 4,637 MB\ at entry). That kept
      oom()\ permanently false (152,500 RT-off / 59,000 RT-SW re-uploads while full).
    • \slot_evict\ hardcoded \llow_bindless = false, rejecting virtually all streamed world textures (\ otal_evicted = 2, total_freed_mb = 0\ in RT-off), while \let_go_idle\ capped its unmapped scan to \8192\ items / \512\ victims and \lock_wasteful\ required >50% free\ (>= 1 GiB), never firing on 565 / 2,752 MB (20.5% free) or 722 / 2,368 MB (30.5% free).
  2. Pool fragmentation + \Grow::Must\ block expansion:
    • Texture blocks grew from 28 (1,792 MB) at world entry to 43 (2,752 MB) with 16 blocks created without room (\Grow::Must) and 565 MB trapped in holes (722 MB / 37 blocks in RT-SW), because \446,000\ (\198,000\ in RT-SW) pool-hole reuses continuously dirtied partially-empty blocks (\1\ / \
**@⁠Androtim** on GitHub · 2026-12-03 16:42 UTC · [original](https://github.com/Androtim/MiniVI/pull/400) `Androtim:fix/vram-8gb-4k-eviction-headroom` → `main` · +2145 −762 · 13 files · 3 commits · merged 2026-12-03 18:54 UTC ## Root-Cause Findings from 8 GB 4K Drive-Around Telemetry (\ 2026.12.03.07\) Inspecting the RTX 4060 Ti 8 GB 4K drive-around logs (\minivi-play-20261203-153217-38612.log\ RT-off and \minivi-play-20261203-154257-16304.log\ RT-SW) revealed five compounding causes behind dedicated VRAM climbing to **7,750 MB** (7,751 MB peak, **5,343-5,590 MB** shared spill) against DXGI budgets of **6,591-6,725 MB**: 1. **Unreachable 4K room line & silenced \slot_evict\**: - \host::planned_budget()\ already subtracts 640 MiB from DXGI's budget, so \VICTORY_TEXTURE_ROOM_PERCENT=84\ set the texture line to **4,999-5,111 MB** — already below the active 4K world-entry footprint (**5,688 MB**, \5,414 > 4,637 MB\ at entry). That kept \ oom()\ permanently false (**152,500** RT-off / **59,000** RT-SW re-uploads while full). - \slot_evict\ hardcoded \llow_bindless = false\, rejecting virtually all streamed world textures (\ otal_evicted = 2, total_freed_mb = 0\ in RT-off), while \let_go_idle\ capped its unmapped scan to \8192\ items / \512\ victims and \lock_wasteful\ required \>50% free\ (\>= 1 GiB\), never firing on **565 / 2,752 MB** (20.5% free) or **722 / 2,368 MB** (30.5% free). 2. **Pool fragmentation + \Grow::Must\ block expansion**: - Texture blocks grew from **28 (1,792 MB)** at world entry to **43 (2,752 MB)** with **16** blocks created without room (\Grow::Must\) and **565 MB** trapped in holes (**722 MB** / **37 blocks** in RT-SW), because \446,000\ (\198,000\ in RT-SW) pool-hole reuses continuously dirtied partially-empty blocks (\1\ / \
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 16:47:03 +00:00
Author
Owner

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

Triage (de48b591, CI check PASS):

  • Directly attacks our #1 Rank 1 bottleneck (8 GB 4K VRAM overshoot & slot_evict / pool-fragmentation deadlock, +852/-198 across 9 files: resource.rs, pool.rs, uav_pool.rs, shadow.rs, ahead.rs, sweep.rs, play.rs, host.rs, list.rs).
  • Holding auto-merge for Gate 2 Deep Reasoning Audit (#282) (especially allow_bindless eviction safety, pool quarantine/fence lifetime, and lazy depth-twin state transitions) + Gate 3 plain --release 4K & 1440p A/B vs main (21fcafdc — dedicated VRAM, shared spill, FPS, 0 crashes/DRED) + --features diagnostics visual PNG verification (confirming zero evicted/missing textures or depth artifacts).
**@⁠Androtim** on GitHub · 2026-12-03 17:02 UTC · [original](https://github.com/Androtim/MiniVI/pull/400#issuecomment-7385877463) Triage (`de48b591`, **CI `check` PASS**): - Directly attacks our `#1` Rank 1 bottleneck (8 GB 4K VRAM overshoot & `slot_evict` / pool-fragmentation deadlock, `+852/-198` across 9 files: `resource.rs`, `pool.rs`, `uav_pool.rs`, `shadow.rs`, `ahead.rs`, `sweep.rs`, `play.rs`, `host.rs`, `list.rs`). - Holding auto-merge for **Gate 2 Deep Reasoning Audit (`#282`)** (especially `allow_bindless` eviction safety, pool quarantine/fence lifetime, and lazy depth-twin state transitions) + **Gate 3 plain `--release` 4K & 1440p A/B** vs `main` (`21fcafdc` — dedicated VRAM, shared spill, FPS, `0` crashes/DRED) + **`--features diagnostics` visual PNG verification** (confirming zero evicted/missing textures or depth artifacts).
- Synchronize lazy depth-twin creation with prior depth writes mid-list and across command lists via TwinSlot, pending_depth_writes, and plan_prelude.

- Keep pool quarantine from starving dense-block reuse or leaking 64 MiB blocks under Grow::Yes and ahead > 0 fallback.

- Remove Tier 1b eviction of live mapped textures, gate Tier 1a on full mapped_bytes == 0, and restore View::Placed slots in make_waiting / requeue_slots.

- Skip UAV barriers on depth-twin resources whose twin has not materialized yet.

- Split host depth-twin synchronization helpers into host::twins to stay within the xtask policy source file size limit.
github-bot changed target branch from main to gh-pr/400/base 2026-12-03 18:54:45 +00:00
github manually merged commit 19a17e1db7 into gh-pr/400/base 2026-12-03 18:54:47 +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!400
No description provided.