Improve texture streaming, mip residency and pool efficiency #6

Open
opened 2026-12-06 00:19:57 +00:00 by github-bot · 0 comments
Owner

@⁠VictoryX-dev on GitHub · 2026-12-03 02:57 UTC · original

Problem

Texture residency, mip-level growth/shrink behavior and staging/pool allocation directly govern both VRAM headroom (especially on 8–12 GB GPUs) and streaming smoothness. While sliced sweeps reduced steady-state sweep stalls by >90%, texture memory pressure warnings still occur and mip-tail / low-VRAM paths need further hardening.

Known Evidence

  • Confirmed in gameplay (Series S, RX 9070 XT 16 GB, 32 GB RAM):
    • VICTORY_SWEEP_SLICES=1 cut texture sweep look cost from 9.0 ms to 0.85 ms (−90.6%) and reduced "card memory tight" warnings from 17 to 5.
    • Dedicated VRAM usage still reaches 10–13.9 GB in heavy scenes.
  • Note on feature interactions in code (victory-gpu/src/resource.rs):
    • VICTORY_SWEEP_SLICES currently disables itself whenever VICTORY_TEXTURE_MIP_TAIL is enabled because the two paths have never been validated together.
    • Ownership-hardening switches (VICTORY_HOLD_NAMED, VICTORY_TILES_BY_RESOURCE) remain opt-in and await broader validation.
  • Engineering target: Comfortable operation on 32 GB RAM systems and predictable residency scaling on 8–12 GB GPUs without visual blur or texture starvation.

Approaches That Did Not Work

  • VICTORY_TEXTURE_PASS_MS=10 (kept off): Time-slicing delayed textures up to 435 ms without improving P99.
  • VICTORY_MEM_CENSUS_S non-zero (kept off): Periodic full address-space walks stalled the title for 450–600 ms each time.

Relevant Source Modules

  • runtime/crates/victory-gpu/src/texture.rs
  • runtime/crates/victory-gpu/src/texture/ahead.rs
  • runtime/crates/victory-gpu/src/texture/levels.rs
  • runtime/crates/victory-gpu/src/pool.rs
  • runtime/crates/victory-gpu/src/residency.rs
  • runtime/crates/victory-gpu/src/tiles.rs
  • runtime/crates/victory-gpu/src/texstore.rs
  • runtime/crates/victory-gpu/src/resource.rs

Expected Contribution

  • Audit and test compatibility between VICTORY_SWEEP_SLICES=1 and VICTORY_TEXTURE_MIP_TAIL=1 with synthetic fixtures.
  • Validate VICTORY_HOLD_NAMED=1 and VICTORY_TILES_BY_RESOURCE=1 (with VICTORY_RETIRE_AUDIT=1 in diagnostics builds) to close remaining texture-replacement lifetime races.
  • Measure and tune residency budgets (VICTORY_MEM_BUDGET, VICTORY_SHARED_LINE_PCT) on 8 GB and 12 GB GPUs.

Acceptance Criteria

  • Synthetic fixtures cover sliced sweeps + mip-tail interaction and VICTORY_TILES_BY_RESOURCE=1 lifetime invariants.
  • Zero VICTORY_RETIRE_AUDIT=1 findings under stress fixtures.
  • Documented residency behavior across small (8 GB), mid (12 GB) and high (16+ GB) VRAM tiers.
**@⁠VictoryX-dev** on GitHub · 2026-12-03 02:57 UTC · [original](https://github.com/VictoryX-dev/VictoryX/issues/6) ## Problem Texture residency, mip-level growth/shrink behavior and staging/pool allocation directly govern both VRAM headroom (especially on 8–12 GB GPUs) and streaming smoothness. While sliced sweeps reduced steady-state sweep stalls by >90%, texture memory pressure warnings still occur and mip-tail / low-VRAM paths need further hardening. ## Known Evidence - **Confirmed in gameplay** *(Series S, RX 9070 XT 16 GB, 32 GB RAM)*: - `VICTORY_SWEEP_SLICES=1` cut texture sweep look cost from `9.0 ms` to `0.85 ms` (−90.6%) and reduced "card memory tight" warnings from `17` to `5`. - Dedicated VRAM usage still reaches `10–13.9 GB` in heavy scenes. - **Note on feature interactions in code (`victory-gpu/src/resource.rs`):** - `VICTORY_SWEEP_SLICES` currently disables itself whenever `VICTORY_TEXTURE_MIP_TAIL` is enabled because the two paths have never been validated together. - Ownership-hardening switches (`VICTORY_HOLD_NAMED`, `VICTORY_TILES_BY_RESOURCE`) remain opt-in and await broader validation. - **Engineering target:** Comfortable operation on 32 GB RAM systems and predictable residency scaling on 8–12 GB GPUs without visual blur or texture starvation. ## Approaches That Did Not Work - **`VICTORY_TEXTURE_PASS_MS=10` (kept off):** Time-slicing delayed textures up to 435 ms without improving P99. - **`VICTORY_MEM_CENSUS_S` non-zero (kept off):** Periodic full address-space walks stalled the title for 450–600 ms each time. ## Relevant Source Modules - `runtime/crates/victory-gpu/src/texture.rs` - `runtime/crates/victory-gpu/src/texture/ahead.rs` - `runtime/crates/victory-gpu/src/texture/levels.rs` - `runtime/crates/victory-gpu/src/pool.rs` - `runtime/crates/victory-gpu/src/residency.rs` - `runtime/crates/victory-gpu/src/tiles.rs` - `runtime/crates/victory-gpu/src/texstore.rs` - `runtime/crates/victory-gpu/src/resource.rs` ## Expected Contribution - Audit and test compatibility between `VICTORY_SWEEP_SLICES=1` and `VICTORY_TEXTURE_MIP_TAIL=1` with synthetic fixtures. - Validate `VICTORY_HOLD_NAMED=1` and `VICTORY_TILES_BY_RESOURCE=1` (with `VICTORY_RETIRE_AUDIT=1` in diagnostics builds) to close remaining texture-replacement lifetime races. - Measure and tune residency budgets (`VICTORY_MEM_BUDGET`, `VICTORY_SHARED_LINE_PCT`) on 8 GB and 12 GB GPUs. ## Acceptance Criteria - [ ] Synthetic fixtures cover sliced sweeps + mip-tail interaction and `VICTORY_TILES_BY_RESOURCE=1` lifetime invariants. - [ ] Zero `VICTORY_RETIRE_AUDIT=1` findings under stress fixtures. - [ ] Documented residency behavior across small (8 GB), mid (12 GB) and high (16+ GB) VRAM tiers.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-06 00:19:58 +00:00
This discussion has been locked. Commenting is limited to contributors.
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/VictoryX-dev--VictoryX#6
No description provided.