GPU: allow first-use pipeline scheduling with a warm cache #845

Open
github-bot wants to merge 1 commit from github-bot/gh-845 into main AGit
Owner

@⁠Lilith133T on GitHub · 2026-11-25 10:21 UTC · original
Lilith133T:diagnostics/early-pipeline-starts → main · +5 −1 · 2 files · 1 commits · draft

This adds VICTORY_EARLY_PIPELINES=0 to isolate eager pipeline creation when diagnosing rendering differences between a first launch and a warm launch. With the default setting, workers start previously used pipelines during loading. With the switch set, draws and dispatches request their pipelines on first use. Both paths continue recording the set for subsequent launches.

On Windows with an RTX 5070 Ti (driver 610.88), a local integration build showed visible banding in the sky and flat shading on characters at a repeatable checkpoint. With the shader cache and driver library retained, I compared three runs:

Startup condition Pipelines started early Visible result
Populated learned list 2,371 Strong sky banding
Same binary, learned list omitted 0 Smooth sky gradient and facial shading
Populated learned list, switch set 0 Smooth sky gradient and facial shading

The underlying rendering defect is still under investigation. The switch makes the comparison reproducible while preserving the learned list between runs.

I tested the standalone patch against 9376fd6 with cargo test --locked --profile diag -p victory-gpu --features diagnostics --lib pipeline:: -- --test-threads=1 (12 passed) and cargo xtask policy (171 files passed).

**@⁠Lilith133T** on GitHub · 2026-11-25 10:21 UTC · [original](https://github.com/fxceless/victory-fork/pull/845) `Lilith133T:diagnostics/early-pipeline-starts` → `main` · +5 −1 · 2 files · 1 commits · draft This adds `VICTORY_EARLY_PIPELINES=0` to isolate eager pipeline creation when diagnosing rendering differences between a first launch and a warm launch. With the default setting, workers start previously used pipelines during loading. With the switch set, draws and dispatches request their pipelines on first use. Both paths continue recording the set for subsequent launches. On Windows with an RTX 5070 Ti (driver 610.88), a local integration build showed visible banding in the sky and flat shading on characters at a repeatable checkpoint. With the shader cache and driver library retained, I compared three runs: | Startup condition | Pipelines started early | Visible result | | --- | ---: | --- | | Populated learned list | 2,371 | Strong sky banding | | Same binary, learned list omitted | 0 | Smooth sky gradient and facial shading | | Populated learned list, switch set | 0 | Smooth sky gradient and facial shading | The underlying rendering defect is still under investigation. The switch makes the comparison reproducible while preserving the learned list between runs. I tested the standalone patch against `9376fd6` with `cargo test --locked --profile diag -p victory-gpu --features diagnostics --lib pipeline:: -- --test-threads=1` (12 passed) and `cargo xtask policy` (171 files passed).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:52:26 +00:00
Author
Owner

@⁠MamaLeVrai on GitHub · 2026-11-25 12:23 UTC · original · edited 2026-11-25 12:51 UTC

Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head 091b5ae into main f85101b in a throwaway tree (no conflict). cargo clippy --workspace --all-targets --locked -- -D warnings fails with the errors main itself has on this machine (placed_filler_twins, depth_written, a sort, and manual implementation of .is_multiple_of() at victory-gpu/src/shadow.rs:2675; PR #841 fixes the first three), also with --all-features; this PR adds none. (Correction: my first version of this report said that the is_multiple_of one was extra here. It is in main too: my first baseline run of main did not list it, and a run with --keep-going on a clean main does.) cargo test --workspace --locked: run 1: stopped at indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields (the one that fails on main itself most runs here (PR #849 and #847 fix its assertion)); run 2: 565 passed, 0 failed, 12 ignored (main alone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data.

AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-25 12:23 UTC · [original](https://github.com/fxceless/victory-fork/pull/845#issuecomment-7162310896) · edited 2026-11-25 12:51 UTC Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head `091b5ae` into `main` `f85101b` in a throwaway tree (no conflict). `cargo clippy --workspace --all-targets --locked -- -D warnings` fails with the errors `main` itself has on this machine (`placed_filler_twins`, `depth_written`, a sort, and `manual implementation of .is_multiple_of()` at `victory-gpu/src/shadow.rs:2675`; PR #841 fixes the first three), also with `--all-features`; this PR adds none. (Correction: my first version of this report said that the `is_multiple_of` one was extra here. It is in `main` too: my first baseline run of `main` did not list it, and a run with `--keep-going` on a clean `main` does.) `cargo test --workspace --locked`: run 1: stopped at `indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields` (the one that fails on `main` itself most runs here (PR #849 and #847 fix its assertion)); run 2: 565 passed, 0 failed, 12 ignored (`main` alone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data. AI-assisted (Claude Code); no game data.
Author
Owner

@⁠slauko on GitHub · 2026-11-25 14:01 UTC · original

A data point from the run that first had a saved library — for making this the default under Wine.

With host pipeline library loaded bytes=312440 mapped=true (VIctory#1722's null blob, picked), the runtime logged title pipelines to start early pipelines=1657 and started 1,342 of them in the first seconds (started_early=1342). The title presented frames 1, 2, 4, 8, 16, 32 and no more; 31 s after launch its watchdog ended the run (0xc0000005 at title+0x2215c35, a write to 0; exit 5). The run never printed a frame line.

The same binary, same prefix, with the library's folder moved away (title pipelines to start early pipelines=0): 30.0 fps on the title screen for the whole run.

With VICTORY_EARLY_PIPELINES=0 and the library back: the library loads, pipelines are requested on first use, the title screen runs at 25–30 fps, and the world comes up.

Wine 11.0 (Proton Experimental), vkd3d-proton master@ec20719, RTX 3080 Ti, release build. What the early starts block the title's main thread on is not measured; vkd3d-proton serialising pipeline creation behind eight workers would explain it. Worth knowing for anyone who picks #1722 or #885: the first run is fine, the second one is not.

**@⁠slauko** on GitHub · 2026-11-25 14:01 UTC · [original](https://github.com/fxceless/victory-fork/pull/845#issuecomment-7164639252) A data point from the run that first had a saved library — for making this the default under Wine. With `host pipeline library loaded bytes=312440 mapped=true` (VIctory#1722's null blob, picked), the runtime logged `title pipelines to start early pipelines=1657` and started 1,342 of them in the first seconds (`started_early=1342`). The title presented frames 1, 2, 4, 8, 16, 32 and no more; 31 s after launch its watchdog ended the run (`0xc0000005` at `title+0x2215c35`, a write to 0; exit 5). The run never printed a frame line. The same binary, same prefix, with the library's folder moved away (`title pipelines to start early pipelines=0`): 30.0 fps on the title screen for the whole run. With `VICTORY_EARLY_PIPELINES=0` and the library back: the library loads, pipelines are requested on first use, the title screen runs at 25–30 fps, and the world comes up. Wine 11.0 (Proton Experimental), vkd3d-proton `master@ec20719`, RTX 3080 Ti, release build. What the early starts block the title's main thread on is not measured; vkd3d-proton serialising pipeline creation behind eight workers would explain it. Worth knowing for anyone who picks #1722 or #885: the first run is fine, the second one is not.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/845/head:github-bot/gh-845'
git switch 'github-bot/gh-845'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-845'
git switch 'github-bot/gh-845'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-845'
git switch 'github-bot/gh-845'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-845'
git switch 'main'
git merge --squash 'github-bot/gh-845'
git switch 'main'
git merge --ff-only 'github-bot/gh-845'
git switch 'main'
git merge 'github-bot/gh-845'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.