victory-gpu: VICTORY_SKIP_PIPELINES works in release builds, where the removals are #2696

Open
github-bot wants to merge 1 commit from github-bot/gh-2696 into main AGit
Owner

@⁠pes7 on GitHub · 2026-11-25 18:23 UTC · original
pes7:perf/skip-in-release → main · +20 −10 · 2 files · 1 commits · open

VICTORY_SKIP_PIPELINES answers the one question a removal report needs - "is this shader the one?" - and until now it only worked in a --features diagnostics build. 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:

VICTORY_SKIP_PIPELINES=0602c2384acbb3b2   ->  "dropped 1 without a host pipeline" in the menu frame line

(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=1 with 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_PIPELINES works in release builds - the builds where the device removals actually reproduce (measured: release removes the device 10 s in; the same build with --features diagnostics runs 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 check green, rebased onto today's main (f3578e3).

Risk: none without the variable: the list is read once, and empty is the false it was before.

**@⁠pes7** on GitHub · 2026-11-25 18:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/2696) `pes7:perf/skip-in-release` → `main` · +20 −10 · 2 files · 1 commits · open `VICTORY_SKIP_PIPELINES` answers the one question a removal report needs - "is this shader the one?" - and until now it only worked in a `--features diagnostics` build. 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: ``` VICTORY_SKIP_PIPELINES=0602c2384acbb3b2 -> "dropped 1 without a host pipeline" in the menu frame line ``` (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=1` with 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_PIPELINES` works in release builds - the builds where the device removals actually reproduce (measured: release removes the device 10 s in; the same build with `--features diagnostics` runs 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 `check` green, rebased onto today's `main` (`f3578e3`). **Risk:** none without the variable: the list is read once, and empty is the `false` it 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:12:16 +00:00
Author
Owner

@⁠DrDarkDK on GitHub · 2026-11-25 18:28 UTC · original

A release run can show dropped 0 without a host pipeline even when VICTORY_SKIP_PIPELINES matched an indirect dispatch. State::execute_indirect returns false on a match, and its caller increments the generic indirect counter, 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.

**@⁠DrDarkDK** on GitHub · 2026-11-25 18:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/2696#issuecomment-7170952949) A release run can show `dropped 0 without a host pipeline` even when `VICTORY_SKIP_PIPELINES` matched an indirect dispatch. `State::execute_indirect` returns `false` on a match, and its caller increments the generic `indirect` counter, 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.*
Author
Owner

@⁠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.

**@⁠kotekompotek** on GitHub · 2026-11-25 18:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/2696#issuecomment-7171463705) 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.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-25 19:15 UTC · original

Independent Windows 11 + NVIDIA GeForce RTX 5090 + WARP verification and review of e3b1dbc (on 13f91ca):

Verification (rustc 1.98.1 MSVC)

  • cargo clippy --locked -p victory-gpu --all-targets -- -D warnings and --features diagnostics: 0 warnings.
  • WARP (VICTORY_D3D12_WARP=1): cargo test --locked -p victory-gpu --features diagnostics -> 198 passed, 0 failed, 1 ignored.
  • RTX 5090 (default features, non-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

  • Unset VICTORY_SKIP_PIPELINES pays only an OnceLock acquire load + empty-slice check with no locks or allocations, and all diagnostic-only drop/trace tables remain cleanly gated under feature = "diagnostics".
  • Covers all 4 execution entry points (prepare_for for graphics/mesh, dispatch, and execute_indirect ahead of indirect::bound). Clean and ready to merge.
**@⁠fuzeofficlal** on GitHub · 2026-11-25 19:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/2696#issuecomment-7172051667) Independent Windows 11 + NVIDIA GeForce RTX 5090 + WARP verification and review of `e3b1dbc` (on `13f91ca`): ### Verification (`rustc 1.98.1` MSVC) - `cargo clippy --locked -p victory-gpu --all-targets -- -D warnings` and `--features diagnostics`: **0 warnings**. - **WARP (`VICTORY_D3D12_WARP=1`):** `cargo test --locked -p victory-gpu --features diagnostics` -> **198 passed, 0 failed, 1 ignored**. - **RTX 5090 (default features, non-`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 - Unset `VICTORY_SKIP_PIPELINES` pays only an `OnceLock` acquire load + empty-slice check with no locks or allocations, and all diagnostic-only drop/trace tables remain cleanly gated under `feature = "diagnostics"`. - Covers all 4 execution entry points (`prepare_for` for graphics/mesh, `dispatch`, and `execute_indirect` ahead of `indirect::bound`). Clean and ready to merge.
Author
Owner

@⁠cloph-dsp on GitHub · 2026-11-25 19:38 UTC · original

Independent local verification (claim VERIFY-2696-SKIP-RELEASE on #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_released and memory::tests::lists_share_a_table_and_copies_keep_their_views.
  • Both failures reproduce on base origin/main 13f91ca (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..HEAD clean.
  • Negative control: on origin/main, crates/victory-gpu/src/pipeline.rs:299 still has pub(crate) fn is_skipped behind #[cfg(all(windows, feature = "diagnostics"))]; this PR removes that gate so the skip works in release builds while keeping note_drop/dropped diagnostics-only.

No blocking findings from this verification; the two red tests are already red on main. AI-assisted (Hy4 flash).

**@⁠cloph-dsp** on GitHub · 2026-11-25 19:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/2696#issuecomment-7172575932) Independent local verification (claim `VERIFY-2696-SKIP-RELEASE` on #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_released` and `memory::tests::lists_share_a_table_and_copies_keep_their_views`. - Both failures reproduce on base `origin/main` 13f91ca (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..HEAD` clean. - Negative control: on `origin/main`, `crates/victory-gpu/src/pipeline.rs:299` still has `pub(crate) fn is_skipped` behind `#[cfg(all(windows, feature = "diagnostics"))]`; this PR removes that gate so the skip works in release builds while keeping `note_drop`/`dropped` diagnostics-only. No blocking findings from this verification; the two red tests are already red on main. AI-assisted (Hy4 flash).
Author
Owner

@⁠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_PIPELINES now works in release builds. skip_hashes / skipped_shader in crates/victory-gpu/src/pipeline.rs lose the diagnostics gate, and is_skipped asks skipped_shader(&pipeline(this).shaders, skip_hashes()) instead of the host's diagnostics-only stored field. The three checks in draw.rs (prepare_for, dispatch, execute_indirect) run in every build, with only dropped / note_drop / note_op gated. With the variable unset, the cost per draw is a OnceLock read and an empty-slice check. It merges cleanly and CI check is passing.

On your reply: the adaptation to #1653's skip_hashes / skipped_shader shapes reads correctly. Two small nits, neither blocking:

  • is_skipped now has no cfg while skip_hashes is #[cfg(windows)]; a #[cfg(windows)] on is_skipped would keep non-Windows builds of pipeline.rs compiling.
  • The new doc comment on skip_hashes carries 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

**@⁠Marvisak** on GitHub · 2026-11-25 22:15 UTC · [original](https://github.com/Marvisak/VIctory/pull/2696#issuecomment-7176132748) · edited 2026-11-26 00:25 UTC <!-- victory-triage v1 head=e34bd8c7c712f2f4f847cd2e16222353325e002b verdict=merge-candidate at=2026-11-26T00:25:03Z --> Automated triage for the maintainers. Recommended for a maintainer's look. `VICTORY_SKIP_PIPELINES` now works in release builds. `skip_hashes` / `skipped_shader` in `crates/victory-gpu/src/pipeline.rs` lose the `diagnostics` gate, and `is_skipped` asks `skipped_shader(&pipeline(this).shaders, skip_hashes())` instead of the host's diagnostics-only stored field. The three checks in `draw.rs` (`prepare_for`, `dispatch`, `execute_indirect`) run in every build, with only `dropped` / `note_drop` / `note_op` gated. With the variable unset, the cost per draw is a `OnceLock` read and an empty-slice check. It merges cleanly and CI `check` is passing. On your reply: the adaptation to #1653's `skip_hashes` / `skipped_shader` shapes reads correctly. Two small nits, neither blocking: - `is_skipped` now has no `cfg` while `skip_hashes` is `#[cfg(windows)]`; a `#[cfg(windows)]` on `is_skipped` would keep non-Windows builds of `pipeline.rs` compiling. - The new doc comment on `skip_hashes` carries 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](https://claude.ai/code)_
Author
Owner

@⁠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's skip_hashes/skipped_shader shapes):

  • parse_skip_hashes is #[cfg(any(windows, test))] and skip_hashes/skipped_shader are #[cfg(windows)] - no feature = "diagnostics";
  • is_skipped no longer reads the host pipeline's stored skipped_shader field (that one is only filled in diagnostics builds): it asks skipped_shader(&pipeline(this).shaders, skip_hashes()), so a release build answers too, and Pending::new's signature and make.rs need no change;
  • draw.rs keeps the three is_skipped checks in every build and gates only their reporting, as before.

Checked both configurations: cargo build --release -p victory and --features diagnostics build, cargo test --release -p victory-gpu passes (228), clippy clean.

**@⁠pes7** on GitHub · 2026-11-25 22:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/2696#issuecomment-7176329544) Rebased onto today's `main` (`f3578e3`) and adapted to the skip list that landed meanwhile (#1653's `skip_hashes`/`skipped_shader` shapes): - `parse_skip_hashes` is `#[cfg(any(windows, test))]` and `skip_hashes`/`skipped_shader` are `#[cfg(windows)]` - no `feature = "diagnostics"`; - `is_skipped` no longer reads the host pipeline's stored `skipped_shader` field (that one is only filled in diagnostics builds): it asks `skipped_shader(&pipeline(this).shaders, skip_hashes())`, so a release build answers too, and `Pending::new`'s signature and `make.rs` need no change; - `draw.rs` keeps the three `is_skipped` checks in every build and gates only their reporting, as before. Checked both configurations: `cargo build --release -p victory` and `--features diagnostics` build, `cargo test --release -p victory-gpu` passes (228), clippy clean.
Author
Owner

@⁠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).

**@⁠Dukestar69** on GitHub · 2026-11-26 04:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/2696#pullrequestreview-6068574390) · **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).
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 12:54 UTC · original · requested changes

Reviewed and verified e34bd8c7 merged locally onto origin/main (63bcca43) on Windows 11 x64 (NVIDIA GeForce RTX 5090 and WARP, Rust 1.98.1 MSVC, Windows SDK 10.0.26100.0 dxil.dll; synthetic tests only, no game files).

Windows release and diagnostics behavior looks clean and verified:

  • Unset VICTORY_SKIP_PIPELINES only pays a single OnceLock read and empty-slice check on the hot path, and all three execution entry points in crates/victory-gpu/src/draw.rs (prepare_for at :516-519, dispatch at :1074-1080, and execute_indirect ahead 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 & WARP diagnostics + DEBUG=1 (28/28), combined #2654 + #2696 (27/27), and a live non-diagnostics --release VICTORY_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)]. Because crates/victory-gpu/src/lib.rs:44 compiles pub mod pipeline; unconditionally on all targets, while skip_hashes (:301-308) and skipped_shader (:310-319) remain #[cfg(windows)], is_skipped fails to compile (E0425) on non-Windows targets. Please restore #[cfg(windows)] on is_skipped.

Non-blocking note

  • Pending::new in crates/victory-gpu/src/pipeline/make.rs still gates skipped_shader behind #[cfg(feature = "diagnostics")], so in release builds prebuilt/early-started pipelines matching VICTORY_SKIP_PIPELINES can still compile on background workers even though all draws/dispatches/indirect executions are omitted.
**@⁠fuzeofficlal** on GitHub · 2026-11-26 12:54 UTC · [original](https://github.com/Marvisak/VIctory/pull/2696#pullrequestreview-6074471145) · **requested changes** Reviewed and verified `e34bd8c7` merged locally onto `origin/main` (`63bcca43`) on Windows 11 x64 (NVIDIA GeForce RTX 5090 and WARP, Rust `1.98.1` MSVC, Windows SDK `10.0.26100.0` `dxil.dll`; synthetic tests only, no game files). Windows release and diagnostics behavior looks clean and verified: - Unset `VICTORY_SKIP_PIPELINES` only pays a single `OnceLock` read and empty-slice check on the hot path, and all three execution entry points in `crates/victory-gpu/src/draw.rs` (`prepare_for` at `:516-519`, `dispatch` at `:1074-1080`, and `execute_indirect` ahead 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 & WARP `diagnostics + DEBUG=1` (**28/28**), combined `#2654 + #2696` (**27/27**), and a live non-`diagnostics` `--release` `VICTORY_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)]`. Because `crates/victory-gpu/src/lib.rs:44` compiles `pub mod pipeline;` unconditionally on all targets, while `skip_hashes` (`:301-308`) and `skipped_shader` (`:310-319`) remain `#[cfg(windows)]`, `is_skipped` fails to compile (`E0425`) on non-Windows targets. Please restore `#[cfg(windows)]` on `is_skipped`. ### Non-blocking note - `Pending::new` in `crates/victory-gpu/src/pipeline/make.rs` still gates `skipped_shader` behind `#[cfg(feature = "diagnostics")]`, so in release builds prebuilt/early-started pipelines matching `VICTORY_SKIP_PIPELINES` can still compile on background workers even though all draws/dispatches/indirect executions are omitted.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2696/head:github-bot/gh-2696'
git switch 'github-bot/gh-2696'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2696'
git switch 'github-bot/gh-2696'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2696'
git switch 'github-bot/gh-2696'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2696'
git switch 'main'
git merge --squash 'github-bot/gh-2696'
git switch 'main'
git merge --ff-only 'github-bot/gh-2696'
git switch 'main'
git merge 'github-bot/gh-2696'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2696
No description provided.