GPU, Pipelines: add non-blocking repeat-frame fallback and 80 ms wait budget #56

Manually merged
github merged 1 commit from gh-pr/56/head into gh-pr/56/base 2026-12-01 20:05:19 +00:00
Owner

@⁠Androtim on GitHub · 2026-11-28 16:24 UTC · original
Androtim:feat/iter70-nonblocking-pipeline-fallback → main · +73 −7 · 3 files · 1 commits · merged 2026-11-29 04:45 UTC

Summary

Ported the non-blocking repeat-frame pipeline wait fallback and 80 ms default non-screen wait budget from CHECK6960/Victory-Nvidia-optimized (c51df9f) across crates/victory-gpu/src/pipeline.rs, crates/victory-gpu/src/pipeline/make.rs, and crates/victory-gpu/src/host.rs:

  • 80 ms default non-screen wait budget (parse_wait_budget_ms): Lowers the default VICTORY_PIPELINE_WAIT_MS budget for non-screen draws/dispatches from 500 ms to 80 ms (while preserving screen_budget() at 10_000 ms so lighting-bake and screen passes are never dropped behind cold shader compiles).
  • Non-blocking repeat-frame fallback (Pending::missed_wait + SKIPPED_REPEAT): Extracts wait_within() and marks a non-screen Pending with missed_wait once a frame spends at least half its budget waiting on an unfinished compile, skipping blocking waits on repeat draws in subsequent frames until finished and surfacing {skipped_repeat:.0} repeat-waits skipped via Meter::frame (verified compatible with scripts/analyze-world-run.py FPS_RE).
  • Unit tests: Adds parse_wait_budget_defaults_to_80_and_reads_overrides and missed_wait_skips_repeat_frames_for_non_screen_only in crates/victory-gpu/src/pipeline/make.rs.

Rig Specs Tested On

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

Run Settings & Profile

  • Build & Commit SHA: diag @ 0771b98 (after verifying plain --release has zero non-system MinGW DLL imports)
  • Console Profile & Internal Resolution / Scale: series-s (verify-world.ps1 default, 960x540 PNG captures)
  • Ray Tracing: off
  • Upscaling: DLSS quality
  • Frame Generation: off
  • Launcher Command / Preset & Extra VICTORY_* Overrides: verify-world.ps1 default settings (-WorldSeconds 75 -AutoNudgeMenu)
  • Scene / Area & Session Length: In-world pier/house scene (draws >= 500, visually inspected frame-7920.png & frame-8672.png), 75s capture across 15 world windows

Measurements & Verification

  • Base FPS (without Frame Gen): 9.88 mean / 10.9 median (min 2.0, p10 7.24, max draws 11420; vs baseline 8.9 fps median)
  • Frame-Gen FPS (if enabled): N/A (off)
  • VRAM / RAM Usage: 6004.5 MB median / 6022 MB max against 6890 MB min budget (0 MB over budget, room=false 8.3%; baseline 5864 MB max)
  • Crashes / DRED Resets: 0 (no_host_texture_errors=0, final_waiting=1705 vs 7121 baseline, mapped_rate=34.96 ms/s, resident_rate=109.83 ms/s, median_dropped_no_pipeline=258 vs 261.0 baseline, lit=19/24, luma=103.18, edge_energy=7.21, magenta=0.0%; all 11/11 verifier gates PASS)
  • Automated Checks:
    • cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy (297 files ok)
    • cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask (6 passed; 0 failed)
    • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings (0 warnings)
    • cargo +1.98.1-x86_64-pc-windows-gnu clippy -p victory-gpu -p victory --features diagnostics --all-targets -- -D warnings (0 warnings)
    • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib -- --test-threads=1 (452 passed; 0 failed; 36 ignored)
    • cargo +1.98.1-x86_64-pc-windows-gnu build -p victory --release + objdump -p (0 non-system MinGW DLLs)
**@⁠Androtim** on GitHub · 2026-11-28 16:24 UTC · [original](https://github.com/Androtim/MiniVI/pull/56) `Androtim:feat/iter70-nonblocking-pipeline-fallback` → `main` · +73 −7 · 3 files · 1 commits · merged 2026-11-29 04:45 UTC ## Summary Ported the non-blocking repeat-frame pipeline wait fallback and 80 ms default non-screen wait budget from `CHECK6960/Victory-Nvidia-optimized` (`c51df9f`) across `crates/victory-gpu/src/pipeline.rs`, `crates/victory-gpu/src/pipeline/make.rs`, and `crates/victory-gpu/src/host.rs`: - **80 ms default non-screen wait budget (`parse_wait_budget_ms`):** Lowers the default `VICTORY_PIPELINE_WAIT_MS` budget for non-screen draws/dispatches from `500 ms` to `80 ms` (while preserving `screen_budget()` at `10_000 ms` so lighting-bake and screen passes are never dropped behind cold shader compiles). - **Non-blocking repeat-frame fallback (`Pending::missed_wait` + `SKIPPED_REPEAT`):** Extracts `wait_within()` and marks a non-screen `Pending` with `missed_wait` once a frame spends at least half its budget waiting on an unfinished compile, skipping blocking waits on repeat draws in subsequent frames until finished and surfacing `{skipped_repeat:.0} repeat-waits skipped` via `Meter::frame` (verified compatible with `scripts/analyze-world-run.py` `FPS_RE`). - **Unit tests:** Adds `parse_wait_budget_defaults_to_80_and_reads_overrides` and `missed_wait_skips_repeat_frames_for_non_screen_only` in `crates/victory-gpu/src/pipeline/make.rs`. ## Rig Specs Tested On - **CPU:** Intel Core i7-13700F - **GPU & VRAM:** NVIDIA GeForce RTX 4060 Ti (8 GiB VRAM) - **System RAM:** 32 GiB - **OS & GPU Driver:** Windows 11 Build 26300, NVIDIA driver 32.0.16.2124 ## Run Settings & Profile - **Build & Commit SHA:** `diag` @ `0771b98` (after verifying plain `--release` has zero non-system MinGW DLL imports) - **Console Profile & Internal Resolution / Scale:** `series-s` (`verify-world.ps1` default, 960x540 PNG captures) - **Ray Tracing:** `off` - **Upscaling:** `DLSS quality` - **Frame Generation:** `off` - **Launcher Command / Preset & Extra `VICTORY_*` Overrides:** `verify-world.ps1` default settings (`-WorldSeconds 75 -AutoNudgeMenu`) - **Scene / Area & Session Length:** In-world pier/house scene (`draws >= 500`, visually inspected `frame-7920.png` & `frame-8672.png`), 75s capture across 15 world windows ## Measurements & Verification - **Base FPS (without Frame Gen):** `9.88` mean / `10.9` median (min `2.0`, p10 `7.24`, max draws `11420`; vs baseline `8.9` fps median) - **Frame-Gen FPS (if enabled):** N/A (off) - **VRAM / RAM Usage:** `6004.5 MB` median / `6022 MB` max against `6890 MB` min budget (`0 MB` over budget, `room=false` `8.3%`; baseline `5864 MB` max) - **Crashes / DRED Resets:** `0` (`no_host_texture_errors=0`, `final_waiting=1705` vs `7121` baseline, `mapped_rate=34.96 ms/s`, `resident_rate=109.83 ms/s`, `median_dropped_no_pipeline=258` vs `261.0` baseline, `lit=19/24`, `luma=103.18`, `edge_energy=7.21`, `magenta=0.0%`; all 11/11 verifier gates PASS) - **Automated Checks:** - [x] `cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy` (`297 files ok`) - [x] `cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask` (`6 passed; 0 failed`) - [x] `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings` (`0` warnings) - [x] `cargo +1.98.1-x86_64-pc-windows-gnu clippy -p victory-gpu -p victory --features diagnostics --all-targets -- -D warnings` (`0` warnings) - [x] `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-gpu --lib -- --test-threads=1` (`452 passed; 0 failed; 36 ignored`) - [x] `cargo +1.98.1-x86_64-pc-windows-gnu build -p victory --release` + `objdump -p` (`0` non-system MinGW DLLs)
Port non-blocking repeat-frame pipeline wait fallback and 80 ms default non-screen wait budget from CHECK6960/Victory-Nvidia-optimized (c51df9f), leaving screen and lighting-bake passes protected by their 10 s screen budget.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 20:05:17 +00:00
github manually merged commit 680c112222 into gh-pr/56/base 2026-12-01 20:05:19 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-11-28 19:03 UTC · original · edited 2026-11-29 01:04 UTC

Automated triage for the maintainers (not an approval).

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

Summary

Clean, focused port of the 80 ms default non-screen pipeline wait budget and non-blocking repeat-frame wait fallback across crates/victory-gpu/src/pipeline/make.rs, crates/victory-gpu/src/pipeline.rs, and crates/victory-gpu/src/host.rs.

Code Review

  • crates/victory-gpu/src/pipeline/make.rs:
    • parse_wait_budget_ms cleanly extracts VICTORY_PIPELINE_WAIT_MS parsing with an 80 ms default (down from 500 ms), while screen_budget() remains at 10_000 ms so screen and scene_input / bake passes are unaffected.
    • wait_within checks !screen && p.missed_wait.load(Ordering::Acquire) before acquiring SPENT or DONE, increments SKIPPED_REPEAT, and returns early. Once p.made is populated by a worker, ready() short-circuits before calling wait(), so missed_wait never needs to be cleared.
    • Setting p.missed_wait only when !screen && p.made.get().is_none() && waited >= budget / 2 avoids marking pipelines that merely observed an already-exhausted shared frame budget (left == 0).
    • Unit tests (parse_wait_budget_defaults_to_80_and_reads_overrides and missed_wait_skips_repeat_frames_for_non_screen_only) cover default/override parsing, repeat-frame skipping, and screen-pass exemption.
  • crates/victory-gpu/src/pipeline.rs & crates/victory-gpu/src/host.rs:
    • take_skipped_repeat() mirrors take_left_out() and surfaces {skipped_repeat:.0} repeat-waits skipped in Meter::frame.
    • Verified against FPS_RE in scripts/analyze-world-run.py (without a host pipeline.*?textures picked by index:), so log parsing remains compatible.

Verdict

CI is passing and the logic/concurrency look sound. Because this changes default D3D12 host pipeline wait timing (500 ms -> 80 ms) and cold-cache draw-drop behavior in victory-gpu, a local real-GPU smoke test is warranted to confirm no one-off non-screen passes are lost on cold shader caches.


Generated with Antigravity CLI (agy).

**@⁠Androtim** on GitHub · 2026-11-28 19:03 UTC · [original](https://github.com/Androtim/MiniVI/pull/56#issuecomment-7244256548) · edited 2026-11-29 01:04 UTC <!-- minivi-triage v1 head=680c112222f7dbaf047d0d071065526353796edd verdict=needs-gpu-test ci=passing at=2026-11-29T01:04:55Z --> Automated triage for the maintainers (not an approval). **Verdict:** `needs-gpu-test` · **CI (`check`):** `passing` ### Summary Clean, focused port of the 80 ms default non-screen pipeline wait budget and non-blocking repeat-frame wait fallback across `crates/victory-gpu/src/pipeline/make.rs`, `crates/victory-gpu/src/pipeline.rs`, and `crates/victory-gpu/src/host.rs`. ### Code Review - **`crates/victory-gpu/src/pipeline/make.rs`**: - `parse_wait_budget_ms` cleanly extracts `VICTORY_PIPELINE_WAIT_MS` parsing with an `80` ms default (down from `500` ms), while `screen_budget()` remains at `10_000` ms so screen and `scene_input` / bake passes are unaffected. - `wait_within` checks `!screen && p.missed_wait.load(Ordering::Acquire)` before acquiring `SPENT` or `DONE`, increments `SKIPPED_REPEAT`, and returns early. Once `p.made` is populated by a worker, `ready()` short-circuits before calling `wait()`, so `missed_wait` never needs to be cleared. - Setting `p.missed_wait` only when `!screen && p.made.get().is_none() && waited >= budget / 2` avoids marking pipelines that merely observed an already-exhausted shared frame budget (`left == 0`). - Unit tests (`parse_wait_budget_defaults_to_80_and_reads_overrides` and `missed_wait_skips_repeat_frames_for_non_screen_only`) cover default/override parsing, repeat-frame skipping, and screen-pass exemption. - **`crates/victory-gpu/src/pipeline.rs` & `crates/victory-gpu/src/host.rs`**: - `take_skipped_repeat()` mirrors `take_left_out()` and surfaces `{skipped_repeat:.0} repeat-waits skipped` in `Meter::frame`. - Verified against `FPS_RE` in `scripts/analyze-world-run.py` (`without a host pipeline.*?textures picked by index:`), so log parsing remains compatible. ### Verdict CI is passing and the logic/concurrency look sound. Because this changes default D3D12 host pipeline wait timing (`500 ms -> 80 ms`) and cold-cache draw-drop behavior in `victory-gpu`, a local real-GPU smoke test is warranted to confirm no one-off non-screen passes are lost on cold shader caches. --- _Generated with Antigravity CLI (`agy`)._
Author
Owner

@⁠Androtim on GitHub · 2026-11-29 00:06 UTC · original

Rebased onto origin/main (9a2e92b -> 680c112) and addressed the minor review note:

Changes

  • Resolved crates/victory-gpu/src/pipeline.rs conflict (take_skipped_repeat placed alongside main's non-diagnostics DROPS telemetry).
  • Updated module doc comment at crates/victory-gpu/src/pipeline/make.rs to state the 80 ms default budget (VICTORY_PIPELINE_WAIT_MS overrides).

Verification (680c112)

  • Policy & Lints: cargo run -p xtask -- policy (301 files ok), cargo test -p xtask (6 passed), clippy --workspace --all-targets -- -D warnings (0 warnings, both plain and --features diagnostics).
  • Unit Tests: victory-gpu --lib pipeline:: (27 passed, including parse_wait_budget_defaults_to_80_and_reads_overrides and missed_wait_skips_repeat_frames_for_non_screen_only).
  • Release Builds & DLL Check: plain --release (1m 50s, objdump -p confirmed Windows system DLLs only, zero non-system MinGW runtime DLLs) and --release --features diagnostics (3m 48s).
  • Live 75s Open-World GPU Run (pr56-rebased, VICTORY_BOOK=0 pending PR #71 merge) — 11/11 gates PASS:
    • 11.35 fps median (88.4 ms/frame, baseline 8.9 fps), 10956 max draws across 16 world windows
    • 5497 MB max VRAM / 6541 MB min budget (0 MB over, baseline 5864 MB)
    • 46671 textures uploaded, 2727 final waiting (baseline 7121), 1–2 ms making host copies / 13–20 ms making slots' views in the final 5s windows
    • mapped() rate 31.24 ms/s (longest 11.9 ms), 0 crashes
    • 17/24 lit PNGs (105.62 median luma vs 103.2 baseline, 0.0% near-black, 6.93 edge energy, 0.0% magenta); visually verified clean exterior geometry, textures, lighting, foliage, water, and UI.
**@⁠Androtim** on GitHub · 2026-11-29 00:06 UTC · [original](https://github.com/Androtim/MiniVI/pull/56#issuecomment-7247881363) Rebased onto `origin/main` (`9a2e92b` -> `680c112`) and addressed the minor review note: ### Changes - Resolved `crates/victory-gpu/src/pipeline.rs` conflict (`take_skipped_repeat` placed alongside `main`'s non-diagnostics `DROPS` telemetry). - Updated module doc comment at `crates/victory-gpu/src/pipeline/make.rs` to state the `80 ms` default budget (`VICTORY_PIPELINE_WAIT_MS` overrides). ### Verification (`680c112`) - **Policy & Lints:** `cargo run -p xtask -- policy` (`301 files ok`), `cargo test -p xtask` (`6 passed`), `clippy --workspace --all-targets -- -D warnings` (`0` warnings, both plain and `--features diagnostics`). - **Unit Tests:** `victory-gpu --lib pipeline::` (`27 passed`, including `parse_wait_budget_defaults_to_80_and_reads_overrides` and `missed_wait_skips_repeat_frames_for_non_screen_only`). - **Release Builds & DLL Check:** plain `--release` (`1m 50s`, `objdump -p` confirmed Windows system DLLs only, zero non-system MinGW runtime DLLs) and `--release --features diagnostics` (`3m 48s`). - **Live 75s Open-World GPU Run (`pr56-rebased`, `VICTORY_BOOK=0` pending PR #71 merge) — 11/11 gates PASS:** - `11.35 fps` median (`88.4 ms/frame`, baseline `8.9 fps`), `10956` max draws across `16` world windows - `5497 MB` max VRAM / `6541 MB` min budget (`0 MB` over, baseline `5864 MB`) - `46671` textures uploaded, `2727` final waiting (baseline `7121`), `1–2 ms` making host copies / `13–20 ms` making slots' views in the final 5s windows - `mapped()` rate `31.24 ms/s` (longest `11.9 ms`), `0` crashes - `17/24` lit PNGs (`105.62` median luma vs `103.2` baseline, `0.0%` near-black, `6.93` edge energy, `0.0%` magenta); visually verified clean exterior geometry, textures, lighting, foliage, water, and UI.
Author
Owner

@⁠Androtim on GitHub · 2026-11-29 04:45 UTC · original

Automated RTX 4060 Ti 8 GB A/B hardware verification passed (playtest/wave2 vs origin/main 1ab5d84):

  • Hardware cargo test (RTX 4060 Ti): victory-shader lds_sub (1/1), emit::wave64_tests (14/14), victory-gpu (505/505) — 520 passed, 0 failed.
  • Automated 45s in-world A/B (scripts/verify-world.ps1, DLSS Quality + golden autosave):
    • FPS: 13.45 fps (77.25 ms) vs 3.20 fps (308.8 ms) baseline (+10.25 fps / 4.2x faster)
    • Draws: max_draws=3122 vs 2994
    • Stability: 0 crashes / 0 DRED
    • VRAM: 6174 / 6903 MB (-25 MB vs baseline, 0 MB over budget)
    • Texture backlog: final_waiting=7638 vs 12258 (-4620)
    • Visual check: Clean rendered frames (frame-7969.png, frame-8409.png), no regressions vs origin/main.
**@⁠Androtim** on GitHub · 2026-11-29 04:45 UTC · [original](https://github.com/Androtim/MiniVI/pull/56#issuecomment-7250847962) Automated RTX 4060 Ti 8 GB A/B hardware verification passed (`playtest/wave2` vs `origin/main` `1ab5d84`): - **Hardware `cargo test` (RTX 4060 Ti):** `victory-shader` `lds_sub` (1/1), `emit::wave64_tests` (14/14), `victory-gpu` (505/505) — **520 passed, 0 failed**. - **Automated 45s in-world A/B (`scripts/verify-world.ps1`, DLSS Quality + golden autosave):** - **FPS:** **13.45 fps** (`77.25 ms`) vs **3.20 fps** (`308.8 ms`) baseline (**+10.25 fps / 4.2x faster**) - **Draws:** `max_draws=3122` vs `2994` - **Stability:** `0` crashes / `0` DRED - **VRAM:** `6174 / 6903 MB` (`-25 MB` vs baseline, `0 MB` over budget) - **Texture backlog:** `final_waiting=7638` vs `12258` (`-4620`) - **Visual check:** Clean rendered frames (`frame-7969.png`, `frame-8409.png`), no regressions vs `origin/main`.
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!56
No description provided.