victory-gpu: VICTORY_SKIP_PIPELINES works in release builds, where the removals are #2694
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from Marvisak/VIctory. Originally posted by pes7 on 2026-11-25T18:23:37Z.
VICTORY_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.Imported from Marvisak/VIctory. Originally posted by DrDarkDK on 2026-11-25T18:28:19Z.
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.
Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T18:50:03Z.
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.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T19:15:49Z.
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.Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-11-25T19:38:34Z.
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).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:15:24Z.
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
Imported from Marvisak/VIctory. Originally posted by pes7 on 2026-11-25T22:24:45Z.
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.Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T04:31:19Z.
Review: APPROVED
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).
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T12:54:36Z.
Review: CHANGES_REQUESTED
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.Imported from Marvisak/VIctory. Originally posted by nullexxx on 2026-11-27T02:20:15Z.
Seconding @fuzeofficlal's note about
Pending::newincrates/victory-gpu/src/pipeline/make.rs— ungating the earlymade.set(None)skip check in release builds (keeping only the diagnostic reason/logging behindfeature = "diagnostics") is critical for compiler hangs, not just GPU execution hangs.On Linux/Proton (
vkd3d-proton, CachyOS, GE-Proton11-14, RTX 5080, Ryzen 7 9800X3D,--release, Series S, 1920x1080), several compute shaders hang pipeline compilation itself. IfPending::newonly skips them indiagnosticsbuilds, a--releaserun still enqueues those shaders to the background workers at startup and deadlocks the entire worker pool, even withdraw.rsskipping draws/dispatches.Matched A/B results from the same starting cache and settings (tested with
Pending::newungated in--releaseon a downstream fork):VICTORY_SKIP_PIPELINESunset): queue stalls at1783–1805 being made(never drains),30–42 draws/frame,3.2–3.8 fps(261–314 ms/frame).Pending::newskipping before enqueue (VICTORY_SKIP_PIPELINESset to the hanging hashes): queue drains to0 being made,4796–6166 draws/frame,18.3–24.5 fps(40.9–54.7 ms/frame).Even leaving a single hanging compute shader (
559d9f0184e15fe3) unskipped in the worker queue left1 being madestuck and burned the per-frame wait budget (~3.7 fps).If you want to include ungating
Pending::new'smade.set(None)check alongside the#[cfg(windows)]fix onis_skipped, it would solve release-build compiler deadlocks in one shot — otherwise happy to open a small follow-up PR once #2696 merges.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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.