Fix Proton Wave64 startup and reduce Wine remapping stalls #938

Open
github-bot wants to merge 4 commits from github-bot/gh-938 into main AGit
Owner

@⁠hh-ze on GitHub · 2026-11-25 13:17 UTC · original
hh-ze:proton-shader-warmup → main · +1069 −5 · 8 files · 4 commits · open

Changes

  • Apply the two DXIL loop back-edge fixes from Marvisak/VIctory#2309 so vkd3d-proton can compile the affected Wave64 compute pipelines.
  • Persist and reload the early pipeline list when the host provides no application-owned D3D12 pipeline library.
  • Add an optional Wine server patch that indexes mapped views by base address, with a synthetic benchmark and Proton test instructions. The patch builds as a separate Wine server for a test prefix.
  • Document the tested VICTORY_BACK_OWN_VIEW=1 configuration and the comparison with sparse mip streaming disabled.

Verification

I tested on Linux with GE-Proton11-13, an RTX 5060 Ti, and NVIDIA driver 595.99.02. The three previously failing compute pipelines (fdd56d97a806bcca, b2ff2ef0d6c98dd7, and 32ed072b9f845048) compiled without a skip list. Two launches confirmed that the warmup list saved and reloaded. The test prefix used a native d3dcompiler_47.dll and disabled VK_NV_raw_access_chains.

  • Wine remapping: With the same Proton client and 65,536 live views, the synthetic unmap/remap pair went from 371.0 to 47.8 µs. I confirmed the patched process reached the prison checkpoint and responded to camera input.
  • Copy-back: In alternating 20-second intervals in the prison, median copy-back decreased from 279 to 232 ms across 19 comparable timing windows. Median frame rate went from 2.7 to 3.15 FPS. A separate run checked 131,072 direct writes and recorded zero missing stores and zero mismatches on pages with clean guards.
  • Regression tests: 174 shader tests and four targeted GPU tests passed. Three optional tests were ignored. The bounded GPU tests recorded no NVIDIA kernel faults.

Remaining issues

Interior lighting and some geometry are still incorrect. The shorter VRAM and text experiments did not show a reason to change the tested buffer budget or texture upload setting. Sparse mip streaming sometimes exposed empty textures, and loading flicker was reported with that setting enabled.

**@⁠hh-ze** on GitHub · 2026-11-25 13:17 UTC · [original](https://github.com/fxceless/victory-fork/pull/938) `hh-ze:proton-shader-warmup` → `main` · +1069 −5 · 8 files · 4 commits · open ## Changes - Apply the two DXIL loop back-edge fixes from Marvisak/VIctory#2309 so vkd3d-proton can compile the affected Wave64 compute pipelines. - Persist and reload the early pipeline list when the host provides no application-owned D3D12 pipeline library. - Add an optional Wine server patch that indexes mapped views by base address, with a synthetic benchmark and [Proton test instructions](https://github.com/hh-ze/victory-fork/blob/proton-shader-warmup/docs/proton/README.md). The patch builds as a separate Wine server for a test prefix. - Document the tested `VICTORY_BACK_OWN_VIEW=1` configuration and the comparison with sparse mip streaming disabled. ## Verification I tested on Linux with GE-Proton11-13, an RTX 5060 Ti, and NVIDIA driver 595.99.02. The three previously failing compute pipelines (`fdd56d97a806bcca`, `b2ff2ef0d6c98dd7`, and `32ed072b9f845048`) compiled without a skip list. Two launches confirmed that the warmup list saved and reloaded. The test prefix used a native `d3dcompiler_47.dll` and disabled `VK_NV_raw_access_chains`. - **Wine remapping:** With the same Proton client and 65,536 live views, the synthetic unmap/remap pair went from 371.0 to 47.8 µs. I confirmed the patched process reached the prison checkpoint and responded to camera input. - **Copy-back:** In alternating 20-second intervals in the prison, median copy-back decreased from 279 to 232 ms across 19 comparable timing windows. Median frame rate went from 2.7 to 3.15 FPS. A separate run checked 131,072 direct writes and recorded zero missing stores and zero mismatches on pages with clean guards. - **Regression tests:** 174 shader tests and four targeted GPU tests passed. Three optional tests were ignored. The bounded GPU tests recorded no NVIDIA kernel faults. ## Remaining issues Interior lighting and some geometry are still incorrect. The shorter VRAM and text experiments did not show a reason to change the tested buffer budget or texture upload setting. Sparse mip streaming sometimes exposed empty textures, and loading flicker was reported with that setting enabled.
vkd3d-proton's DXIL conversion keeps one back edge per loop header, as
DXC's code has. With several, the others stay in the header's forward
predecessors and form a cycle, and in programs with wave shuffles its
dominator search then recursed without end: the thread overflowed its
stack and, under Wine, hung. The ray-tracing shadow passes do this once
they translate. The back edges of a header with several now go through
one new block that joins their phi values.

(cherry picked from commit d48ec767ba89d27090f6f61d3a9ebfd9f5374def)
(cherry picked from commit 364c1bc45c4510d0d07a1e58efaff8644165ded2)
The console flow's nested loops leave an inner loop's latch straight to
the outer loop's header: one block that branches back to two headers.
dxil-spirv keeps one back edge per block and takes the other for a
forward edge. In a program with WaveReadLaneAt its shuffle pass
(flatten_subgroup_shuffles) analyses the CFG before anything rewrites
extra back edges, and its loop-exit search (LoopMergeTracer) recurses
over that cycle without end: the pipeline thread overflows its stack, or
with a large stack eats memory until the process dies (fdd56d97a806bcca
on #439, which adds the lane reads; seen natively, 40 GB in 40 s).

single_latches (#1885, one back edge per header) now also sends such a
block's edge to the outer header through a new block of its own, so the
block stays the inner loop's exiting latch, as in DXC's loops. The
write-time fold of empty latches no longer folds one into a block that
already branches back, which would undo that.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 91e3bdfd8f57b2917311583a99d676cc56b0c807)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:54:15 +00:00
Author
Owner

@⁠avt0m4t48 on GitHub · 2026-11-25 13:34 UTC · original

I verified the early-list change independently on 9e7cb4c with Windows Server 2025 x64 and Rust 1.98.1 MSVC. The probe forces library() to return None and uses real filesystem operations.

  • An obstruction at the temporary-file path made the first write fail. After removing it, a forced save wrote the original key without another note_used() call. This covers the retry gap I reported on #259.
  • A periodic save immediately after the successful retry left the new key pending. Four threads then recorded distinct keys and forced saves. The resulting list contained all six keys, and a fresh test process loaded all six through wanted_early().

Both phases passed. This checks the early-list half of the PR without requiring a graphics driver that rejects the application library. I did not run Proton, the Wave64 conversion, or a title for this check. Synthetic probe · Windows run

AI-assisted using Codex.

**@⁠avt0m4t48** on GitHub · 2026-11-25 13:34 UTC · [original](https://github.com/fxceless/victory-fork/pull/938#issuecomment-7163975503) I verified the early-list change independently on `9e7cb4c` with Windows Server 2025 x64 and Rust 1.98.1 MSVC. The probe forces `library()` to return `None` and uses real filesystem operations. - An obstruction at the temporary-file path made the first write fail. After removing it, a forced save wrote the original key without another `note_used()` call. This covers the retry gap I reported on #259. - A periodic save immediately after the successful retry left the new key pending. Four threads then recorded distinct keys and forced saves. The resulting list contained all six keys, and a fresh test process loaded all six through `wanted_early()`. Both phases passed. This checks the early-list half of the PR without requiring a graphics driver that rejects the application library. I did not run Proton, the Wave64 conversion, or a title for this check. [Synthetic probe](https://github.com/avt0m4t48/victory-fork/commit/1c300d0a18572104f0118fc4db33bd53e5a49def) · [Windows run](https://github.com/avt0m4t48/victory-fork/actions/runs/45624276061) AI-assisted using Codex.
Author
Owner

@⁠Filip722 on GitHub · 2026-11-25 13:52 UTC · original · edited 2026-11-25 14:07 UTC

Independent check on Bazzite 44 with an Intel Core 7 240H, 16 GB host RAM, and RTX 5060 Laptop 8 GB (NVIDIA 615.78.08). Runtime was GE-Proton 11-14 with vkd3d-proton build cae8353ed7959c4+. Rust 1.98.1, Windows MSVC release target.

  • The exact 9e7cb4c test binary passed all three synthetic loop/PHI fixtures in emit::bitcode under GE-Proton. They generated their input graphs in Rust.
  • A private integration on the same head ran Series S with the Wine file-backed pages, runtime DXC fallback, #885 native cache call and the #798 built-in upscaler selection. The first attempt stopped on the storage guard during early loading. The same seed and executable passed that point on retry.
  • The retry reopened the native pipeline library and recorded 1,166 cache loads and 62 builds. The sampled pending count reached zero during loading. All title-window captures were black from startup. The title recorded first binds for 74 pipelines at frame 5979. The host-memory guard stopped it around 369 s at 6,057.5 MiB available. The last regular sample had 3,829 MiB free VRAM and 78 MiB scope swap. No matching NVIDIA Xid was recorded. A rendered or controllable screen remains unverified on this laptop.

Edited after reviewing the full capture series to clarify that the loading milestone was measured from logs and the window captures were black. Testing and report prepared with OpenAI Codex assistance.

**@⁠Filip722** on GitHub · 2026-11-25 13:52 UTC · [original](https://github.com/fxceless/victory-fork/pull/938#issuecomment-7164426605) · edited 2026-11-25 14:07 UTC Independent check on Bazzite 44 with an Intel Core 7 240H, 16 GB host RAM, and RTX 5060 Laptop 8 GB (NVIDIA 615.78.08). Runtime was GE-Proton 11-14 with vkd3d-proton build `cae8353ed7959c4+`. Rust 1.98.1, Windows MSVC release target. - The exact `9e7cb4c` test binary passed all three synthetic loop/PHI fixtures in `emit::bitcode` under GE-Proton. They generated their input graphs in Rust. - A private integration on the same head ran Series S with the Wine file-backed pages, runtime DXC fallback, #885 native cache call and the #798 built-in upscaler selection. The first attempt stopped on the storage guard during early loading. The same seed and executable passed that point on retry. - The retry reopened the native pipeline library and recorded 1,166 cache loads and 62 builds. The sampled pending count reached zero during loading. All title-window captures were black from startup. The title recorded first binds for 74 pipelines at frame 5979. The host-memory guard stopped it around 369 s at 6,057.5 MiB available. The last regular sample had 3,829 MiB free VRAM and 78 MiB scope swap. No matching NVIDIA Xid was recorded. A rendered or controllable screen remains unverified on this laptop. Edited after reviewing the full capture series to clarify that the loading milestone was measured from logs and the window captures were black. Testing and report prepared with OpenAI Codex assistance.
github-bot changed title from Fix Proton Wave64 shader compilation and persist pipeline warmup to Fix Proton Wave64 startup and reduce Wine remapping stalls 2026-11-26 11:20:06 +00:00
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/938/head:github-bot/gh-938'
git switch 'github-bot/gh-938'

Merge

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