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

Open
Lilith133T wants to merge 1 commit from upstream-pr/845 into main
Lilith133T commented 2026-11-25 10:21:27 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Lilith133T on 2026-11-25T10:21:27Z.


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).

<!-- greyfinch-sync:fxceless/victory-fork:issue:5489433053 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/845). Originally posted by [Lilith133T](https://github.com/Lilith133T) on 2026-11-25T10:21:27Z. --- 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).
MamaLeVrai commented 2026-11-25 13:06:04 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T12:23:34Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7162310896 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/845#issuecomment-7162310896). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-25T12:23:34Z. --- 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.
slauko commented 2026-11-25 14:10:53 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by slauko on 2026-11-25T14:01:25Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7164639252 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/845#issuecomment-7164639252). Originally posted by [slauko](https://github.com/slauko) on 2026-11-25T14:01:25Z. --- 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.
Filip722 commented 2026-11-27 00:52:02 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-27T00:52:02Z.


I ran a matched prewarm comparison on a d154dcb1-based Series S build under GE-Proton11-14 and vkd3d-proton 3.2.0, on the Bazzite RTX 5060 Laptop. I cloned the same prefix and cache seed for each arm. For the second arm I set aside only the generated 2,707-key early list. The native pipeline library, executable, environment and runtime matched.

With the list, the loading watchdog fired at 119.1 s and the last sampled loading frames showed 2,164 queued jobs. With the list set aside, the same title null write fired at 94.3 s and the last sampled loading frames showed zero queued jobs. Both stopped in loading. These results put a limit on generalizing the earlier positive report to this runtime and revision.

Assisted by Codex (GPT-6.2-Sol High).

<!-- greyfinch-sync:fxceless/victory-fork:comment:7206818261 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/845#issuecomment-7206818261). Originally posted by [Filip722](https://github.com/Filip722) on 2026-11-27T00:52:02Z. --- I ran a matched prewarm comparison on a `d154dcb1`-based Series S build under GE-Proton11-14 and vkd3d-proton 3.2.0, on the Bazzite RTX 5060 Laptop. I cloned the same prefix and cache seed for each arm. For the second arm I set aside only the generated 2,707-key early list. The native pipeline library, executable, environment and runtime matched. With the list, the loading watchdog fired at 119.1 s and the last sampled loading frames showed 2,164 queued jobs. With the list set aside, the same title null write fired at 94.3 s and the last sampled loading frames showed zero queued jobs. Both stopped in loading. These results put a limit on generalizing the earlier positive report to this runtime and revision. Assisted by Codex (GPT-6.2-Sol High).
DecayingEagle commented 2026-11-27 11:57:15 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by DecayingEagle on 2026-11-27T11:57:15Z.


Additional Linux/RDNA3 data point, using a backport of this PR's VICTORY_EARLY_PIPELINES gate rather than this fork's complete current tree.

RX 7900 XT, Mesa 26.3.1 RADV, private Wine 11.22, vkd3d-proton 71cae09; retail 1.0.2.1, Series X, 2560x1440 fullscreen, RT off. Base is Belobug/VIctory-Belobug-AMD a-publier@4eb6cfd, with the dynamic descriptor/typed-half/learned constant-order integration and the global half-load correction proposed in Belobug/VIctory-Belobug-AMD#565. The gate is the only code change between the two runtime builds below.

  • Default early starts: the log reached started_early=3399 about 24 seconds after launch. An eight-minute automated run reached world/cutscene frames, with no recorded title fault, device loss or kernel GPU fault. The planned harness timeout ended it.
  • VICTORY_EARLY_PIPELINES=0: a 150-second automated run reached the same opening office dialogue; counters stayed at started_early=0, with made=0 loaded=2218 in the last pipeline-completion line. No recorded title/device/kernel fault; ended at the planned limit. Disk caches and the learned list were retained.
  • Mouths still visibly over-deform and the eyes still have pale/corrupt shading with zero early starts. This control did not remove those artifacts on this integration. It does not establish a cause for the original Windows report or rule out a scheduling issue elsewhere.

Both runs used the same scripted startup/A holds and persistent settings. These were sequential runs with growing caches and different durations, not a cloned-cache matched benchmark. No performance claim. The gate remains optional; default early behavior is retained locally.

The backport built release and diagnostics and passed both workspace/all-target Clippy configurations (-D warnings), repository policy, seven existing pipeline-queue checks and 49 other targeted integration checks. Native Windows full-suite testing was not performed. No game data attached.

Testing, analysis and this report assisted by OpenAI Codex.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7217666174 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/845#issuecomment-7217666174). Originally posted by [DecayingEagle](https://github.com/DecayingEagle) on 2026-11-27T11:57:15Z. --- Additional Linux/RDNA3 data point, using a backport of this PR's `VICTORY_EARLY_PIPELINES` gate rather than this fork's complete current tree. RX 7900 XT, Mesa 26.3.1 RADV, private Wine 11.22, vkd3d-proton `71cae09`; retail 1.0.2.1, Series X, 2560x1440 fullscreen, RT off. Base is Belobug/VIctory-Belobug-AMD `a-publier@4eb6cfd`, with the dynamic descriptor/typed-half/learned constant-order integration and the global half-load correction proposed in [Belobug/VIctory-Belobug-AMD#565](https://github.com/Belobug/VIctory-Belobug-AMD/pull/565). The gate is the only code change between the two runtime builds below. - Default early starts: the log reached `started_early=3399` about 24 seconds after launch. An eight-minute automated run reached world/cutscene frames, with no recorded title fault, device loss or kernel GPU fault. The planned harness timeout ended it. - `VICTORY_EARLY_PIPELINES=0`: a 150-second automated run reached the same opening office dialogue; counters stayed at `started_early=0`, with `made=0 loaded=2218` in the last pipeline-completion line. No recorded title/device/kernel fault; ended at the planned limit. Disk caches and the learned list were retained. - Mouths still visibly over-deform and the eyes still have pale/corrupt shading with zero early starts. This control did not remove those artifacts on this integration. It does not establish a cause for the original Windows report or rule out a scheduling issue elsewhere. Both runs used the same scripted startup/A holds and persistent settings. These were sequential runs with growing caches and different durations, not a cloned-cache matched benchmark. No performance claim. The gate remains optional; default early behavior is retained locally. The backport built release and diagnostics and passed both workspace/all-target Clippy configurations (`-D warnings`), repository policy, seven existing pipeline-queue checks and 49 other targeted integration checks. Native Windows full-suite testing was not performed. No game data attached. Testing, analysis and this report assisted by OpenAI Codex.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/845:upstream-pr/845'
git switch 'upstream-pr/845'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/845'
git switch 'upstream-pr/845'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/845'
git switch 'upstream-pr/845'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/845'
git switch 'main'
git merge --squash 'upstream-pr/845'
git switch 'main'
git merge --ff-only 'upstream-pr/845'
git switch 'main'
git merge 'upstream-pr/845'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
fxceless/victory-fork!844
No description provided.