Skip to content

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

Draft
Lilith133T wants to merge 1 commit into
fxceless:mainfrom
Lilith133T:diagnostics/early-pipeline-starts
Draft

Lilith133T wants to merge 1 commit into
fxceless:mainfrom
Lilith133T:diagnostics/early-pipeline-starts

Conversation

@Lilith133T

Copy link
Copy Markdown

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

MamaLeVrai commented Nov 25, 2026 •

Copy link
Copy Markdown

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

slauko commented Nov 25, 2026

Copy link
Copy Markdown

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.

CernyMuzCZ pushed a commit to CernyMuzCZ/vitezstvi-fork that referenced this pull request Nov 25, 2026
…first-use scheduling, preserving fxceless#777 commit check)
nullexxx pushed a commit to nullexxx/victory-fork that referenced this pull request Nov 25, 2026
A wireless receiver with its controller switched off still answers
XInputGetState with an all-zero state, which connected the empty slot
and disconnected the keyboard stand-in pad.

Keep each host slot disconnected until its current connection reports
non-rest input, reset that flag on disconnect, and keep scripted
diagnostic keys on the stand-in while no host pad has reported input.

Fixes fxceless#845.

Co-authored-by: andrewpozdnakov7-jpg <andrewpozdnakov7-jpg@users.noreply.github.com>
PiloteCode added a commit to PiloteCode/victory-fork that referenced this pull request Nov 25, 2026
…celess#24/fxceless#104), null CBVs (fxceless#304), tables at list cuts (fxceless#742), heap entries (fxceless#589), barriers (fxceless#787), depth-stencil UAV barriers (fxceless#214), windows ending at recorded writes (fxceless#663), sRGB views (fxceless#644), wide accesses across pages (fxceless#846), view-guard costs (fxceless#812/fxceless#853), the fill latch (fxceless#860), pipeline waits (fxceless#709), robustness; opt-in fxceless#868/fxceless#845
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants