Fall back to DXC for runtime shaders under linux wine #174

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

@⁠gmankab on GitHub · 2026-11-24 22:09 UTC · original
gmankab:wine-dxc-fallback → main · +176 −117 · 6 files · 1 commits · open

Reuse the compiler loader and signing path for the indirect clamp, depth twins, card comparison, and in-place probe

Based-on: https://github.com/Marvisak/VIctory/pull/178

**@⁠gmankab** on GitHub · 2026-11-24 22:09 UTC · [original](https://github.com/fxceless/victory-fork/pull/174) `gmankab:wine-dxc-fallback` → `main` · +176 −117 · 6 files · 1 commits · open Reuse the compiler loader and signing path for the indirect clamp, depth twins, card comparison, and in-place probe Based-on: https://github.com/Marvisak/VIctory/pull/178
Reuse the compiler loader and signing path for the indirect clamp, depth twins, card comparison, and in-place probe

Based-on: https://github.com/Marvisak/VIctory/pull/178
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:37:34 +00:00
Author
Owner

@⁠rostaddotcc on GitHub · 2026-11-24 22:18 UTC · original

The premise is right and I have it measured, but there is a version of this that needs no code: the failure is not Wine refusing cs_5_1, it is which d3dcompiler_47 is loaded.

d3dcompiler_47 indirect::tests::argument_clamp_builds clamp source compiled directly
Wine builtin (=b) FAILED E5005: Method 'InterlockedMax' is not defined on type 'RWByteAddressBuffer'
native Microsoft fxc (=n) ok, 0.40 s ok, 3 984 B, root signature kept

On this box (CachyOS, RX 7900 XT, Proton Experimental experimental-11.0-20261112, vkd3d-proton 3.2.0 serving d3d12) the whole victory-gpu suite is 109 passed / 1 failed with d3dcompiler_47=n, and the builtin fails the clamp exactly as you describe. So winetricks d3dcompiler_47 (pinned in the launcher, not inherited from whatever prefix exists) closes it for the tests and for a run today.

Where DXC is the right answer anyway: [RootSignature] is not implemented in vkd3d at all — RTS0 exists there only as a standalone serializer — so the builtin will never accept the fork's sources, and the Interlocked*/Load* methods on RWByteAddressBuffer landed upstream only on 2026-11-04 and are in no release (Load* since 1.14, the Interlocked* intrinsics since 1.15). A DXC fallback therefore buys something the native DLL does not: it removes a dependency on a redistributable Microsoft binary that most prefixes will not have, and it is the only path that keeps working if fxc's cs_5_1 support is ever dropped.

Two things worth deciding explicitly in the PR, since they are what a distro packager will ask about: whether the DXC DLL is expected from the system (VICTORY_DXC already accepts a directory or the DLL) or shipped, and whether the fallback is only for the runtime-only shaders listed or also for the shader tests — the test would then need the same loader, or a skip that says why.

**@⁠rostaddotcc** on GitHub · 2026-11-24 22:18 UTC · [original](https://github.com/fxceless/victory-fork/pull/174#issuecomment-7146058782) The premise is right and I have it measured, but there is a version of this that needs no code: the failure is not Wine refusing `cs_5_1`, it is which `d3dcompiler_47` is loaded. | `d3dcompiler_47` | `indirect::tests::argument_clamp_builds` | clamp source compiled directly | |---|---|---| | Wine builtin (`=b`) | FAILED | `E5005: Method 'InterlockedMax' is not defined on type 'RWByteAddressBuffer'` | | native Microsoft `fxc` (`=n`) | ok, 0.40 s | ok, 3 984 B, root signature kept | On this box (CachyOS, RX 7900 XT, Proton Experimental `experimental-11.0-20261112`, vkd3d-proton 3.2.0 serving `d3d12`) the whole `victory-gpu` suite is 109 passed / 1 failed with `d3dcompiler_47=n`, and the builtin fails the clamp exactly as you describe. So `winetricks d3dcompiler_47` (pinned in the launcher, not inherited from whatever prefix exists) closes it for the tests and for a run today. Where DXC is the right answer anyway: `[RootSignature]` is not implemented in vkd3d at all — `RTS0` exists there only as a standalone serializer — so the builtin will never accept the fork's sources, and the `Interlocked*`/`Load*` methods on `RWByteAddressBuffer` landed upstream only on 2026-11-04 and are in no release (`Load*` since 1.14, the `Interlocked*` intrinsics since 1.15). A DXC fallback therefore buys something the native DLL does not: it removes a dependency on a redistributable Microsoft binary that most prefixes will not have, and it is the only path that keeps working if `fxc`'s `cs_5_1` support is ever dropped. Two things worth deciding explicitly in the PR, since they are what a distro packager will ask about: whether the DXC DLL is expected from the system (`VICTORY_DXC` already accepts a directory or the DLL) or shipped, and whether the fallback is only for the runtime-only shaders listed or also for the shader tests — the test would then need the same loader, or a skip that says why.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/host.rs
  • crates/victory-gpu/src/indirect.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/174/head:github-bot/gh-174'
git switch 'github-bot/gh-174'

Merge

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