GPU: give pipeline workers room for NVIDIA's shader compiler #1129

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

@⁠divyeshganta on GitHub · 2026-11-24 16:02 UTC · original
divyeshganta:fix/nvidia-pipeline-worker-stack → main · +8 −0 · 1 files · 1 commits · open

Fixes #966.

Pipeline workers now use a 64 MiB stack so NVIDIA's recursively compiling shader compiler cannot overflow Rust's default 2 MiB worker stack and have the pipeline rejected as E_OUTOFMEMORY. The stack reserves address space and commits pages as they are used.

Patch by Peppacodes (d09c31b4c14481155e7d0b33b0aea30d9333f152), carried with its original authorship. The report reproduces the failure on an RTX 5080 and confirms the same world shader creates a pipeline with the larger stack. A separate RTX 4090/Wine check verified the worker reservation change with a small shader, not the reported title shader.

The contributor reports Windows 11 workspace tests passing (342 passed, 0 failed, 6 ignored), all-target/all-feature Clippy clean, and cargo xtask policy passing. I have not rerun tests locally.

**@⁠divyeshganta** on GitHub · 2026-11-24 16:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/1129) `divyeshganta:fix/nvidia-pipeline-worker-stack` → `main` · +8 −0 · 1 files · 1 commits · open Fixes #966. Pipeline workers now use a 64 MiB stack so NVIDIA's recursively compiling shader compiler cannot overflow Rust's default 2 MiB worker stack and have the pipeline rejected as `E_OUTOFMEMORY`. The stack reserves address space and commits pages as they are used. Patch by Peppacodes (`d09c31b4c14481155e7d0b33b0aea30d9333f152`), carried with its original authorship. The report reproduces the failure on an RTX 5080 and confirms the same world shader creates a pipeline with the larger stack. A separate RTX 4090/Wine check verified the worker reservation change with a small shader, not the reported title shader. The contributor reports Windows 11 workspace tests passing (342 passed, 0 failed, 6 ignored), all-target/all-feature Clippy clean, and `cargo xtask policy` passing. I have not rerun tests locally.
The host driver compiles pipelines on our worker threads. On an RTX 5080
(driver 32.0.16.1692) NVIDIA's compiler (nvgpucomp64.dll) recursed past
the default 2 MB stack while creating a world compute pipeline
(c7d7a6283fad3cd6): "thread 'victory-pipelines-4' has overflowed its
stack", 0xc00000fd, then the pipeline was refused with E_OUTOFMEMORY and
its dispatches dropped. A 64 MB stack is reserved address space, committed
only as the compiler uses it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:20:43 +00:00
Author
Owner

@⁠Ctrl-Alt-Haze on GitHub · 2026-11-24 16:51 UTC · original

Independent verification of d09c31b on Windows 11, RTX 5070 Ti (driver 32.0.16.2135) + WARP (VICTORY_D3D12_DEBUG=1), dxil.dll 1.8.2502.11, Rust 1.98.1 against upstream/main (ffe310eb):

  • Cleanly on ffe310eb; cargo xtask policy: 154 files ok; both clippy checks pass.
  • cargo test --workspace --locked: 342 passed, 0 failed, 6 ignored.
  • victory-shader --features host (VICTORY_D3D12_DEBUG=1, RTX 5070 Ti & VICTORY_WARP=1): 120 passed, 0 failed, 1 ignored (0 D3D12 debug errors/warnings).
  • victory-gpu --features diagnostics (VICTORY_D3D12_DEBUG=1, RTX 5070 Ti & VICTORY_D3D12_WARP=1): 53 passed, 0 failed, 1 ignored (pipeline::make::tests::first_use_is_made_by_a_worker creates a 64 MiB worker stack cleanly on RTX 5070 Ti & WARP; 0 D3D12 errors/warnings).
  • Minimal 8-line diff (PIPELINE_STACK = 64 << 20), zero unsafe added. Ready to merge.

AI-assisted verification on local RTX 5070 Ti + WARP; no game data.

**@⁠Ctrl-Alt-Haze** on GitHub · 2026-11-24 16:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/1129#issuecomment-7138311729) Independent verification of `d09c31b` on **Windows 11**, **RTX 5070 Ti** (driver `32.0.16.2135`) + **WARP** (`VICTORY_D3D12_DEBUG=1`), **dxil.dll `1.8.2502.11`**, **Rust `1.98.1`** against `upstream/main` (`ffe310eb`): - Cleanly on `ffe310eb`; `cargo xtask policy`: `154 files ok`; both `clippy` checks pass. - `cargo test --workspace --locked`: **342 passed, 0 failed, 6 ignored**. - `victory-shader --features host` (`VICTORY_D3D12_DEBUG=1`, RTX 5070 Ti & `VICTORY_WARP=1`): **120 passed, 0 failed, 1 ignored** (0 D3D12 debug errors/warnings). - `victory-gpu --features diagnostics` (`VICTORY_D3D12_DEBUG=1`, RTX 5070 Ti & `VICTORY_D3D12_WARP=1`): **53 passed, 0 failed, 1 ignored** (`pipeline::make::tests::first_use_is_made_by_a_worker` creates a 64 MiB worker stack cleanly on RTX 5070 Ti & WARP; 0 D3D12 errors/warnings). - Minimal 8-line diff (`PIPELINE_STACK = 64 << 20`), zero `unsafe` added. Ready to merge. AI-assisted verification on local RTX 5070 Ti + WARP; no game data.
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 18:01 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at d09c31b: cargo test -p victory-gpu passes, 50 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 18:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/1129#issuecomment-7140048161) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at d09c31b: `cargo test -p victory-gpu` passes, 50 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:36 UTC · original

Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: crates/victory-gpu/src/pipeline/make.rs.

The content has not been reviewed yet; it will be once the branch is rebased onto main.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 00:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/1129#issuecomment-7148686799) <!-- victory-triage v1 head=d09c31b4c14481155e7d0b33b0aea30d9333f152 verdict=needs-rebase at=2026-11-25T00:13:20Z --> Automated triage for the maintainers. **Needs rebase.** This PR does not merge cleanly into current `main` (ac2525d). Conflicting files: `crates/victory-gpu/src/pipeline/make.rs`. The content has not been reviewed yet; it will be once the branch is rebased onto `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/pipeline/make.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1129'
git switch 'github-bot/gh-1129'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1129'
git switch 'github-bot/gh-1129'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1129'
git switch 'main'
git merge --squash 'github-bot/gh-1129'
git switch 'main'
git merge --ff-only 'github-bot/gh-1129'
git switch 'main'
git merge 'github-bot/gh-1129'
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!1129
No description provided.