Linux/Proton: pipeline library, worker stacks, watchdog, Wine HLSL fixes (black screens, dark interiors, compare pass) #421

Open
github-bot wants to merge 4 commits from github-bot/gh-421 into a-publier AGit
Owner

@⁠Tymon3310 on GitHub · 2026-11-27 00:40 UTC · original
Tymon3310:linux-proton-fixes → a-publier · +620 −55 · 18 files · 4 commits · open

What

Everything this tree needed to render and run properly under Proton on Linux, as four commits on a-publier (4eb6cfd):

  1. Proton: null-blob empty pipeline library, 64 MB pipeline worker stacks, opt-in watchdog disarm.
    • vkd3d-proton refuses CreatePipelineLibrary with a non-null blob of length 0, so under Wine no pipeline was ever kept. Same fix as #124.
    • Deep shader compiles overflow the default worker stack under Wine. Same as part of #245.
    • VICTORY_NO_WATCHDOG=1 (off by default) applies two byte-checked patches so the title's watchdog doesn't end the process while frames are slow (#143, #344).
  2. Gustaw Matuszewski's Wine/vkd3d changes to the built-in shaders, from avatarmanz/VIctory-7900XTX#338, cherry-picked under his authorship. He offered them to this repo on #19. Without them, Wine's d3dcompiler_47 refuses the clamp, ambient and window-check shaders (#183), and the host rejects Wine's embedded root signatures (E_FAIL).
  3. rootstring accepts FILTER_MIN_MAG_MIP_LINEAR. Without it, the parser from (2) refuses the two-plane composer's root signature, Composer::new fails every frame, and the intro, menus and loading screens are black under Proton (two-plane composer not made; showing base plane only).
  4. No GetDimensions on writable textures, no Load4 on a writable byte buffer. Wine's HLSL compiler (vkd3d-shader 2.0 in proton-cachyos 11.0, and 2.1 too) refuses both with E5005:
    • The ambient stand-in for the indirect light was never made (no stand-in for the indirect light error=Call failed), so interiors were lit only by direct light. Its passes now take width, height and slices from their root constants (16 now).
    • The card-copy compare pass was never made (no host copies in the card's memory: the compare could not be made). It now reads its hashes through a RWStructuredBuffer<uint4> view of the same bytes.

Measured

RX 6800 XT 16 GB (RDNA2), Ryzen 9 5950X, 94 GB RAM, Arch (kernel 7.3.6-zen), RADV / Mesa 26.3.1, proton-cachyos 11.0 with the views-in-a-tree wineserver (#248's guide), vkd3d-proton 71cae09, vm.unprivileged_userfaultfd=1, Proton's own d3dcompiler_47. Series S profile, early world. Release build of this branch's code, with play.ps1's settings and VICTORY_PORT_DESCRIPTORS/CBV/GUARD/JOURNAL=1. VICTORY_PORT_CONSTANTS was off: in-place sections don't work under Wine (#19, and my comment on #248).

median ms a frame
before (4): ambient and compare passes missing ~180
with (4) ~82 (11-13.5 fps)

Most of the gain is the compare pass: without it, finding what changed in the card copies fell back to the CPU.

Checked

  • cargo build --release --target x86_64-pc-windows-gnu --bin victory and cargo xtask policy (273 files ok).
  • Every pass of ambient.rs (keep, mean, place, gather, raise, clear_air) and CARD_COMPARE compiles with vkd3d-compiler -x hlsl -p cs_5_1 (vkd3d-shader 2.1). Before (4), keep/mean/clear_air and the compare failed there.
  • In the game: no E5xxx from vkd3d-shader (VKD3D_SHADER_DEBUG=warn), the stand-in reports role=Radiance size=[640, 360], and interiors are lit.

Not tested

  • Windows. The changed shaders are plain HLSL that Microsoft's compiler should take, and a root UAV over a structured buffer is valid, but I have no Windows run of this branch.
  • NVIDIA, Intel, RDNA3/4, ray tracing, anything past the early world.

AI-assisted (Claude Code): the fixes, runs and this text; I ran them on my machine. No game files, captures or screenshots.

🤖 Generated with Claude Code

**@⁠Tymon3310** on GitHub · 2026-11-27 00:40 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/421) `Tymon3310:linux-proton-fixes` → `a-publier` · +620 −55 · 18 files · 4 commits · open ## What Everything this tree needed to render and run properly under Proton on Linux, as four commits on `a-publier` (4eb6cfd): 1. **Proton: null-blob empty pipeline library, 64 MB pipeline worker stacks, opt-in watchdog disarm.** - vkd3d-proton refuses `CreatePipelineLibrary` with a non-null blob of length 0, so under Wine no pipeline was ever kept. Same fix as #124. - Deep shader compiles overflow the default worker stack under Wine. Same as part of #245. - `VICTORY_NO_WATCHDOG=1` (off by default) applies two byte-checked patches so the title's watchdog doesn't end the process while frames are slow (#143, #344). 2. **Gustaw Matuszewski's Wine/vkd3d changes to the built-in shaders**, from avatarmanz/VIctory-7900XTX#338, cherry-picked under his authorship. He offered them to this repo on #19. Without them, Wine's `d3dcompiler_47` refuses the clamp, ambient and window-check shaders (#183), and the host rejects Wine's embedded root signatures (`E_FAIL`). 3. **`rootstring` accepts `FILTER_MIN_MAG_MIP_LINEAR`.** Without it, the parser from (2) refuses the two-plane composer's root signature, `Composer::new` fails every frame, and the intro, menus and loading screens are black under Proton (`two-plane composer not made; showing base plane only`). 4. **No `GetDimensions` on writable textures, no `Load4` on a writable byte buffer.** Wine's HLSL compiler (vkd3d-shader 2.0 in proton-cachyos 11.0, and 2.1 too) refuses both with E5005: - The ambient stand-in for the indirect light was never made (`no stand-in for the indirect light error=Call failed`), so interiors were lit only by direct light. Its passes now take width, height and slices from their root constants (16 now). - The card-copy compare pass was never made (`no host copies in the card's memory: the compare could not be made`). It now reads its hashes through a `RWStructuredBuffer<uint4>` view of the same bytes. ## Measured RX 6800 XT 16 GB (RDNA2), Ryzen 9 5950X, 94 GB RAM, Arch (kernel 7.3.6-zen), RADV / Mesa 26.3.1, proton-cachyos 11.0 with the views-in-a-tree wineserver (#248's guide), vkd3d-proton `71cae09`, `vm.unprivileged_userfaultfd=1`, Proton's own `d3dcompiler_47`. Series S profile, early world. Release build of this branch's code, with `play.ps1`'s settings and `VICTORY_PORT_DESCRIPTORS/CBV/GUARD/JOURNAL=1`. `VICTORY_PORT_CONSTANTS` was off: in-place sections don't work under Wine (#19, and my comment on #248). | | median ms a frame | |---|---| | before (4): ambient and compare passes missing | ~180 | | with (4) | **~82** (11-13.5 fps) | Most of the gain is the compare pass: without it, finding what changed in the card copies fell back to the CPU. ## Checked - `cargo build --release --target x86_64-pc-windows-gnu --bin victory` and `cargo xtask policy` (273 files ok). - Every pass of `ambient.rs` (keep, mean, place, gather, raise, clear_air) and `CARD_COMPARE` compiles with `vkd3d-compiler -x hlsl -p cs_5_1` (vkd3d-shader 2.1). Before (4), keep/mean/clear_air and the compare failed there. - In the game: no `E5xxx` from vkd3d-shader (`VKD3D_SHADER_DEBUG=warn`), the stand-in reports `role=Radiance size=[640, 360]`, and interiors are lit. ## Not tested - **Windows.** The changed shaders are plain HLSL that Microsoft's compiler should take, and a root UAV over a structured buffer is valid, but I have no Windows run of this branch. - NVIDIA, Intel, RDNA3/4, ray tracing, anything past the early world. AI-assisted (Claude Code): the fixes, runs and this text; I ran them on my machine. No game files, captures or screenshots. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- The empty host pipeline library is asked for with a null blob:
  vkd3d-proton refuses a non-null blob of length 0 (an empty slice) with
  E_INVALIDARG, so under Wine no pipeline was ever kept (as #124).
- Pipeline workers get 64 MB stacks: deep shader compiles overflow the
  default stack under Wine (as #245).
- VICTORY_NO_WATCHDOG=1 (off by default): two byte-checked patches that
  keep the title's watchdog from ending the process while frames are
  slow (RVAs 0x2215c27, 0x23cf683; see #143, #344).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
under wine's d3dcompiler and vkd3d-proton the built-in HLSL failed in five
steps, each verified on hardware (rx 9060 xt, radv, ge-proton 11.14):
- interlockedadd in the ambient's stats (e5005) is gated behind ifdef stats
- the clamp budget's interlocked* methods on a byte buffer (e5005) become the
  free-function form on a structured view of the same words
- isnan/isinf (e5005) become the c != c check
- [allow_uav_condition] (e5017) is removed
- the root signatures are serialized from descriptions, not lifted from the
  compiled blob: the host rejects wine's embedded blob with e_fail

verified: 'no argument clamp' and 'no stand-in for the indirect light' both
zero for the first time; indirect mesh dispatches 7219 groups a frame (zero
in every earlier run); the operator saw the world's graphics on screen
PR #338's root-signature parser refused the two-plane composer's RS, so
the composer was never made and only the base plane showed: black
intro, menus and loading screens under Proton.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Wine's d3dcompiler (vkd3d-shader 2.0/2.1) refuses both (E5005), so under
proton-cachyos the ambient stand-in for the indirect light was never made
(interiors dark) and neither was the card-copy compare pass. The ambient
passes take width/height/slices from their root constants (now 16); the
compare reads its hashes through a structured view of the same bytes.

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

@⁠copilot-pull-request-reviewer[bot] on GitHub · 2026-11-27 00:40 UTC · original · reviewed

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

**@⁠copilot-pull-request-reviewer[bot]** on GitHub · 2026-11-27 00:40 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/421#pullrequestreview-6082019497) · **reviewed** Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Author
Owner

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

Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At 03e5bd8 (on Windows, not Proton): cargo test --release -p victory-gpu --lib 396 passed, 0 failed, 34 ignored; victory-loader 56 passed. So the Linux changes don't break the native Windows path here.

AI-assisted (Claude Code); no game data.

**@⁠MamaLeVrai** on GitHub · 2026-11-27 02:22 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/421#issuecomment-7208065798) Tested on an RX 6950 XT (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release. At `03e5bd8` (on Windows, not Proton): `cargo test --release -p victory-gpu --lib` 396 passed, 0 failed, 34 ignored; `victory-loader` 56 passed. So the Linux changes don't break the native Windows path here. AI-assisted (Claude Code); no game data.
This pull request can be merged automatically.
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/421/head:github-bot/gh-421'
git switch 'github-bot/gh-421'

Merge

Merge the changes and update on Forgejo.
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-421'
git switch 'github-bot/gh-421'
git rebase 'a-publier'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-421'
git switch 'github-bot/gh-421'
git rebase 'a-publier'
git switch 'a-publier'
git merge --no-ff 'github-bot/gh-421'
git switch 'a-publier'
git merge --squash 'github-bot/gh-421'
git switch 'a-publier'
git merge --ff-only 'github-bot/gh-421'
git switch 'a-publier'
git merge 'github-bot/gh-421'
git push origin 'a-publier'
This discussion has been locked. Commenting is limited to contributors.
No description provided.