GPU: bound the per-frame pipeline wait with VICTORY_PIPELINE_WAIT_MS #76

Closed
github-bot wants to merge 1 commit from gh-pr/76/head into gh-pr/76/base
Owner

@⁠dutch2005 on GitHub · 2026-11-25 13:32 UTC · original
perf/pipeline-wait-ms → main · +53 −2 · 2 files · 1 commits · closed without merging

Why

The wait for a pipeline made by a background worker is a constant 500 ms per title frame (20 s for screen passes). On the world's first frames, where thousands of pipelines are still being made, that wait can dominate, and there is no way to trade a dropped draw for frame time. fxceless/victory-fork and upstream carry the same switch; this is written anew against this tree's budget code.

What

  • Reads VICTORY_PIPELINE_WAIT_MS once (milliseconds; 0 does not wait).
  • Default remains 500 ms; invalid values fall back to 500.
  • Screen passes keep their 20 s budget.
  • Adds a unit test for the parsing and documents the variable in the debugging table.

Testing

  • cargo test -p victory-gpu --lib pipeline_wait -- --test-threads=1 — 3 passed, 0 failed:
    • parsing (VICTORY_PIPELINE_WAIT_MS value, invalid fallback, 0),
    • the default budget is 500 ms (not Duration::default()),
    • wait actually blocks for the worker instead of returning immediately.
  • Mutation coverage: cargo mutants -p victory-gpu --in-diff <this diff> -- --lib pipeline_wait — 4 mutants, 4 caught.
  • No behaviour change when the variable is unset.

Notes

A draw or dispatch whose pipeline is not ready when the budget is spent is dropped, as an untranslated one is. Lowering the value can omit draws until their pipeline is ready; it does not make pipelines cheaper.

**@⁠dutch2005** on GitHub · 2026-11-25 13:32 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/76) `perf/pipeline-wait-ms` → `main` · +53 −2 · 2 files · 1 commits · closed without merging ## Why The wait for a pipeline made by a background worker is a constant 500 ms per title frame (20 s for screen passes). On the world's first frames, where thousands of pipelines are still being made, that wait can dominate, and there is no way to trade a dropped draw for frame time. `fxceless/victory-fork` and upstream carry the same switch; this is written anew against this tree's budget code. ## What - Reads `VICTORY_PIPELINE_WAIT_MS` once (milliseconds; `0` does not wait). - Default remains 500 ms; invalid values fall back to 500. - Screen passes keep their 20 s budget. - Adds a unit test for the parsing and documents the variable in the debugging table. ## Testing - `cargo test -p victory-gpu --lib pipeline_wait -- --test-threads=1` — 3 passed, 0 failed: - parsing (`VICTORY_PIPELINE_WAIT_MS` value, invalid fallback, `0`), - the default budget is 500 ms (not `Duration::default()`), - `wait` actually blocks for the worker instead of returning immediately. - Mutation coverage: `cargo mutants -p victory-gpu --in-diff <this diff> -- --lib pipeline_wait` — **4 mutants, 4 caught**. - No behaviour change when the variable is unset. ## Notes A draw or dispatch whose pipeline is not ready when the budget is spent is dropped, as an untranslated one is. Lowering the value can omit draws until their pipeline is ready; it does not make pipelines cheaper.
The wait for a pipeline made by a background worker was a constant per frame; a world's first frame can spend it in full. The variable bounds it: 0 does not wait, and a draw whose pipeline is not ready is dropped as an untranslated one is. Screen passes keep their 20 s budget. Tests cover parsing, the default budget, and that wait actually blocks for the worker.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:35:06 +00:00
github-bot closed this pull request 2026-11-26 03:35:06 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.