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

Open
divyeshganta wants to merge 1 commit from upstream-pr/1129 into main
divyeshganta commented 2026-11-24 16:02:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by divyeshganta on 2026-11-24T16:02:12Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6586006838 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1129). Originally posted by [divyeshganta](https://github.com/divyeshganta) on 2026-11-24T16:02:12Z. --- 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.
Ctrl-Alt-Haze commented 2026-11-24 17:04:43 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Ctrl-Alt-Haze on 2026-11-24T16:51:22Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7138311729 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1129#issuecomment-7138311729). Originally posted by [Ctrl-Alt-Haze](https://github.com/Ctrl-Alt-Haze) on 2026-11-24T16:51:22Z. --- 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.
Zipettte commented 2026-11-24 18:06:15 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:01:33Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140048161 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1129#issuecomment-7140048161). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T18:01:33Z. --- 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)._
Marvisak commented 2026-11-25 01:08:07 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:36:22Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148686799 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1129#issuecomment-7148686799). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:36:22Z. --- <!-- 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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1129:upstream-pr/1129'
git switch 'upstream-pr/1129'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/1129'
git switch 'upstream-pr/1129'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1129'
git switch 'upstream-pr/1129'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1129'
git switch 'main'
git merge --squash 'upstream-pr/1129'
git switch 'main'
git merge --ff-only 'upstream-pr/1129'
git switch 'main'
git merge 'upstream-pr/1129'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1129
No description provided.