Repository navigation
GPU diagnostics: skip host pipeline creation by shader hash - #1320
Conversation
catminou4
left a comment
There was a problem hiding this comment.
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; this is source review plus the PR's own Windows tests.
VICTORY_SKIP_PIPELINES now skips host pipeline creation, not just draws: Pending::new computes skipped_shader once, pre-publishes made=None so ready() answers immediately, and early()/queueing are bypassed (made.get().is_none() guard). Draw/dispatch accounting (is_skipped, note_drop) reads the stored hash instead of recomputing. parse_skip_hashes moved to cfg(all(feature=diagnostics, any(windows, test))) so the parsing test runs anywhere the crate does. The new skipped_pipeline_stays_off_the_queue test verifies neither cold nor warm pipelines queue workers. Sound; diagnostics-only feature.
|
Automated triage for the maintainers. Merge candidate (unchanged). The new head CI: passing. Generated by Claude Code |
|
Rebased this onto Triage asked for a rebase, so I did one to see what it would take. Setup: RTX 3080 (driver 621.24), Ryzen 7 5800X, 32 GB, Windows 11 26300, pinned What the rebase runs into
Checks on the rebased tree
The two failures are The claim itself, measured. Three short boot-only runs with the local title, one compute program created early in boot used as the probe (same warm cache, same scripted input):
So on One half I could not verify. "Draw and dispatch diagnostics keep reporting I have not pushed anything; the rebase is local and the resolution is described above so it stays your commit. Nothing from the game here: test counts, log line kinds and timings. Inputs were the local title for the three runs and synthetic for everything else. AI-assisted (Claude Code); results are from the runs and builds described. |
70b92d9 to
3d87d02
Compare
3d87d02 to
d5fe304
Compare
Upstream's VICTORY_SKIP_PIPELINES (Marvisak#1320) works in diagnostics builds only. Under GE-Proton11-14 22 compute shaders crash vkd3d-proton while their pipelines are made (its dxil-spirv crashes on each; dxil-spirv's non-recursive CFG passes from 2026-11-23 convert them): the worker making one dies and what waits for it waits forever, or the process ends. Players run release builds, so the skip must work there too. The skip is now in every build: VICTORY_SKIP_PIPELINES if set (set and empty: none), else under Wine the 22 (WINE_SKIPPED), unless VICTORY_PROTON is set (our Proton build, whose vkd3d-proton has the fix). A skipped pipeline counts as made without a host pipeline, as Marvisak#1320 does it; `skips_shader` tells the pre-build to leave it out too. `on_wine` moves from victory-hle's xmem into victory-gpu, one copy for both.
…1320 Our skip commit becomes 'skipped pipelines in every build, and the Wine list by default', on top of upstream's VICTORY_SKIP_PIPELINES (Marvisak#1320); the crash list's key joins the pre-build's row. Upstream's Marvisak#1430 lets an idle game pad and the keyboard stand-in work together, so that limit goes.
Upstream main merged Marvisak#2143, Marvisak#2162, Marvisak#158, Marvisak#1906 and Marvisak#1152 and took up what Marvisak#1769 (LDS bounds, Marvisak#1949) and Marvisak#1763 (typed UAV formats, Marvisak#2462) did; main's code is kept for those. - emit/lower.rs: ds_bpermute within each half (main's Marvisak#573, same as Marvisak#439's); LDS bounds as main's Marvisak#1949 (Marvisak#1769's test-only counter kept, its and_guard dropped); title-memory marks: main's straddling-write lookup (Marvisak#2484) with Marvisak#2167's current head (3cb308d, rebased on 63bcca4): guarded dirty atomics, raw_dword2, memory_null, synthetic_mark_dxil in lower/mark_tests.rs; the old Marvisak#2167 head taken out first. - emit/host.rs: main's shared WARP device and lock (Marvisak#244) with Marvisak#439's adapter list and Host::on (create_device takes an optional adapter). - descriptor/host.rs: main's Marvisak#2462 format checks; Marvisak#1763's tests kept. - gpu host.rs: main's multi-plane present with Marvisak#2310's crumbed copy. - pipeline.rs: Marvisak#2118/Marvisak#2311's builder and BVH checks with main's skip hashes (Marvisak#1320); draw.rs, shadow.rs, main.rs: both sides. - Tests main added since get Marvisak#439's Parts fields and emit's Target. - README: base 63bcca4; rows of PRs merged upstream, superseded or closed taken out, with a note. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s do Main's Marvisak#1320 gave `Pending::new` the diagnostics build's shader hashes to skip; the test passes none, as the module's other tests do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Upstream's VICTORY_SKIP_PIPELINES (Marvisak#1320) works in diagnostics builds only. Under GE-Proton11-14 22 compute shaders crash vkd3d-proton while their pipelines are made (its dxil-spirv crashes on each; dxil-spirv's non-recursive CFG passes from 2026-11-23 convert them): the worker making one dies and what waits for it waits forever, or the process ends. Players run release builds, so the skip must work there too. The skip is now in every build: VICTORY_SKIP_PIPELINES if set (set and empty: none), else under Wine the 22 (WINE_SKIPPED), unless VICTORY_PROTON is set (our Proton build, whose vkd3d-proton has the fix). A skipped pipeline counts as made without a host pipeline, as Marvisak#1320 does it; `skips_shader` tells the pre-build to leave it out too. `on_wine` moves from victory-hle's xmem into victory-gpu, one copy for both.
…1320 Our skip commit becomes 'skipped pipelines in every build, and the Wine list by default', on top of upstream's VICTORY_SKIP_PIPELINES (Marvisak#1320); the crash list's key joins the pre-build's row. Upstream's Marvisak#1430 lets an idle game pad and the keyboard stand-in work together, so that limit goes.
…tables' slots back (Marvisak#1320) `submit_split` runs the lists before its first unmet wait at once with `host.execute`, as `submit_cut` does. `submit_cut` then calls `list::tables_done` for those lists; its comment says why: the lists are not detached on that path, so nothing gives their fresh per-draw tables' dynamic slots back until the title resets them, and the ring of 262,144 slots ran out (run 45: 3,143 of 15,942 tables refused in one frame). `submit_split` had no such call: with `VICTORY_CUT_WAITS=0` (the documented switch that holds whole lists, as before) every submission leaks the slots of its first lists the same way, and later draws are dropped once the ring is full. The call is added after the same `host.execute`, mirroring `submit_cut`. `cargo test -p victory-gpu --lib`: 217 passed, 0 failed, 6 ignored; `cargo clippy -p victory-gpu --all-targets -- -D warnings`: clean. No game run: the two branches differ only in that call, and nothing without a host GPU drives `submit_split`. (cherry picked from commit af23c65)
…tables' slots back (Marvisak#1320) `submit_split` runs the lists before its first unmet wait at once with `host.execute`, as `submit_cut` does. `submit_cut` then calls `list::tables_done` for those lists; its comment says why: the lists are not detached on that path, so nothing gives their fresh per-draw tables' dynamic slots back until the title resets them, and the ring of 262,144 slots ran out (run 45: 3,143 of 15,942 tables refused in one frame). `submit_split` had no such call: with `VICTORY_CUT_WAITS=0` (the documented switch that holds whole lists, as before) every submission leaks the slots of its first lists the same way, and later draws are dropped once the ring is full. The call is added after the same `host.execute`, mirroring `submit_cut`. `cargo test -p victory-gpu --lib`: 217 passed, 0 failed, 6 ignored; `cargo clippy -p victory-gpu --all-targets -- -D warnings`: clean. No game run: the two branches differ only in that call, and nothing without a host GPU drives `submit_split`.
Summary
VICTORY_SKIP_PIPELINESfilters commands during recording, after an early cache hit or a host lookup can already send the matching pipeline to a worker.Pending::newnow records the matching hash and marks the host result complete and absent.earlyandreadyleave it off the queue. Draw and dispatch diagnostics keep reportingskipped shader {hash}.This extends the diagnostic used to isolate pipeline compilation crashes. Issue #144
Evidence
pipeline::make::tests::skipped_pipeline_stays_off_the_queuefailed on base with both queue flags set (0 passed, 1 failed). It passed on head (1 passed, 0 failed) and checked that both pipelines were complete and the synthetic shader was untranslated. Run withcargo xwin test -p victory-gpu --features diagnostics --locked --target x86_64-pc-windows-msvc pipeline::make::tests::skipped_pipeline_stays_off_the_queue.cargo xwin clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warningspassed on both revisions.cargo xwin clippy --workspace --all-targets --all-features --locked --target x86_64-pc-windows-msvc -- -D warningspassed on both revisions.cargo xwin test -p victory-gpu --features diagnostics --locked --target x86_64-pc-windows-msvcpassed under GE-Proton with Vulkan disabled. Base had 53 passes. Head had 54 passes. Both had one ignored test.cargo xwin test --workspace --locked --target x86_64-pc-windows-msvc --no-fail-fastrecorded 322 passes on each revision. With--all-features, base recorded 326 passes and head recorded 327. Both modes had the same 20 failures on base and head under no-GPU Wine, plus six ignored tests. The runs passed with those 20 cases filtered. The cases require a shader-model-6.6 device or Wine support for windows, a networking export, a nested Cargo build, or Git.cargo test -p xtask --locked repository_passes_policypassed natively on both revisions.cargo xtask policy --stagedpassed for all three changed files.cargo fmt --all -- --checkreported existing formatting differences on both revisions. Changed Rust lines pass againstrustfmt.toml.git diff --check origin/main HEADpassed.Not verified
Native Windows, live D3D12 and the retail title were outside this no-GPU run. Existing platform errors prevent full native Linux workspace tests and Clippy.
Merge Danger
A revert restores record-time filtering for matching Windows diagnostics pipelines. The pipeline cache format stays compatible.
AI disclosure
OpenAI Codex (
gpt-6.2-sol) assisted with the implementation, synthetic tests, verification, and PR draft. Antigravity (Gemini 4 Neon) coordinated and reviewed the diff. The author reviewed the diff and description before opening the PR.