Reduce traversal frame-time spikes and streaming stalls #5

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

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

Problem

While steady heavy-scene frame pacing improved dramatically (P99 46.4 → 35.1 ms, 1% low 20.0 → 27.0 FPS), moving rapidly through new areas still produces severe frame-time spikes during asset and texture streaming.

Known Evidence

  • Confirmed in gameplay (Series S, AMD reference system):
    • Steady heavy-scene baseline with VICTORY_SWEEP_SLICES=1 + VICTORY_RELEASE_LEAVE_ONCE=1: P99 35.1 ms, P99.9 39.0 ms, 1% low 27.0 FPS.
    • Traversal / streaming windows: P99 55.5–86 ms (worst windows 64–86 ms), 1% low 15.3 FPS, 13–22% of frames > 33.3 ms.
    • Tail-frame attribution (VICTORY_FRAME_METRICS=1) showed heavy frames (> 1.8× window median) spent ~19.9 ms in the index-picked texture/view pass vs ~5.8 ms in normal frames, with sustained 15–25 ms bursts during rapid area entry.
  • Experimental / Synthetic fixtures (off by default, unmeasured in gameplay):
    • VICTORY_TEXTURE_HOST_WRITTEN_UNQUEUED=1: avoids queueing host-written textures (RTV/DSV/UAV) into the index-picked title-texture pass. Synthetic stand-mix fixture saves ~0.12 µs per look and ~0.08 µs per write (~0.4 ms/frame ceiling estimate in steady scenes; unmeasured in traversal).
  • Engineering target: Smooth, consistent traversal frame pacing with substantially improved 1% lows and no visible texture pop-in regressions.

Approaches That Did Not Work

  • VICTORY_TEXTURE_PASS_MS=10 (kept off): Time-slicing the index-picked texture pass to 10 ms/frame did not improve P99 (35.1 → 35.2 ms) and delayed texture publication by up to 435 ms (visible pop-in).

Relevant Source Modules

  • runtime/crates/victory-gpu/src/draw.rs
  • runtime/crates/victory-gpu/src/texture.rs
  • runtime/crates/victory-gpu/src/texture/ahead.rs
  • runtime/crates/victory-gpu/src/descriptor.rs
  • runtime/crates/victory-gpu/src/frame_metrics.rs
  • runtime/crates/victory-gpu/src/spikes.rs
  • runtime/crates/victory-hle/src/modules/dstorage.rs

Expected Contribution

  • Profile traversal bursts using VICTORY_FRAME_METRICS=1, VICTORY_SPIKES=1 and VICTORY_XFER=2 to separate costs across:
    • CPU detiling / BCPack decompression (victory-formats, dstorage.rs),
    • host texture creation / pool allocation (pool.rs, texture.rs),
    • index-picked descriptor resolution (draw.rs, descriptor.rs),
    • memory remap / write-watch churn (watch.rs, xmem.rs).
  • Prototype off-critical-path upload/detiling or work-amortization improvements behind an off-by-default switch without introducing multi-hundred-millisecond texture delays.

Acceptance Criteria

  • Tail-frame attribution clearly identifies the dominant traversal spike source(s).
  • Traversal P99 and % frames > 33.3 ms improve measurably on a matched release-package traversal route without visible texture pop-in or quality loss.
  • Synthetic texture-upload and descriptor regression fixtures pass cleanly.
**@⁠VictoryX-dev** on GitHub · 2026-12-03 02:57 UTC · [original](https://github.com/VictoryX-dev/VictoryX/issues/5) ## Problem While steady heavy-scene frame pacing improved dramatically (`P99 46.4 → 35.1 ms`, `1% low 20.0 → 27.0 FPS`), moving rapidly through new areas still produces severe frame-time spikes during asset and texture streaming. ## Known Evidence - **Confirmed in gameplay** *(Series S, AMD reference system)*: - Steady heavy-scene baseline with `VICTORY_SWEEP_SLICES=1` + `VICTORY_RELEASE_LEAVE_ONCE=1`: P99 `35.1 ms`, P99.9 `39.0 ms`, 1% low `27.0 FPS`. - Traversal / streaming windows: **P99 `55.5–86 ms`** (worst windows `64–86 ms`), **1% low `15.3 FPS`**, **13–22% of frames > 33.3 ms**. - Tail-frame attribution (`VICTORY_FRAME_METRICS=1`) showed heavy frames (> 1.8× window median) spent ~19.9 ms in the index-picked texture/view pass vs ~5.8 ms in normal frames, with sustained 15–25 ms bursts during rapid area entry. - **Experimental / Synthetic fixtures (off by default, unmeasured in gameplay):** - `VICTORY_TEXTURE_HOST_WRITTEN_UNQUEUED=1`: avoids queueing host-written textures (RTV/DSV/UAV) into the index-picked title-texture pass. Synthetic stand-mix fixture saves ~0.12 µs per look and ~0.08 µs per write (~0.4 ms/frame ceiling estimate in steady scenes; unmeasured in traversal). - **Engineering target:** Smooth, consistent traversal frame pacing with substantially improved 1% lows and no visible texture pop-in regressions. ## Approaches That Did Not Work - **`VICTORY_TEXTURE_PASS_MS=10` (kept off):** Time-slicing the index-picked texture pass to 10 ms/frame did not improve P99 (`35.1 → 35.2 ms`) and delayed texture publication by up to 435 ms (visible pop-in). ## Relevant Source Modules - `runtime/crates/victory-gpu/src/draw.rs` - `runtime/crates/victory-gpu/src/texture.rs` - `runtime/crates/victory-gpu/src/texture/ahead.rs` - `runtime/crates/victory-gpu/src/descriptor.rs` - `runtime/crates/victory-gpu/src/frame_metrics.rs` - `runtime/crates/victory-gpu/src/spikes.rs` - `runtime/crates/victory-hle/src/modules/dstorage.rs` ## Expected Contribution - Profile traversal bursts using `VICTORY_FRAME_METRICS=1`, `VICTORY_SPIKES=1` and `VICTORY_XFER=2` to separate costs across: - CPU detiling / BCPack decompression (`victory-formats`, `dstorage.rs`), - host texture creation / pool allocation (`pool.rs`, `texture.rs`), - index-picked descriptor resolution (`draw.rs`, `descriptor.rs`), - memory remap / write-watch churn (`watch.rs`, `xmem.rs`). - Prototype off-critical-path upload/detiling or work-amortization improvements behind an off-by-default switch without introducing multi-hundred-millisecond texture delays. ## Acceptance Criteria - [ ] Tail-frame attribution clearly identifies the dominant traversal spike source(s). - [ ] Traversal P99 and `% frames > 33.3 ms` improve measurably on a matched release-package traversal route without visible texture pop-in or quality loss. - [ ] Synthetic texture-upload and descriptor regression fixtures pass cleanly.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-06 00:19:57 +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#5
No description provided.