gpu(host): break relay_wait when landing line is empty to avoid infinite waits #163

Manually merged
github merged 1 commit from gh-pr/163/head into gh-pr/163/base 2026-12-01 20:14:30 +00:00
Owner

@⁠Androtim on GitHub · 2026-11-29 20:41 UTC · original
Androtim:feat/iter161-relay-empty-line-wait-guard → main · +19 −0 · 1 files · 1 commits · merged 2026-11-29 21:06 UTC

## Summary

  • Port 1573ae65 into crates/victory-gpu/src/host.rs:
    • When relay_wait observes line.line.is_empty() && !line.settling while its condition is still unmet (e.g. a range remaining pending with no flight in the line), increment RELAY_IDLE_WAITS, log once, and break instead of hanging forever so the caller falls back to its own settle.
    • Report RELAY_IDLE_WAITS in periodic late_line diagnostics when non-zero.

Test plan

  • cargo run -p xtask -- policy: passed
  • cargo test -p victory-gpu host::: 143 passed (17 ignored)
  • Dual cargo clippy --workspace --all-targets (default and --features diagnostics) with -D warnings: passed
**@⁠Androtim** on GitHub · 2026-11-29 20:41 UTC · [original](https://github.com/Androtim/MiniVI/pull/163) `Androtim:feat/iter161-relay-empty-line-wait-guard` → `main` · +19 −0 · 1 files · 1 commits · merged 2026-11-29 21:06 UTC ## Summary - Port `1573ae65` into `crates/victory-gpu/src/host.rs`: - When `relay_wait` observes `line.line.is_empty() && !line.settling` while its condition is still unmet (e.g. a range remaining pending with no flight in the line), increment `RELAY_IDLE_WAITS`, log once, and break instead of hanging forever so the caller falls back to its own settle. - Report `RELAY_IDLE_WAITS` in periodic `late_line` diagnostics when non-zero. ## Test plan - `cargo run -p xtask -- policy`: passed - `cargo test -p victory-gpu host::`: 143 passed (17 ignored) - Dual `cargo clippy --workspace --all-targets` (default and `--features diagnostics`) with `-D warnings`: passed
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 20:14:28 +00:00
github manually merged commit f10f130ffd into gh-pr/163/base 2026-12-01 20:14:30 +00:00
Author
Owner

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

Automated triage for the maintainers (not an approval).

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

Review Summary

Small, focused defensive fix in crates/victory-gpu/src/host.rs for VICTORY_RELAY=1 wait hangs.

Verified Details

  • Concurrency & guard condition (relay_wait vs relay_worker): In relay_worker (crates/victory-gpu/src/host.rs), line.settling = true is set under the line mutex before draining line.line, and remains true while host.relay_land(...) runs. Checking line.line.is_empty() && !line.settling inside relay_wait while holding the same line mutex avoids any race with an active landing and only breaks out when no queued items or in-flight landing exist to wake LINE_LANDED.
  • Diagnostics (RELAY_IDLE_WAITS, late_line): Uses AtomicU64 with Ordering::Relaxed, rate-limits the tracing::warn! via a SAID AtomicBool to prevent log spam, and reports the cumulative count in late_line only when idle > 0.
  • Scope & CI: CI is passing and no duplicate open PR targets relay_wait.

Minor Note

  • Because relay_wait touches the D3D12 host relay landing path, a quick local real-GPU smoke test with VICTORY_RELAY=1 is recommended before merging to confirm normal relay operation and check whether RELAY_IDLE_WAITS triggers unexpectedly.

Automated technical triage review — not formal maintainer approval.


Generated with Antigravity CLI (agy).

**@⁠Androtim** on GitHub · 2026-11-29 21:04 UTC · [original](https://github.com/Androtim/MiniVI/pull/163#issuecomment-7262575802) <!-- minivi-triage v1 head=f10f130ffd15c4bbbc4dace8d6f7df14e9ed9740 verdict=needs-gpu-test ci=passing at=2026-11-29T21:04:36Z --> Automated triage for the maintainers (not an approval). **Verdict:** `needs-gpu-test` · **CI (`check`):** `passing` ### Review Summary Small, focused defensive fix in `crates/victory-gpu/src/host.rs` for `VICTORY_RELAY=1` wait hangs. #### Verified Details - **Concurrency & guard condition (`relay_wait` vs `relay_worker`)**: In `relay_worker` (`crates/victory-gpu/src/host.rs`), `line.settling = true` is set under the `line` mutex before draining `line.line`, and remains `true` while `host.relay_land(...)` runs. Checking `line.line.is_empty() && !line.settling` inside `relay_wait` while holding the same `line` mutex avoids any race with an active landing and only breaks out when no queued items or in-flight landing exist to wake `LINE_LANDED`. - **Diagnostics (`RELAY_IDLE_WAITS`, `late_line`)**: Uses `AtomicU64` with `Ordering::Relaxed`, rate-limits the `tracing::warn!` via a `SAID` `AtomicBool` to prevent log spam, and reports the cumulative count in `late_line` only when `idle > 0`. - **Scope & CI**: CI is passing and no duplicate open PR targets `relay_wait`. #### Minor Note - Because `relay_wait` touches the D3D12 host relay landing path, a quick local real-GPU smoke test with `VICTORY_RELAY=1` is recommended before merging to confirm normal relay operation and check whether `RELAY_IDLE_WAITS` triggers unexpectedly. *Automated technical triage review — not formal maintainer approval.* --- _Generated with Antigravity CLI (`agy`)._
Author
Owner

@⁠Androtim on GitHub · 2026-11-29 21:27 UTC · original

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).
**@⁠Androtim** on GitHub · 2026-11-29 21:27 UTC · [original](https://github.com/Androtim/MiniVI/pull/163#issuecomment-7262893001) 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).
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!163
No description provided.