Skip to content

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

Open
gmankab wants to merge 1 commit into
fxceless:mainfrom
gmankab:wine-dxc-fallback
Open

gmankab wants to merge 1 commit into
fxceless:mainfrom
gmankab:wine-dxc-fallback

Conversation

@gmankab

@gmankab gmankab commented Nov 24, 2026

Copy link
Copy Markdown

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

Based-on: Marvisak/VIctory#178

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

Based-on: Marvisak/VIctory#178
@rostaddotcc

Copy link
Copy Markdown

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.

RicerBoy added a commit to RicerBoy/DropItLikeItsHot that referenced this pull request Nov 24, 2026

@ErRusso ErRusso left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 9c92ad9 against 2119b0e.

This overlaps #20 but misses its second Wine failure mode. host::compile falls back to DXC only when D3DCompile returns Err. Under Wine the depth-plane twins' source compiles successfully but loses its [RootSignature]/RTS0 chunk, so CreateRootSignature fails and the twins still log no pipeline to draw a depth plane from its twin. There is no carries_root_signature check, and no test covers the missing-RTS0 path.

#20 already routes the same four call sites and adds that check (plus the per-entry root-signature test). Please close this in favour of #20, or add the missing-RTS0 fallback and a test.

RecompLive pushed a commit to RecompLive/victory-fork that referenced this pull request Nov 25, 2026
…eserves-tick

GPU: a frame wait takes its tick before it sleeps
PiloteCode added a commit to PiloteCode/victory-fork that referenced this pull request Nov 25, 2026
…ull requests and the host FidelityFX on our layer; our translator, title memory and copy-back kept

319 commits past ffe310e, merged onto wave4. Most of its runtime pull
requests were here already, picked one by one (fxceless#653 and fxceless#716,
prhle, offpr): where a change arrived both ways, the copy this branch had
is kept (net, audio, xg, runtime, lifecycle with its one stand-in window
(#1677), files, kernel, xasync, xgamesave, xmem, gameinput, the loader's
crash, clzero and publish code, the pipeline cache, #1658's staging clamp).
The rest is the resolution first made on wave2 (offm-on-wave2, ab1d525),
carried over:

- crates/victory-shader: ours (every conflict --ours). Kept from theirs
  only what landed whole: fxceless#661 SP3 text operands, fxceless#1021 s_atc_probe's
  immediate, #1636 FLAT offsets. Reverted where half landed: fxceless#1180, range.rs,
  fxceless#617's bench, #1337's sampler, ACCC, SOURCE_HASH, and new test files whose
  mod lines are in conflicted files. The rest is to be ported on its own.
- victory-gpu: ours plus the official units taken, each from its own
  diff: host.rs (fxceless#615 switch=0 is off, fxceless#1082 TDR log, #1626 swap-chain
  retries throttled), descriptor/host.rs (fxceless#974, its walk no longer cut at
  2^18 steps by ours), descriptor.rs (fxceless#52: a mirror holds the heaps' lock
  while it uses the heap, a read lock on this branch's RwLock, and so does
  our re-mirror of waiting slots), resource.rs (fxceless#52, fxceless#504 depth/stencil
  footprints, #1390 A8), pipeline/host.rs (fxceless#618), pipeline.rs (a stream
  subobject past its end not read), capture.rs (fxceless#615, fxceless#1146, a D24 depth
  plane dumped as depth), frame.rs (fxceless#174, with our late-wait shortcut inside
  the tick reservation), device.rs (fxceless#928, feature queries 7/8/23), list.rs
  (#1446, fxceless#52), external.rs (host FidelityFX, VICTORY_FIDELITYFX_DIR, off
  unless set), switch.rs, tdr.rs, and the small PRs (fxceless#553, #1562, fxceless#270,
  fxceless#153, #1453, #1204, fxceless#1173, #1206, fxceless#474).
- Not taken, ours kept: title memory at raw addresses (27c3dc9, 0f63757,
  6d021fe: their memory.rs and Upload), page marks (cd94d35, 940d32f: with
  our shaders every write through a view would be lost), bindless.rs and the
  change journal (c75fdba), root views and retirement at execute end
  (d71c388: unsafe with flights in the air), rectangle GS and table
  constants in place (683ad7a), twins and shared host textures (13bbd6f),
  heap copies (86a5ed6, bacb06a), the shader cache key, warm-up, pipeline
  queue and library (c47b529, 9c58a1c, fxceless#1000, #1660), #1510, #1635, #1246,
  fxceless#322, #1322, fxceless#669, fxceless#197 (turned down by prhle), #1726 (ours waits longer;
  its test added), the console upscaler's UAV clears. `translate --cache` is
  `--warm all` (with the adapter probe); the pipeline pre-build is not in.
- Also taken: the shader pack and the database's effects (shader-info), the
  startup archive check (fxceless#12, on this branch's KnownBuild with its patches),
  and the runtime PRs not here yet (FidelityFX's config and module).
- The title is not named in the merged-in comments (4e17478).

Details, the overlaps and what to watch: README, "The official
repository, merged".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants