victory-gpu: VICTORY_SKIP_PIPELINES works in release builds, where the removals are #2696
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!2696
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2696"
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?
@pes7 on GitHub · 2026-11-25 18:23 UTC · original
pes7:perf/skip-in-release→main· +20 −10 · 2 files · 1 commits · openVICTORY_SKIP_PIPELINESanswers the one question a removal report needs - "is this shader the one?" - and until now it only worked in a--features diagnosticsbuild. That is the build where the removal does not happen: on this machine the release build loses the device 10 s in, while the same build with diagnostics and no debug layer runs 180 s without losing it. So the switch now works in every build; only its reporting (dropped ... without a host pipeline, the breadcrumb line) stays diagnostics.Verified on the title, release build:
(unset: 0 dropped; a skipped pipeline is dropped exactly like one with no host pipeline, so the frame line shows it.)
What it is not: it does not fix anything by itself, and it does not identify a shader for you. For #2661 and #2671 that means a tester can now do the experiment in the build that crashes.
One correction to what I wrote earlier in #1633, while using it: the
first bind pipeline=...lines are logged by the pipeline worker that builds the host pipeline, so they do not place a command in the submission that died. I read them as "this dispatch is in the dying list" - skipping both compute pipelines named there dropped 0 draws and the removal happened at the same place, which is the measurement that shows they were only being made at the time.VICTORY_D3D12_DEBUG=1with breadcrumbs (note_op) stays the only way to name the command.cargo test --workspace --locked; both clippy configurations with
-D warnings;cargo xtask policy.What it gives (to decide the merge):
VICTORY_SKIP_PIPELINESworks in release builds - the builds where the device removals actually reproduce (measured: release removes the device 10 s in; the same build with--features diagnosticsruns 180 s without removing it). It is the switch testers use to answer "is this shader the one that hangs the GPU?" and it could only be asked of the build that does not reproduce the problem.State: MERGEABLE, CI
checkgreen, rebased onto today'smain(f3578e3).Risk: none without the variable: the list is read once, and empty is the
falseit was before.The switch answers one question - "is this shader the one that removes the device (or paints the wrong picture)?" - and it could only be asked of a diagnostics build. That is the build in which the removal does not reproduce on the machines seen so far: a diagnostics build does more work per submission, so the frame that hangs the GPU in a release build never gets there (measured here: release removes the device 10 s in, the same build with `--features diagnostics` and no debug layer runs 180 s and does not remove it at all). So `is_skipped`, `skipped_shader` and `parse_skip_hashes` are no longer behind the feature, and the three call sites keep the skip but gate only their reporting (`note_drop`, `dropped`, `shaders_of`). A release build now answers the question testers are actually asking: VICTORY_SKIP_PIPELINES=0602c2384acbb3b2 -> dropped 1/frame in the menu and a skipped pipeline is dropped the way one with no host pipeline is (the frame's "dropped N without a host pipeline" counter moves). No behaviour change without the variable: `is_skipped` reads it once, and an empty list is the `false` it was before. cargo test --workspace --locked; both clippy configurations with -D warnings; cargo xtask policy.@DrDarkDK on GitHub · 2026-11-25 18:28 UTC · original
A release run can show
dropped 0 without a host pipelineeven whenVICTORY_SKIP_PIPELINESmatched an indirect dispatch.State::execute_indirectreturnsfalseon a match, and its caller increments the genericindirectcounter, which also includes unrelated drops.Could release log the first actual skip for each configured hash, or count explicit skips separately? A check with one matching indirect dispatch would verify that testers can tell when the filter took effect.
Static review only.
AI-assisted with Codex.
@kotekompotek on GitHub · 2026-11-25 18:50 UTC · original
Sound reasoning: the experiment needs to run in the build that exhibits the removal, and a diagnostics build changes the timing enough to hide it on these machines. The skip itself is correctly ungated while note_drop/dropped stay diagnostics-only, and DROPPED still increments so the frame line reports it.
@fuzeofficlal on GitHub · 2026-11-25 19:15 UTC · original
Independent Windows 11 + NVIDIA GeForce RTX 5090 + WARP verification and review of
e3b1dbc(on13f91ca):Verification (
rustc 1.98.1MSVC)cargo clippy --locked -p victory-gpu --all-targets -- -D warningsand--features diagnostics: 0 warnings.VICTORY_D3D12_WARP=1):cargo test --locked -p victory-gpu --features diagnostics-> 198 passed, 0 failed, 1 ignored.diagnostics):cargo test --locked -p victory-gpu-> 193 passed, 2 failed, 1 ignored (only the 2 pre-existing RTX 5090 1M view-heap cap baseline failures from #1744).Review Notes
VICTORY_SKIP_PIPELINESpays only anOnceLockacquire load + empty-slice check with no locks or allocations, and all diagnostic-only drop/trace tables remain cleanly gated underfeature = "diagnostics".prepare_forfor graphics/mesh,dispatch, andexecute_indirectahead ofindirect::bound). Clean and ready to merge.@cloph-dsp on GitHub · 2026-11-25 19:38 UTC · original
Independent local verification (claim
VERIFY-2696-SKIP-RELEASEon #1633), Windows / rustc+cargo 1.100.0 / MSVC,CARGO_BUILD_JOBS=2, no game files, no GPU, no clippy/rustup, no source edits.cargo test --locked -p victory-gpu --lib --quiet→ 193 passed, 1 ignored, 2 failed:descriptor::host::tests::dynamic_slots_are_held_until_releasedandmemory::tests::lists_share_a_table_and_copies_keep_their_views.origin/main13f91ca(same two tests, 1 failed each), so they are pre-existing and unrelated to this diff.cargo test --locked -p victory-gpu --lib --quiet pipeline→ 16 passed, 0 failed.git diff --check origin/main..HEADclean.origin/main,crates/victory-gpu/src/pipeline.rs:299still haspub(crate) fn is_skippedbehind#[cfg(all(windows, feature = "diagnostics"))]; this PR removes that gate so the skip works in release builds while keepingnote_drop/droppeddiagnostics-only.No blocking findings from this verification; the two red tests are already red on main. AI-assisted (Hy4 flash).
@Marvisak on GitHub · 2026-11-25 22:15 UTC · original · edited 2026-11-26 00:25 UTC
Automated triage for the maintainers.
Recommended for a maintainer's look.
VICTORY_SKIP_PIPELINESnow works in release builds.skip_hashes/skipped_shaderincrates/victory-gpu/src/pipeline.rslose thediagnosticsgate, andis_skippedasksskipped_shader(&pipeline(this).shaders, skip_hashes())instead of the host's diagnostics-only stored field. The three checks indraw.rs(prepare_for,dispatch,execute_indirect) run in every build, with onlydropped/note_drop/note_opgated. With the variable unset, the cost per draw is aOnceLockread and an empty-slice check. It merges cleanly and CIcheckis passing.On your reply: the adaptation to #1653's
skip_hashes/skipped_shadershapes reads correctly. Two small nits, neither blocking:is_skippednow has nocfgwhileskip_hashesis#[cfg(windows)]; a#[cfg(windows)]onis_skippedwould keep non-Windows builds ofpipeline.rscompiling.skip_hashescarries rationale that the repo prefers kept out of code; one line would do.DrDarkDK's point also stands: a skipped indirect dispatch shows up only in the generic indirect counter in release.
Generated by Claude Code
@pes7 on GitHub · 2026-11-25 22:24 UTC · original
Rebased onto today's
main(f3578e3) and adapted to the skip list that landed meanwhile (#1653'sskip_hashes/skipped_shadershapes):parse_skip_hashesis#[cfg(any(windows, test))]andskip_hashes/skipped_shaderare#[cfg(windows)]- nofeature = "diagnostics";is_skippedno longer reads the host pipeline's storedskipped_shaderfield (that one is only filled in diagnostics builds): it asksskipped_shader(&pipeline(this).shaders, skip_hashes()), so a release build answers too, andPending::new's signature andmake.rsneed no change;draw.rskeeps the threeis_skippedchecks in every build and gates only their reporting, as before.Checked both configurations:
cargo build --release -p victoryand--features diagnosticsbuild,cargo test --release -p victory-gpupasses (228), clippy clean.@Dukestar69 on GitHub · 2026-11-26 04:31 UTC · original · approved these changes
Tested merged onto
origin/main(63bcca4) on Windows 11 x64:cargo test -p victory-gpu --lib pipeline::tests: 4 passed, 0 failed.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo clippy -p victory-gpu --all-targets --features diagnostics -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@fuzeofficlal on GitHub · 2026-11-26 12:54 UTC · original · requested changes
Reviewed and verified
e34bd8c7merged locally ontoorigin/main(63bcca43) on Windows 11 x64 (NVIDIA GeForce RTX 5090 and WARP, Rust1.98.1MSVC, Windows SDK10.0.26100.0dxil.dll; synthetic tests only, no game files).Windows release and diagnostics behavior looks clean and verified:
VICTORY_SKIP_PIPELINESonly pays a singleOnceLockread and empty-slice check on the hot path, and all three execution entry points incrates/victory-gpu/src/draw.rs(prepare_forat:516-519,dispatchat:1074-1080, andexecute_indirectahead of argument clamping at:1684-1692) are covered while keeping diagnostic drop/trace tables gated.cargo xtask policy(190 files ok),cargo clippy --locked -p victory-gpu --all-targets -- -D warnings(default &--all-features),cargo check --locked --release -p victory, RTX 5090 dev &--release(26/26), RTX 5090 & WARPdiagnostics + DEBUG=1(28/28), combined#2654 + #2696(27/27), and a live non-diagnostics--releaseVICTORY_SKIP_PIPELINES=<hash>probe all passed.One-line fix needed
pub(crate) fn is_skipped(crates/victory-gpu/src/pipeline.rs:321-323) removed#[cfg(all(windows, feature = "diagnostics"))]completely instead of keeping#[cfg(windows)]. Becausecrates/victory-gpu/src/lib.rs:44compilespub mod pipeline;unconditionally on all targets, whileskip_hashes(:301-308) andskipped_shader(:310-319) remain#[cfg(windows)],is_skippedfails to compile (E0425) on non-Windows targets. Please restore#[cfg(windows)]onis_skipped.Non-blocking note
Pending::newincrates/victory-gpu/src/pipeline/make.rsstill gatesskipped_shaderbehind#[cfg(feature = "diagnostics")], so in release builds prebuilt/early-started pipelines matchingVICTORY_SKIP_PIPELINEScan still compile on background workers even though all draws/dispatches/indirect executions are omitted.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.