gpu: honor VICTORY_SKIP_PIPELINES in release builds and before worker enqueue #110

Manually merged
github merged 2 commits from github-bot/gh-110 into main 2026-11-27 02:43:07 +00:00 AGit
Owner

@⁠nullexxx on GitHub · 2026-11-27 01:33 UTC · original
nullexxx:fix/skip-pipelines-before-enqueue → main · +79 −11 · 3 files · 2 commits · merged 2026-11-27 02:28 UTC

Problem

  1. VICTORY_SKIP_PIPELINES was gated behind #[cfg(all(windows, feature = "diagnostics"))], so it silently had no effect in --release builds.
  2. Even with diagnostics enabled, skipped hashes were only checked at draw/dispatch time in draw.rs, not before queuing pipelines to background workers in pipeline/make.rs. Shaders that hang pipeline compilation (e.g. under Proton/vkd3d-proton on Linux) still entered the worker pool at startup and permanently deadlocked all worker threads, leaving the queue stuck and dropping world draws.

Fix

  • Expose pipeline::skipped_in(&[Arc<Shader>]) and parse_skip_hashes under #[cfg(windows)] (reused by skipped_shader in diagnostics builds).
  • Check super::skipped_in(shaders) in pipeline::make::left_out() so skipped pipelines are marked left-out before ever reaching the worker queue, in both release and diagnostics builds.

Measured Impact

Tested on Linux (CachyOS, GE-Proton11-14, RTX 5080, Ryzen 7 9800X3D, --release, Series S path, 1920x1080) with VICTORY_SKIP_PIPELINES set to the 6 compute shaders that hang vkd3d-proton compilation (32ed072b9f845048, fdd56d97a806bcca, 17829ac71aab4e8d, a1b20bc47e3c9597, afeea48bbb9913ad, e8c962358d862e3f):

Metric Before (workers deadlocked) After (skipped in left_out)
Pipelines in queue (being made) 1,570–1,610 (never drains) Drains to 0 (2.0 median)
Draws / frame 31–86 (UI only, black 3D world) 4,589 median (4,030–5,940 warm)
Frame rate ~3.8 fps (261 ms/frame) 20.6–25.8 fps warm (38.7–48.5 ms/frame)
Device removed / refused pipelines 0 / 0 0 / 0

Verification

  • cargo clippy --workspace --all-targets --locked -- -D warnings (clean)
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings (clean)
  • cargo test -p xtask --locked (10/10 passed)
**@⁠nullexxx** on GitHub · 2026-11-27 01:33 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/110) `nullexxx:fix/skip-pipelines-before-enqueue` → `main` · +79 −11 · 3 files · 2 commits · merged 2026-11-27 02:28 UTC ### Problem 1. `VICTORY_SKIP_PIPELINES` was gated behind `#[cfg(all(windows, feature = "diagnostics"))]`, so it silently had no effect in `--release` builds. 2. Even with `diagnostics` enabled, skipped hashes were only checked at draw/dispatch time in `draw.rs`, not before queuing pipelines to background workers in `pipeline/make.rs`. Shaders that hang pipeline compilation (e.g. under Proton/`vkd3d-proton` on Linux) still entered the worker pool at startup and permanently deadlocked all worker threads, leaving the queue stuck and dropping world draws. ### Fix - Expose `pipeline::skipped_in(&[Arc<Shader>])` and `parse_skip_hashes` under `#[cfg(windows)]` (reused by `skipped_shader` in diagnostics builds). - Check `super::skipped_in(shaders)` in `pipeline::make::left_out()` so skipped pipelines are marked left-out before ever reaching the worker queue, in both release and diagnostics builds. ### Measured Impact Tested on Linux (CachyOS, GE-Proton11-14, RTX 5080, Ryzen 7 9800X3D, `--release`, Series S path, 1920x1080) with `VICTORY_SKIP_PIPELINES` set to the 6 compute shaders that hang `vkd3d-proton` compilation (`32ed072b9f845048`, `fdd56d97a806bcca`, `17829ac71aab4e8d`, `a1b20bc47e3c9597`, `afeea48bbb9913ad`, `e8c962358d862e3f`): | Metric | Before (workers deadlocked) | After (skipped in `left_out`) | | --- | --- | --- | | Pipelines in queue (`being made`) | 1,570–1,610 (never drains) | Drains to 0 (2.0 median) | | Draws / frame | 31–86 (UI only, black 3D world) | 4,589 median (4,030–5,940 warm) | | Frame rate | ~3.8 fps (261 ms/frame) | 20.6–25.8 fps warm (38.7–48.5 ms/frame) | | Device removed / refused pipelines | 0 / 0 | 0 / 0 | ### Verification - `cargo clippy --workspace --all-targets --locked -- -D warnings` (clean) - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings` (clean) - `cargo test -p xtask --locked` (10/10 passed)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 02:11:07 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 01:39 UTC · original · reviewed

Thanks for the CachyOS and RTX 5080 comparison. I checked 92a744d7 and the Windows CI is green. Pending::new records the omission before early, ready, or now can build the pipeline. The existing skipped shader <hash> diagnostic still takes precedence, and the fallback reason remains distinct from being made as in #82.

Could you add a regression test showing that an explicit hash match leaves the pipeline unqueued and reports the omission? An unmatched shader should still take the normal path. Please also document that this is an opt-in workaround for known compiler hangs and can omit visible effects. The separate victory warm path builds through known::make and is outside this change.

For the RTX 5080 report, redacted before-and-after queue and first-world frame lines from the same starting cache and settings would let us check the reported recovery. The queue draining from around 1,600 to zero is the result to verify first.

**@⁠TaynanGT** on GitHub · 2026-11-27 01:39 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/110#pullrequestreview-6082344481) · **reviewed** Thanks for the CachyOS and RTX 5080 comparison. I checked `92a744d7` and the Windows CI is green. `Pending::new` records the omission before `early`, `ready`, or `now` can build the pipeline. The existing `skipped shader <hash>` diagnostic still takes precedence, and the fallback reason remains distinct from `being made` as in #82. Could you add a regression test showing that an explicit hash match leaves the pipeline unqueued and reports the omission? An unmatched shader should still take the normal path. Please also document that this is an opt-in workaround for known compiler hangs and can omit visible effects. The separate `victory warm` path builds through `known::make` and is outside this change. For the RTX 5080 report, redacted before-and-after queue and first-world frame lines from the same starting cache and settings would let us check the reported recovery. The queue draining from around 1,600 to zero is the result to verify first.
Author
Owner

@⁠nullexxx on GitHub · 2026-11-27 01:40 UTC · original

This was a HUGE !!! Optimization and breakthrough for me on linux...

GIve me a minute and i'll gather a more proper response.. because holy shit my framerate went for 3 fps to 24+

**@⁠nullexxx** on GitHub · 2026-11-27 01:40 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/110#issuecomment-7207491422) This was a HUGE !!! Optimization and breakthrough for me on linux... GIve me a minute and i'll gather a more proper response.. because holy shit my framerate went for 3 fps to 24+
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 01:41 UTC · original

Thanks, @⁠nullexxx. Take your time. The jump to 24+ FPS is encouraging, especially with the world drawing again. A short excerpt from startup through the first world frame in each run is enough. The pipeline queue and draw counts will help show when the workers started making progress again.

**@⁠TaynanGT** on GitHub · 2026-11-27 01:41 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/110#issuecomment-7207498531) Thanks, @⁠nullexxx. Take your time. The jump to 24+ FPS is encouraging, especially with the world drawing again. A short excerpt from startup through the first world frame in each run is enough. The pipeline queue and draw counts will help show when the workers started making progress again.
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 01:52 UTC · original

Thanks for adding the regression and documenting the limits in cf4f840. I checked the CI log. The test confirms that the listed hash stays out of the queue, the unmatched shader follows the normal path, and diagnostics report the omission. The docs also cover the effect on rendering and the separate victory warm path. The before-and-after Linux logs are still the remaining evidence for the reported queue recovery. CI run

**@⁠TaynanGT** on GitHub · 2026-11-27 01:52 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/110#issuecomment-7207642263) Thanks for adding the regression and documenting the limits in `cf4f840`. I checked the CI log. The test confirms that the listed hash stays out of the queue, the unmatched shader follows the normal path, and diagnostics report the omission. The docs also cover the effect on rendering and the separate `victory warm` path. The before-and-after Linux logs are still the remaining evidence for the reported queue recovery. [CI run](https://github.com/TaynanGT/Vice-Tay/actions/runs/45924445846)
Author
Owner

@⁠nullexxx on GitHub · 2026-11-27 01:56 UTC · original

Updated in cf4f840 (all 4 CI checks green):

  • Added skipped_hash_leaves_pipeline_unqueued_and_unmatched_queues_normally in crates/victory-gpu/src/pipeline/make.rs (via new_with_skip_hashes / skipped_in_list so it does not mutate the process-wide OnceLock under --test-threads=1). It verifies a matched hash stays NOT_QUEUED after early / ready and reports skipped by VICTORY_SKIP_PIPELINES under diagnostics, while an unmatched hash queues and completes normally.
  • Updated docs/README-fxceless.md to document VICTORY_SKIP_PIPELINES as an opt-in workaround for known compiler hangs that can omit visible effects and does not apply to victory warm (known::make).

Matched RTX 5080 A/B Log Lines (CachyOS, GE-Proton11-14, --release, Series S, 1920x1080)

Both runs used identical launch options, binary (cf4f840), and starting cache snapshot, differing only in VICTORY_SKIP_PIPELINES. A 7th compute shader (559d9f0184e15fe3) also hung vkd3d-proton when omitted from the skip list, leaving 1 being made stuck and burning the per-frame wait budget; including it in VICTORY_SKIP_PIPELINES (32ed072b9f845048,fdd56d97a806bcca,17829ac71aab4e8d,a1b20bc47e3c9597,afeea48bbb9913ad,e8c962358d862e3f,7f05ddab771799a9,a53a7977fe762268,be14e72d86362031,559d9f0184e15fe3) drained the queue to 0.

Before (VICTORY_SKIP_PIPELINES unset — workers deadlocked, queue stuck at ~1,800):

INFO victory_gpu::pipeline::library: title pipelines to start early pipelines=2143
INFO victory_gpu::host: 30.0 fps, 33.3 ms/frame (...), 4 draws/frame, dropped 0 without a host pipeline (1039 being made) and 0 indirect
INFO victory_gpu::host: 30.0 fps, 33.4 ms/frame (...), 9 draws/frame, dropped 0 without a host pipeline (1801 being made) and 0 indirect
INFO victory_gpu::host: 3.8 fps, 261.6 ms/frame (23.8 preparing: copies 14.8 ms 52.2 MB, textures 2.5 ms 156.9 MB; 0.7 on the GPU; 3.1 copying back 7.9 MB), 30 draws/frame, dropped 1363 without a host pipeline (1805 being made) and 2894 indirect
INFO victory_gpu::host: 3.2 fps, 314.1 ms/frame (28.7 preparing: copies 19.7 ms 81.0 MB, textures 17.3 ms 162.0 MB; 0.0 on the GPU; 4.0 copying back 8.2 MB), 35 draws/frame, dropped 1502 without a host pipeline (1805 being made) and 2054 indirect
INFO victory_gpu::host: 3.6 fps, 279.7 ms/frame (39.6 preparing: copies 33.4 ms 182.3 MB, textures 0.8 ms 54.2 MB; 0.0 on the GPU; 3.9 copying back 12.1 MB), 38 draws/frame, dropped 2639 without a host pipeline (1783 being made) and 5082 indirect
INFO victory_gpu::host: 3.7 fps, 267.9 ms/frame (25.3 preparing: copies 21.3 ms 56.3 MB, textures 2.6 ms 25.0 MB; 0.0 on the GPU; 3.8 copying back 10.9 MB), 42 draws/frame, dropped 2712 without a host pipeline (1783 being made) and 4910 indirect

After (VICTORY_SKIP_PIPELINES set — queue drains to 0, world renders):

INFO victory_gpu::pipeline::library: title pipelines to start early pipelines=2061
INFO victory_gpu::host: 30.0 fps, 33.3 ms/frame (...), 4 draws/frame, dropped 0 without a host pipeline (0 being made) and 0 indirect
INFO victory_gpu::host: 24.4 fps, 41.0 ms/frame (37.0 preparing: copies 20.7 ms 105.3 MB, textures 2.2 ms 168.8 MB; 0.8 on the GPU; 9.5 copying back 34.5 MB), 1634 draws/frame, dropped 315 without a host pipeline (0 being made) and 606 indirect
INFO victory_gpu::host: 20.8 fps, 48.1 ms/frame (42.3 preparing: copies 23.2 ms 128.2 MB, textures 2.4 ms 29.0 MB; 0.4 on the GPU; 10.7 copying back 38.2 MB), 1690 draws/frame, dropped 496 without a host pipeline (0 being made) and 562 indirect
INFO victory_gpu::host: 19.9 fps, 50.3 ms/frame (40.7 preparing: copies 26.7 ms 115.9 MB, textures 2.4 ms 43.9 MB; 1.5 on the GPU; 14.1 copying back 55.4 MB), 5015 draws/frame, dropped 277 without a host pipeline (0 being made) and 606 indirect
INFO victory_gpu::host: 24.5 fps, 40.9 ms/frame (35.5 preparing: copies 23.4 ms 107.7 MB, textures 0.3 ms 20.8 MB; 0.3 on the GPU; 13.4 copying back 50.5 MB), 4796 draws/frame, dropped 274 without a host pipeline (0 being made) and 606 indirect
INFO victory_gpu::host: 18.3 fps, 54.7 ms/frame (44.3 preparing: copies 32.4 ms 125.0 MB, textures 1.0 ms 27.9 MB; 1.3 on the GPU; 11.8 copying back 43.3 MB), 5671 draws/frame, dropped 303 without a host pipeline (0 being made) and 598 indirect
INFO victory_gpu::host: 21.6 fps, 46.2 ms/frame (40.7 preparing: copies 28.1 ms 112.3 MB, textures 0.7 ms 29.5 MB; 0.0 on the GPU; 13.0 copying back 48.4 MB), 6166 draws/frame, dropped 302 without a host pipeline (0 being made) and 598 indirect
**@⁠nullexxx** on GitHub · 2026-11-27 01:56 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/110#issuecomment-7207705856) Updated in cf4f840 (all 4 CI checks green): - Added `skipped_hash_leaves_pipeline_unqueued_and_unmatched_queues_normally` in `crates/victory-gpu/src/pipeline/make.rs` (via `new_with_skip_hashes` / `skipped_in_list` so it does not mutate the process-wide `OnceLock` under `--test-threads=1`). It verifies a matched hash stays `NOT_QUEUED` after `early` / `ready` and reports `skipped by VICTORY_SKIP_PIPELINES` under `diagnostics`, while an unmatched hash queues and completes normally. - Updated `docs/README-fxceless.md` to document `VICTORY_SKIP_PIPELINES` as an opt-in workaround for known compiler hangs that can omit visible effects and does not apply to `victory warm` (`known::make`). ### Matched RTX 5080 A/B Log Lines (CachyOS, GE-Proton11-14, `--release`, Series S, 1920x1080) Both runs used identical launch options, binary (`cf4f840`), and starting cache snapshot, differing only in `VICTORY_SKIP_PIPELINES`. A 7th compute shader (`559d9f0184e15fe3`) also hung `vkd3d-proton` when omitted from the skip list, leaving `1 being made` stuck and burning the per-frame wait budget; including it in `VICTORY_SKIP_PIPELINES` (`32ed072b9f845048,fdd56d97a806bcca,17829ac71aab4e8d,a1b20bc47e3c9597,afeea48bbb9913ad,e8c962358d862e3f,7f05ddab771799a9,a53a7977fe762268,be14e72d86362031,559d9f0184e15fe3`) drained the queue to `0`. **Before (`VICTORY_SKIP_PIPELINES` unset — workers deadlocked, queue stuck at ~1,800):** ~~~text INFO victory_gpu::pipeline::library: title pipelines to start early pipelines=2143 INFO victory_gpu::host: 30.0 fps, 33.3 ms/frame (...), 4 draws/frame, dropped 0 without a host pipeline (1039 being made) and 0 indirect INFO victory_gpu::host: 30.0 fps, 33.4 ms/frame (...), 9 draws/frame, dropped 0 without a host pipeline (1801 being made) and 0 indirect INFO victory_gpu::host: 3.8 fps, 261.6 ms/frame (23.8 preparing: copies 14.8 ms 52.2 MB, textures 2.5 ms 156.9 MB; 0.7 on the GPU; 3.1 copying back 7.9 MB), 30 draws/frame, dropped 1363 without a host pipeline (1805 being made) and 2894 indirect INFO victory_gpu::host: 3.2 fps, 314.1 ms/frame (28.7 preparing: copies 19.7 ms 81.0 MB, textures 17.3 ms 162.0 MB; 0.0 on the GPU; 4.0 copying back 8.2 MB), 35 draws/frame, dropped 1502 without a host pipeline (1805 being made) and 2054 indirect INFO victory_gpu::host: 3.6 fps, 279.7 ms/frame (39.6 preparing: copies 33.4 ms 182.3 MB, textures 0.8 ms 54.2 MB; 0.0 on the GPU; 3.9 copying back 12.1 MB), 38 draws/frame, dropped 2639 without a host pipeline (1783 being made) and 5082 indirect INFO victory_gpu::host: 3.7 fps, 267.9 ms/frame (25.3 preparing: copies 21.3 ms 56.3 MB, textures 2.6 ms 25.0 MB; 0.0 on the GPU; 3.8 copying back 10.9 MB), 42 draws/frame, dropped 2712 without a host pipeline (1783 being made) and 4910 indirect ~~~ **After (`VICTORY_SKIP_PIPELINES` set — queue drains to `0`, world renders):** ~~~text INFO victory_gpu::pipeline::library: title pipelines to start early pipelines=2061 INFO victory_gpu::host: 30.0 fps, 33.3 ms/frame (...), 4 draws/frame, dropped 0 without a host pipeline (0 being made) and 0 indirect INFO victory_gpu::host: 24.4 fps, 41.0 ms/frame (37.0 preparing: copies 20.7 ms 105.3 MB, textures 2.2 ms 168.8 MB; 0.8 on the GPU; 9.5 copying back 34.5 MB), 1634 draws/frame, dropped 315 without a host pipeline (0 being made) and 606 indirect INFO victory_gpu::host: 20.8 fps, 48.1 ms/frame (42.3 preparing: copies 23.2 ms 128.2 MB, textures 2.4 ms 29.0 MB; 0.4 on the GPU; 10.7 copying back 38.2 MB), 1690 draws/frame, dropped 496 without a host pipeline (0 being made) and 562 indirect INFO victory_gpu::host: 19.9 fps, 50.3 ms/frame (40.7 preparing: copies 26.7 ms 115.9 MB, textures 2.4 ms 43.9 MB; 1.5 on the GPU; 14.1 copying back 55.4 MB), 5015 draws/frame, dropped 277 without a host pipeline (0 being made) and 606 indirect INFO victory_gpu::host: 24.5 fps, 40.9 ms/frame (35.5 preparing: copies 23.4 ms 107.7 MB, textures 0.3 ms 20.8 MB; 0.3 on the GPU; 13.4 copying back 50.5 MB), 4796 draws/frame, dropped 274 without a host pipeline (0 being made) and 606 indirect INFO victory_gpu::host: 18.3 fps, 54.7 ms/frame (44.3 preparing: copies 32.4 ms 125.0 MB, textures 1.0 ms 27.9 MB; 1.3 on the GPU; 11.8 copying back 43.3 MB), 5671 draws/frame, dropped 303 without a host pipeline (0 being made) and 598 indirect INFO victory_gpu::host: 21.6 fps, 46.2 ms/frame (40.7 preparing: copies 28.1 ms 112.3 MB, textures 0.7 ms 29.5 MB; 0.0 on the GPU; 13.0 copying back 48.4 MB), 6166 draws/frame, dropped 302 without a host pipeline (0 being made) and 598 indirect ~~~
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 02:02 UTC · original

@⁠nullexxx Thanks for the matched runs. With the same cf4f840 build and starting cache, the excerpts show the queue going from about 1,800 stuck entries to zero and world draws resuming on the RTX 5080. The final example uses the full ten-hash list, including 559d9f0184e15fe3. That covers the Linux evidence requested in review. It also gives us a concrete baseline for the opt-in workaround, including the draws that still get omitted.

**@⁠TaynanGT** on GitHub · 2026-11-27 02:02 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/110#issuecomment-7207779520) @⁠nullexxx Thanks for the matched runs. With the same `cf4f840` build and starting cache, the excerpts show the queue going from about 1,800 stuck entries to zero and world draws resuming on the RTX 5080. The final example uses the full ten-hash list, including `559d9f0184e15fe3`. That covers the Linux evidence requested in review. It also gives us a concrete baseline for the opt-in workaround, including the draws that still get omitted.
github manually merged commit ee507875a2 into main 2026-11-27 02:43:07 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.