GPU diagnostics: skip host pipeline creation by shader hash #1320
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1320
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1320/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@gurvancampion on GitHub · 2026-11-24 17:24 UTC · original
gurvancampion:topic/skip-pipeline-compile→main· +97 −21 · 3 files · 1 commits · merged 2026-11-25 21:50 UTCSummary
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.github-bot referenced this pull request2026-11-26 04:55:09 +00:00
@Marvisak on GitHub · 2026-11-25 01:22 UTC · original · edited 2026-11-25 20:19 UTC
Automated triage for the maintainers.
Merge candidate (unchanged). The new head
d5fe304is a rebase ontomain(67e8ae1). Compared with the previously reviewed3d87d02, the only difference is README context:main's longerVICTORY_TRACE_SHADERSrow is kept, and this PR'sVICTORY_SKIP_PIPELINESwording sits on top. The code incrates/victory-gpu/src/pipeline.rsandpipeline/make.rsis the same as before. A pipeline whose shader hash is listed is completed without a host pipeline inPending::newand never queued byearly/ready. EveryPending::newcall site onmainpasses the new argument, and nothing inpipeline/changed onmainsince the last review. Everything stays behind thediagnosticsfeature, with no dependency changes.CI: passing.
Generated by Claude Code
@BaggyALPHA on GitHub · 2026-11-25 06:09 UTC · original
Rebased this onto
main940d32flocally and tested it: the behaviour it claims is real and I measured it, but the rebase needs one change beyond the two conflicting files —mainhas since added three call sites ofPending::newthat the new signature does not compile against.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
main940d32f, separateCARGO_TARGET_DIRper tree.What the rebase runs into
README.md— trivial: keep your newVICTORY_SKIP_PIPELINESwording, keepmain's newerVICTORY_GPU_TIMINGrow (it gained "a device removal names the list it happened in...") and its newVICTORY_TRACE_SHADERSrow.pipeline/make.rs—mainmoved the key into akey()helper, added alog("created", &key, ...)call, added thenow/takenfields, andearly()now starts withsuper::library::note_created(&p.key). Your three pieces layer on top cleanly: theskip_hashesparameter,skipped_shaderplus the pre-setmade, and thep.made.get().is_none()guard inearly()(keepingnote_createdbefore it).mainaddeddraws_go_ahead_of_early_starts, which callsPending::new(Vec::new(), None)three times. Those need the third argument (#[cfg(feature = "diagnostics")] &[]). Worth writing them in the same multi-line shape you used infirst_use_is_made_by_a_worker— on one line they cost sixrustfmtdiffs; multi-line, the tree'srustfmt --checkoutput is identical tomain's.Checks on the rebased tree
main940d32fcontrolcargo test -p victory-gpu --features diagnostics --lockeddiagnosticsclippy --all-targets -- -D warnings, with and without the featurerustfmt --checkdiff count per filemainis not rustfmt-clean)cargo xtask policyThe two failures are
descriptor::host::tests::dynamic_slots_are_held_until_releasedandmemory::tests::lists_share_a_table_and_copies_keep_their_views— the capped-view-heap pair (FIND-9), failing identically on the control, so nothing here. Net effect is one extra passing test. Yourskipped_pipeline_stays_off_the_queueandskip_hashes_accepts_full_hashes_onlyboth pass, and the former is a good test: asserting the shader is never even translated is the part that matters.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):
main940d32f, same probe skippedSo on
maina skipped pipeline is still translated and still made and only its commands are dropped, and with this PR it is never created at all. That is exactly the difference the description claims, and it is the capability #1972 needs for the 61 pipelines that crash AMD's shader compiler on creation — worth linking them.One half I could not verify. "Draw and dispatch diagnostics keep reporting
skipped shader {hash}" — I saw no drop reason for the probe in these runs, because a boot-only run on this card ends at the format-115 device removal (#1781/#1753) before that program is dispatched, so nothing exercised the record path for it. Separately, onmainI could not get a skipped direct dispatch to report a reason at all in a longer world run, while a skipped indirect one reported 20-30 times (notes on #1968). Since this PR keeps that reporting path, it may be worth a look — a switch whose effect cannot be confirmed from the log is easy to draw a wrong conclusion from, which I did before catching it.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.
github-bot referenced this pull request2026-11-26 07:44:41 +00:00