Skip to content

GPU: compile our run-time HLSL with DXC when the system compiler refuses it (Wine/Proton) - #20

Open
ErRusso wants to merge 9 commits into
fxceless:mainfrom
ErRusso:runtime-hlsl-dxc-fallback
Open

ErRusso wants to merge 9 commits into
fxceless:mainfrom
ErRusso:runtime-hlsl-dxc-fallback

Conversation

@ErRusso

@ErRusso ErRusso commented Nov 24, 2026 •

Copy link
Copy Markdown

Fixes #6 (part 1).

What

Under Wine and Proton D3DCompile is Wine's d3dcompiler_47 (vkd3d-shader), and it fails the host's own HLSL in two different ways:

  1. It refuses some of the source: E5005: Method 'InterlockedMax' is not defined on type 'RWByteAddressBuffer' (the clamp, the card compare, the in-place probe). Each caller then gave up quietly: the indirect-argument clamp was dropped, so every indirect execution was; the card compare could not be made, so copies in the card's memory switched off; the in-place probe had no pipeline.
  2. It compiles the rest but drops the root signature the shader asks for (the depth-plane twins: no RWByteAddressBuffer in their source). The container carries no RTS0 chunk, so CreateRootSignature over those bytes fails with E_FAIL and the twins log no pipeline to draw a depth plane from its twin.

crates/victory-gpu/src/dxc.rs now compiles our HLSL in one place:

  • D3DCompile first, as before;
  • if it refuses the source, or its container has no root signature for a source that asks for one, the same source goes through DXC (dxcompiler.dll) as shader model 6.0, *_5_1 mapped to *_6_0, -E <entry>, -O3. The root signature stays inside the shader, so the callers only see bytes. A stage with no root signature of its own (a vertex shader whose pixel shader carries it) keeps the system's bytes;
  • dxcompiler.dll is looked for in VICTORY_DXC (the DLL or its folder), beside the dxil.dll shader validation already uses (the SDK ships them together), then the executable's folder and System32;
  • a container DXC compiles without finding dxil.dll carries a zero digest, which D3D12 refuses: such containers are validated (and signed) in place, VICTORY_DXIL naming the validator if it is somewhere else.

Callers routed through it: the clamp in indirect.rs (make_for, and the tests' compile_cs), host.rs compile() (the depth-plane twins) and make_card_work (the card compare), inplace.rs shade(). The refusal, the missing root signature and the fallback are logged once per compile, with entry and profile.

Adds the Win32_Graphics_Direct3D_Dxc feature to the windows crate in victory-gpu (no new crates, Cargo.lock unchanged). README: the fallback and the VICTORY_DXC / dxil.dll requirement under Wine.

Testing

Run under Wine 11.22 with GE-Proton11-12's vkd3d-proton (d3d12.dll/d3d12core.dll overridden to native), DXC 1.9.2609 (VICTORY_DXC, the same version as in #6), on an RTX 4060 with the 620.73.04 driver — the same driver series as the report.

  • The crate's whole test suite: 111 of 112 pass. The one failure is pipeline::library::tests::a_rejected_blob_gives_an_empty_library, which fails identically with these changes stashed: vkd3d-proton does not implement ID3D12Device1::CreatePipelineLibrary. Unrelated.
  • resource::tests::a_depth_planes_twin_is_drawn_into_the_plane fails before the root-signature part of this PR and passes after it — that test compiles the twins' vertex and pixel shaders through host::compile() and draws with them.
  • indirect::tests::argument_clamp_builds builds the clamp through the fallback (the host device exists under Wine; it is not a skip).
  • New test dxc::tests::a_shader_the_system_compiler_refuses_is_compiled_by_dxc: the log shows the system compiler refused it: Call failed. (0x80004005), then a DXIL container with a nonzero digest and an RTS0 chunk, and D3D12 takes the root signature out of it and creates the compute pipeline (D3D12 took the root signature and made the pipeline).

Verification since the original run

  • Windows 11, RTX 5070, driver 621.40, DXC 1.9.2602 (@marquezinii): workspace 487 passed, 0 failed, 7 ignored; victory-gpu --lib 113 passed; clippy clean. lit now asks for no root signature and keeps D3DCompile bytes; main, plane and corner ask for one and keep it, so DXC is not entered on Windows. Forcing every compile through DXC: 113 passed, 19 DXC compiles. With VICTORY_DXC pointing at a folder holding only dxcompiler.dll: 113 passed.
  • Proton Experimental experimental-11.0-20261112, RTX 4060, driver 620.73.04 (this branch, 14a1f07): d3dcompiler_47 refused the clamp (E5005: InterlockedMax), the card compare (E5005: Load4) and the in-place probe (E5005: Load), and accepted the twins' pixel shader without RTS0. DXC supplied all four. A run reached the prologue (frame 13,124; mission fbk_stry000_FBK_STRY000_INTRO; 32 peds, 3596 buildings), with the clamp, card compare, probe and twins all used.
  • GE-Proton11-14 / vkd3d-proton 3.2.0, RTX 5090 (@ThomasHFWright): DXC fallback used for the clamp and the twins' missing root signature; zero no argument clamp / not bounded / DXC failed too; 2,147 indirect commands bounded per frame; 946 SPIR-V modules validate for Vulkan 1.3 with scalar-block-layout.
  • GE-Proton11-14 / vkd3d-proton 3.2.0, RTX 4060, driver 620.73.04 (local, VICTORY_INPLACE_PROBE unset): DXC supplied the clamp and the twins' pixel shader; clamp used (bound) and depth-plane twin used were logged at 1,434 draws/frame. The kernel then logged NVRM gpu_vaspace.c assertion failures and the machine hung after about seven minutes. This reproduces the separate GPU/driver fault on a second GPU and without the in-place probe, so it is not probe-induced.

Scope: this fixes the run-time HLSL compiles. It does not claim the vkd3d-proton GPU execution fault/device removal: on @ThomasHFWright's stack the control still ends with Xid 109, and this branch with Xid 13 in a different submission; locally the same class of NVRM gpu_vaspace.c failure hangs an RTX 4060. The world remains blocked there for a separate reason. The intro-video flicker, the VICTORY_RELAY=2 geometry dropout and the three untranslated skin shaders are also separate.

AI-assisted: written with the pi coding agent at my request.

@ErRusso

ErRusso commented Nov 24, 2026

Copy link
Copy Markdown
Author

Second commit, from testing this under Wine: the compile-failure fallback alone was not enough for the depth-plane twins.

Wine's d3dcompiler_47 (vkd3d-shader) compiles the twins' source fine — there is no RWByteAddressBuffer in it — but leaves the [RootSignature(RS)] out of the container (no RTS0 chunk), so CreateRootSignature over its bytes fails with E_FAIL and the twins keep logging no pipeline to draw a depth plane from its twin. That is a second, silent failure mode next to E5005.

So a successful system compile is no longer taken as final: if the source asks for a root signature and the container carries none, DXC compiles it too and its bytes are used when they carry one (dxc.rs, carries_root_signature). A stage with no root signature of its own — the twins' vertex shader — keeps the system's bytes, since its pixel shader carries the signature.

Under Wine 11.22 + GE-Proton11-12's vkd3d-proton + DXC 1.9.2609, the crate's suite is 111/112 (the one failure, pipeline::library::tests::a_rejected_blob_gives_an_empty_library, fails the same way without these changes: vkd3d-proton has no CreatePipelineLibrary), and a_depth_planes_twin_is_drawn_into_the_plane fails before this commit and passes after it.

@marquezinii

Copy link
Copy Markdown
Contributor

I ran the DXC path on native Windows, since it hadn't been run anywhere yet: RTX 5070 (driver 621.40), Windows 11, dxcompiler.dll/dxil.dll from SDK 10.0.26100 (1.9.2602), PR head 73a0c56.

cargo test -p victory-gpu --lib, three ways:

  • As is: 112 passed, 1 ignored. Apart from lit (see below), every compile with a root signature in its source came back from D3DCompile carrying it, so the new check keeps the system's bytes (12 main, 2 plane, corner).
  • Every compile forced through dxc() (a local patch that makes system() fail, not part of this PR): 112 passed. That covers the clamp (cs_5_1, 3,851-byte source), the depth-plane twins (plane as ps_5_1, both variants), the in-place probe, the corner/lit pair and the smaller compute sources; the in-place probe gives the same verdict as with D3DCompile.
  • Forced, with VICTORY_DXC pointing at a folder holding only dxcompiler.dll (no dxil.dll next to it): 112 passed, so the containers get signed and the driver accepts them.

The full workspace suite on the first head (9ffa202) was unchanged here, 484 passed.

One small thing in 73a0c56: the check looks for RootSignature in the whole source, not in the entry. The resource test that compiles lit (ps_5_1) from a source whose corner entry has the root signature therefore goes to DXC on Windows too, and keeps the system's bytes afterwards since DXC has none to give either. It's test-only code, so it changes nothing at run time, but on a machine without dxcompiler.dll it would log DXC failed too there.

Not tested: Wine/Proton itself.

@ErRusso

ErRusso commented Nov 24, 2026

Copy link
Copy Markdown
Author

Thanks for running the DXC path on native Windows — the forced-DXC pass and the compiler-without-dxil.dll pass cover two branches no test had exercised.

On the lit point: correct, and 3bb3845 scopes the check to the entry. asks_for_root_signature ties each [RootSignature(...)] to the declaration that follows it (skipping any attributes in between, such as [numthreads]), so lit no longer triggers a retry while main and plane still do. When an attribute cannot be tied to a declaration, or RootSignature appears outside one, it answers yes: the conservative direction, since the answer only decides whether a second compile is attempted. New test a_root_signature_belongs_to_the_entry_it_sits_on covers a main + lit source and the no-attribute case.

Verified here: cargo check -p victory-gpu --lib --tests --target x86_64-pc-windows-gnu, and that test under Wine (1 passed). I did not rerun the full Windows or Wine suite; the 112-pass results above remain the evidence for the earlier head.

@oeirughrepuiohg

oeirughrepuiohg commented Nov 24, 2026 •

Copy link
Copy Markdown

In-game data point for this fallback, since the description notes the title itself was not run: I had made the same change independently (#21, now closed in favour of this PR, which also covers the in-place probe and the dropped root signature).

Setup: RTX 4070 Ti 12 GB, NVIDIA 620.70.06 open modules (with NVIDIA/open-gpu-kernel-modules PR #1542), Fedora 45, kernel 7.3.4; Wine from Proton Experimental (11.0-20261027b), vkd3d-proton cae8353e, DXC 1.9.2609 via VICTORY_DXC. Diag build of d279e69 + VIctory #454 + the fallback, Series X, VICTORY_SHADER_LOOP_LIMIT=32, VICTORY_NO_WATCHDOG=1.

In the world (two runs of ~25 min):

  • The log shows the clamp refused by Wine's compiler (E5005: Method 'InterlockedMax' is not defined on type 'RWByteAddressBuffer'), then built by DXC; indirect work runs (~4,000–5,000 draws/frame).
  • The first gameplay scene renders lit and is controllable with a pad. Steady state at the movement prompt over 8 min: 1.96 fps average, 1% low 1.52 fps, frame time p50 507 ms / p99 624 ms.
  • No device removal, no Xid during play, 8 shader does not translate warnings.

Update: this PR's own head in the game, and the root-signature half matters visually. I then ran 3bb3845 merged onto 90228a7 (+ VIctory #454), same setup:

  • Without this PR the log has no pipeline to draw a depth plane from its twin: such planes stay as they are (Wine's compiler drops the root signature). With it: depth planes: 1.0 drawn from their twins per frame.
  • At the first movement prompt, the large pale rectangular patches that covered the window and the foreground in every earlier run are gone; the window frame and its wire mesh render correctly. The character's hair is still wrong (oversized, wispy strands), which looks separate.
  • No device removal or Xid so far in this run.

I had not run this PR's own commit in the game yet; the above is the same approach on d279e69.

AI use: Claude Code, Claude Opus 5.5 ran the builds and runs on my machine and wrote this comment.

rostaddotcc added a commit to rostaddotcc/victory-fork that referenced this pull request Nov 24, 2026
Measured on an RX 7900 XT (RDNA 3) with Mesa 26.3.1 RADV under Proton
Experimental: Wine's d3d12 stubs must be kept out (otherwise 0 draws) and
HDR must be off on the output (otherwise present blocks at ~400 ms/frame and
the watchdog ends the run). World frames average 5-8 s: 134-163 ms on the
GPU, the rest host-side copies (60-100 MB/s) and texture uploads (13-41 MB/s).
The presented frame is black at 2 800-4 800 draws/frame, with and without
PR fxceless#20's DXC fallback.
@rostaddotcc

rostaddotcc commented Nov 24, 2026 •

Copy link
Copy Markdown

⚠️ Partly wrong — the conclusion below that the DXC fallback is inert on Proton does not hold. The run used a prefix that already had Microsoft's d3dcompiler_47 installed (winetricks), so Wine's builtin compiler was never exercised. Measured matrix and the correction: #6 (comment)


Correction: the run does not reach the world — saved frames 512–2048 are the splash and the loading art, so ten minutes gets boot, menus, splash and loading, and the 2 800 draws/frame are the loading screen streaming. Everything else below (build, no device removal, fallback not taken, frame cost) stands; read "world frames" as "loading frames". The memory paths themselves are not the problem: a 128 MiB probe in the same prefix does 21 GB/s of mapped upload writes and 143–163 GB/s of card copies (details in #6).


An in-game run of this branch under Proton, on AMD, as @leonardo-silva-pinheiro asked for in #6. Short version: it builds and runs cleanly, but on this setup the fallback is never taken, so it does not settle the case either way.

Setup: RX 7900 XT (RDNA 3, native 64-lane waves), Mesa 26.3.1 RADV, Vulkan 1.4, CachyOS 7.3.5, KDE Plasma 6 on Wayland; Proton Experimental wine (experimental-11.0-20261112) run directly with its vkd3d-proton and DXVK dxgi; Series X files; title 1.0.2.1.

Build and run: cross-compiled on Linux with cargo xwin build --release -p victory --target x86_64-pc-windows-msvc at 73a0c56, DXC 1.9.2609 (dxcompiler.dll, dxil.dll) beside the exe with VICTORY_DXC set. WINEDLLOVERRIDES="d3d12=n;d3d12core=n;dxgi=n", VICTORY_NO_WATCHDOG=1, VICTORY_SHADER_LOOP_LIMIT=256. 660 s run, reached the world, no device removal, no exception, no Xid.

The fallback was not used. Proton's d3dcompiler_47 accepted every runtime compile in a ten-minute run: zero no argument clamp messages, and the card compare built (10 copies of 492 MB, 23–53 MB per frame sent up). So nothing here distinguishes this branch from 1684989: the world submitted 2 783 draws per frame average (4 781 peak) and looked the same as unmodified 1684989 (2 990 average, 7 967 peak). The E5005 failures in #6 do not reproduce on 1684989 with this Proton's d3dcompiler_47 — either the shader changed between 578d459 and now, or the compiler version matters. Worth pinning down before choosing between #20 and #21; if the failure no longer happens on current main, neither is needed for Proton Experimental, and the question becomes older Wine and vkd3d-proton.

Frame cost, for the record (world frames only, more than 800 draws/frame, averaged over ~600 s):

1684989 this branch
frame 7 892 ms 5 173 ms
preparing 6 417 ms 4 261 ms
— copies 2 793 ms / 172 MB 1 969 ms / 197 MB
— textures 2 787 ms / 38 MB 1 581 ms / 65 MB
on the GPU 134 ms 163 ms
copying back 1 091 ms / 38 MB 637 ms / 65 MB

The frame is not GPU bound; host-side copies run at 60–100 MB/s and texture uploads at 13–41 MB/s here, against roughly 1 GB/s in #10's Windows numbers. The presented frame stayed black at 2 800–4 800 draws per frame in both runs. None of this is a judgement on the branch — it is the environment.

Two notes that cost real time and are not in the README: Wine's builtin d3d12 must be overridden off (otherwise device creation returns E_INVALIDARG and every frame submits 0 draws), and HDR must be off on the output the window lands on (with HDR on, presentation blocks ~400 ms per frame and the 30 s watchdog ends the run with int3 at a frame-64 boundary, which reads exactly like a title crash). I opened #41 with a doc that records both.

No images, no game data; numbers only.

rostaddotcc added a commit to rostaddotcc/victory-fork that referenced this pull request Nov 24, 2026
Measured on an RX 7900 XT (RDNA 3) with Mesa 26.3.1 RADV under Proton
Experimental: Wine's d3d12 stubs must be kept out (otherwise 0 draws) and
HDR must be off on the output (otherwise present blocks at ~400 ms/frame and
the watchdog ends the run). World frames average 5-8 s: 134-163 ms on the
GPU, the rest host-side copies (60-100 MB/s) and texture uploads (13-41 MB/s).
The presented frame is black at 2 800-4 800 draws/frame, with and without
PR fxceless#20's DXC fallback.
@ErRusso

ErRusso commented Nov 24, 2026

Copy link
Copy Markdown
Author

Thanks — a clean in-game run on AMD is useful even where the fallback is inert, and the two environment notes are worth having in #41.

Source vs compiler, pinned: the HLSL did not change. indirect.rs, host.rs and inplace.rs are byte-identical between 578d459 and 1684989, so the clamp, card compare, in-place probe and twins are the same source you ran. The difference is the bundled compiler.

Independent datapoint: on this machine, Wine 11.22's built-in d3dcompiler_47 still fails all of it. A small D3DCompile-only program (no device), compiled against the same sources at 1684989:

  • clamp: E5005: Method 'InterlockedMax' is not defined on type 'RWByteAddressBuffer'
  • card compare: E5005: Method 'Load4' ...
  • in-place probe: E5005: Method 'Load' ...
  • depth-plane twins: compiles (716 bytes), but the container has no RTS0

So both failure modes are real at this source revision; Proton Experimental experimental-11.0-20261112 ships a compiler that handles them. Pinning the exact vkd3d-shader/vkd3d-proton version where InterlockedMax, Load4 and root-signature retention arrived would be worth a note in #6, but it is not a property of this tree.

One caveat on "fallback was not used": on this branch the fallback logs at info (the system compiler refused one of our shaders: trying DXC, the system compiler left the root signature out...), and the old no argument clamp warning is gone whether the fallback ran or not. Absence of the old messages does not distinguish the two; the info lines do. Your 1684989 run is conclusive on its own, though: on unmodified main a refused clamp still logs and the card compare would have switched off, and neither happened.

I updated the README in 083da25 to stop claiming every Wine build rejects this source: it names Wine 11.22 and GE-Proton 11-12/11-14 as refusing it, and Proton Experimental experimental-11.0-20261112 as compiling it and never taking the fallback.

On #20 vs #21: this does not change the comparison. #20 still covers the in-place probe and the dropped root signature, and because it always tries the system compiler first, the Proton Experimental result above is also its behavior there — the fallback is inert, not a regression. Dropping it would leave the Wine 11.22 / GE-Proton setups from #6 broken.

rostaddotcc added a commit to rostaddotcc/victory-fork that referenced this pull request Nov 24, 2026
Measured on an RX 7900 XT (RDNA 3) with Mesa 26.3.1 RADV under Proton
Experimental: Wine's d3d12 stubs must be kept out (otherwise 0 draws) and
HDR must be off on the output (otherwise present blocks at ~400 ms/frame and
the watchdog ends the run). World frames average 5-8 s: 134-163 ms on the
GPU, the rest host-side copies (60-100 MB/s) and texture uploads (13-41 MB/s).
The presented frame is black at 2 800-4 800 draws/frame, with and without
PR fxceless#20's DXC fallback.
rostaddotcc added a commit to rostaddotcc/victory-fork that referenced this pull request Nov 24, 2026
Measured on an RX 7900 XT (RDNA 3) with Mesa 26.3.1 RADV under Proton
Experimental: Wine's d3d12 stubs must be kept out (otherwise 0 draws) and
HDR must be off on the output (otherwise present blocks at ~400 ms/frame and
the watchdog ends the run). World frames average 5-8 s: 134-163 ms on the
GPU, the rest host-side copies (60-100 MB/s) and texture uploads (13-41 MB/s).
The presented frame is black at 2 800-4 800 draws/frame, with and without
PR fxceless#20's DXC fallback.
rostaddotcc added a commit to rostaddotcc/victory-fork that referenced this pull request Nov 24, 2026
Measured on an RX 7900 XT (RDNA 3) with Mesa 26.3.1 RADV under Proton
Experimental: Wine's d3d12 stubs must be kept out (otherwise 0 draws) and
HDR must be off on the output (otherwise present blocks at ~400 ms/frame and
the watchdog ends the run). World frames average 5-8 s: 134-163 ms on the
GPU, the rest host-side copies (60-100 MB/s) and texture uploads (13-41 MB/s).
The presented frame is black at 2 800-4 800 draws/frame, with and without
PR fxceless#20's DXC fallback.
rostaddotcc added a commit to rostaddotcc/victory-fork that referenced this pull request Nov 24, 2026
Measured on an RX 7900 XT (RDNA 3) with Mesa 26.3.1 RADV under Proton
Experimental: Wine's d3d12 stubs must be kept out (otherwise 0 draws) and
HDR must be off on the output (otherwise present blocks at ~400 ms/frame and
the watchdog ends the run). World frames average 5-8 s: 134-163 ms on the
GPU, the rest host-side copies (60-100 MB/s) and texture uploads (13-41 MB/s).
The presented frame is black at 2 800-4 800 draws/frame, with and without
PR fxceless#20's DXC fallback.
@ErRusso

ErRusso commented Nov 24, 2026

Copy link
Copy Markdown
Author

Thanks for the correction — noted, and it changes what the run can be used for.

What still holds: on the branch, the compiles the boot/menu/splash/loading path reaches were accepted without the fallback; the card compare is the clearest one, since it built (10 copies of 492 MB). On unmodified 1684989 it also built, and no no argument clamp warning appeared, so its d3dcompiler_47 accepted at least CARD_COMPARE — the shader Wine 11.22 rejects with E5005: Load4 here. That is still a real compiler-version difference.

What it no longer establishes: the clamp, the depth-plane twins and the in-place probe. The clamp is built lazily on the first indirect execution (indirect::bound), the twins lazily when a compute-written depth texture needs one, and the probe on its first use. A run that stops at loading may never compile them, so “fallback not taken” covers only the shaders that path exercised, not the four the PR targets. It also can’t decide #20 vs #21: the clamp and twins are exactly what #21 handles differently, and neither was reached.

I corrected the README in 14a1f07: it now says the Proton Experimental run built the card compare without the fallback but did not exercise the clamp, twins or probe. The known-problems note no longer claims Proton Experimental needs no DXC; it names only the builds that reproduce the rejection.

The frame-cost table re-read as loading frames and the memory probe (21 GB/s mapped writes, 143–163 GB/s card copies) are consistent with your conclusion that the host paths were not the limiter in that run. None of it is a judgment on the branch. A run that reaches the world would settle it; the info lines (the system compiler refused one of our shaders: trying DXC, the system compiler left the root signature out...) and, on 1684989, the old warnings would identify which of the four compiled and how.

rostaddotcc added a commit to rostaddotcc/victory-fork that referenced this pull request Nov 24, 2026
Measured on an RX 7900 XT (RDNA 3) with Mesa 26.3.1 RADV under Proton
Experimental: Wine's d3d12 stubs must be kept out (otherwise 0 draws) and
HDR must be off on the output (otherwise present blocks at ~400 ms/frame and
the watchdog ends the run). World frames average 5-8 s: 134-163 ms on the
GPU, the rest host-side copies (60-100 MB/s) and texture uploads (13-41 MB/s).
The presented frame is black at 2 800-4 800 draws/frame, with and without
PR fxceless#20's DXC fallback.
rostaddotcc added a commit to rostaddotcc/victory-fork that referenced this pull request Nov 24, 2026
Measured on an RX 7900 XT (RDNA 3) with Mesa 26.3.1 RADV under Proton
Experimental: Wine's d3d12 stubs must be kept out (otherwise 0 draws) and
HDR must be off on the output (otherwise present blocks at ~400 ms/frame and
the watchdog ends the run). World frames average 5-8 s: 134-163 ms on the
GPU, the rest host-side copies (60-100 MB/s) and texture uploads (13-41 MB/s).
The presented frame is black at 2 800-4 800 draws/frame, with and without
PR fxceless#20's DXC fallback.
rostaddotcc added a commit to rostaddotcc/victory-fork that referenced this pull request Nov 24, 2026
Measured on an RX 7900 XT (RDNA 3) with Mesa 26.3.1 RADV under Proton
Experimental: Wine's d3d12 stubs must be kept out (otherwise 0 draws) and
HDR must be off on the output (otherwise present blocks at ~400 ms/frame and
the watchdog ends the run). World frames average 5-8 s: 134-163 ms on the
GPU, the rest host-side copies (60-100 MB/s) and texture uploads (13-41 MB/s).
The presented frame is black at 2 800-4 800 draws/frame, with and without
PR fxceless#20's DXC fallback.

Copy link
Copy Markdown

Independent Linux title comparison: this PR fixes real helper-shader failures here, but a GPU execution fault still blocks the world.

Tested your 14a1f079 delta applied to fork 4e17478b, plus a local opt-in 10-second submission-fence timeout to save command notes. This is integration validation, not an exact-head run. RTX 5090, NVIDIA 620.73.04, CachyOS 7.3.6, Rust 1.98.1 MSVC diagnostics build; GE-Proton11-14 via umu 1.4.3, SteamRT4 4.0.20261110.268882, bundled vkd3d-proton 3.2.0 cae8353ed7959c4+. DXC/validator 1.9.2609, explicit VICTORY_DXC/VICTORY_DXIL.

Both runs were offline, Series X, loop limit 256, VK_NV_raw_access_chains disabled, default performance switches, no pipeline skips or forced debug rendering. The second retained the first run's cache/state; these are not deterministic replays.

  • Control: Wine's compiler rejects InterlockedMax; missing argument clamp and thousands of indirect commands dropped. Fence timeout/device removal after 117.1 s, kernel Xid 109. The failed submission contained seven compute dispatches.

  • With GPU: compile our run-time HLSL with DXC when the system compiler refuses it (Wine/Proton) #20: the log explicitly records DXC fallback for the clamp and the depth-plane pixel shader's missing root signature. Zero no argument clamp/not bounded (no clamp...) messages, zero DXC failed too; one sample reports 2,147 indirect commands bounded per frame. The opening story card renders, but no normal world visual established. Ended after 103.1 s with Xid 13 and a fence timeout in a different submission (20 command notes, including draws and indirect compute). This does not identify the exact faulting command or establish that the earlier fault is fixed.

  • All 946 captured SPIR-V modules from the GPU: compile our run-time HLSL with DXC when the system compiler refuses it (Wine/Proton) #20 run validate for Vulkan 1.3 with scalar-block-layout.

  • Build, all-target/all-feature Clippy and native asset policy pass. GPU suite with Wine's builtin compiler and explicit DXC: 118 passed, 2 pipeline-library failures, 1 ignored. Both failures also occur in the control; fallback, clamp and depth-plane tests pass.

  • Full diagnostics workspace suite: 501 passed, 6 failed, 7 ignored across 14 executables. The six are the two library tests above, Wine tool-launch failures for nested git/cargo, a missing Wine WSAConnectByList export, and vkd3d accepting the intentionally bad container digest. No numerical shader test failed. Console-compiler differential checks still cannot run here.

AI-assisted testing and analysis. Aggregate results only; no game files, derived shader files or images attached.

rostaddotcc added a commit to rostaddotcc/victory-fork that referenced this pull request Nov 24, 2026
Measured on an RX 7900 XT (RDNA 3) with Mesa 26.3.1 RADV under Proton
Experimental: Wine's d3d12 stubs must be kept out (otherwise 0 draws) and
HDR must be off on the output (otherwise present blocks at ~400 ms/frame and
the watchdog ends the run). World frames average 5-8 s: 134-163 ms on the
GPU, the rest host-side copies (60-100 MB/s) and texture uploads (13-41 MB/s).
The presented frame is black at 2 800-4 800 draws/frame, with and without
PR fxceless#20's DXC fallback.
@marquezinii

Copy link
Copy Markdown
Contributor

Re-ran the current head 14a1f07 on the RTX 5070 (driver 621.40, Windows 11), with dxcompiler.dll/dxil.dll from SDK 10.0.26100:

  • cargo test --workspace: 487 passed, 0 failed, 7 ignored. Both clippy runs (default and --all-features) are clean, and a_root_signature_belongs_to_the_entry_it_sits_on passes.
  • cargo test -p victory-gpu --lib as is: 113 passed. With a local print in compile(), lit now reports no root signature asked and keeps D3DCompile's bytes; main (12), plane (2) and corner ask for one and get it from D3DCompile, so nothing goes to DXC on Windows.
  • Every compile forced through dxc() (local patch, as before): 113 passed, 19 DXC compiles.
  • Forced, with VICTORY_DXC pointing at a folder holding only dxcompiler.dll: 113 passed.

77708e1, pushed since, only changes the README, so this holds for the current head too.

gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The integrated clamp distinguishes ordinary, ahead-of-draw, and
split-dispatch records with a mode mask. Pass the ahead-of-draw bit
for the windowed benchmark so it exercises the same path as the runtime.

Based-on: fxceless/victory-fork#20
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 (benchmark on prior DXC base)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
Pass entry points and profiles through the string-based runtime shader
compiler on the combined branch. This allows the compositor and both
upscaler shaders to use the Wine fallback alongside the explicit root
signatures.

Based-on: fxceless/victory-fork#20
Based-on: ZSlayerHQ/zslayer-pc-port-runtime#10
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 (Series S pipeline tests on the source branch)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The DXC fallback removes the parent module's direct FXC imports, so
the benchmark fails to compile when the fallback is rebased onto the
submit-thread changes. Compile the benchmark's vertex and pixel shaders
through the same helper as the clamps so Wine can supply the vertex
shader's root signature.

Based-on: fxceless/victory-fork#20
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 and vkd3d-proton (3,200-draw benchmark)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The current comparison shader and indirect clamp already use the
DXC fallback. In-flight card fetches still compile independently
through FXC, so Wine can disable them when the compiler rejects
their HLSL or omits the root signature.

Use the same compiler for CARD_FETCH and exercise the resulting
pipeline on the host adapter.

Based-on: gmankab/fxceless-victory@f6e4e06
Based-on: fxceless/victory-fork#20
Based-on: fxceless/victory-fork#648
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The integrated clamp distinguishes ordinary, ahead-of-draw, and
split-dispatch records with a mode mask. Pass the ahead-of-draw bit
for the windowed benchmark so it exercises the same path as the runtime.

Based-on: fxceless/victory-fork#20
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 (benchmark on prior DXC base)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
Pass entry points and profiles through the string-based runtime shader
compiler on the combined branch. This allows the compositor and both
upscaler shaders to use the Wine fallback alongside the explicit root
signatures.

Based-on: fxceless/victory-fork#20
Based-on: ZSlayerHQ/zslayer-pc-port-runtime#10
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 (Series S pipeline tests on the source branch)
Assisted-by: gpt-6.2 sol xhigh
@Filip722

Copy link
Copy Markdown

I reproduced a remaining direct D3DCompile call on main 9c184b3 with #20 at d4a36b1. Host::make_card_inflight returned E_FAIL and fell back to the older fetch path with VICTORY_CARD_FETCH_INFLIGHT=1.

I used the same synthetic D3D12 constructor test and a 1 MiB fetch pool for both builds on Bazzite 44, RTX 5060 Laptop 8 GB, NVIDIA 615.78.08, GE-Proton11-14 and vkd3d-proton cae8353ed7959c4+. The direct call failed 1/1. Routing CARD_FETCH through compile(CARD_FETCH, "main", "cs_5_1") and passing the returned bytes to root signature and compute pipeline creation passed 1/1 on the physical RTX. The test exercised pipeline and buffer creation. The ordinary fetch fallback stays in place on error.

Test and report prepared with assistance from OpenAI Codex.

gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The DXC fallback removes the parent module's direct FXC imports, so
the benchmark fails to compile when the fallback is rebased onto the
submit-thread changes. Compile the benchmark's vertex and pixel shaders
through the same helper as the clamps so Wine can supply the vertex
shader's root signature.

Based-on: fxceless/victory-fork#20
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 and vkd3d-proton (3,200-draw benchmark)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The current comparison shader and indirect clamp already use the
DXC fallback. In-flight card fetches still compile independently
through FXC, so Wine can disable them when the compiler rejects
their HLSL or omits the root signature.

Use the same compiler for CARD_FETCH and exercise the resulting
pipeline on the host adapter.

Based-on: gmankab/fxceless-victory@f6e4e06
Based-on: fxceless/victory-fork#20
Based-on: fxceless/victory-fork#648
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The integrated clamp distinguishes ordinary, ahead-of-draw, and
split-dispatch records with a mode mask. Pass the ahead-of-draw bit
for the windowed benchmark so it exercises the same path as the runtime.

Based-on: fxceless/victory-fork#20
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 (benchmark on prior DXC base)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
Pass entry points and profiles through the string-based runtime shader
compiler on the combined branch. This allows the compositor and both
upscaler shaders to use the Wine fallback alongside the explicit root
signatures.

Based-on: fxceless/victory-fork#20
Based-on: ZSlayerHQ/zslayer-pc-port-runtime#10
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 (Series S pipeline tests on the source branch)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The DXC fallback removes the parent module's direct FXC imports, so
the benchmark fails to compile when the fallback is rebased onto the
submit-thread changes. Compile the benchmark's vertex and pixel shaders
through the same helper as the clamps so Wine can supply the vertex
shader's root signature.

Based-on: fxceless/victory-fork#20
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 and vkd3d-proton (3,200-draw benchmark)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The current comparison shader and indirect clamp already use the
DXC fallback. In-flight card fetches still compile independently
through FXC, so Wine can disable them when the compiler rejects
their HLSL or omits the root signature.

Use the same compiler for CARD_FETCH and exercise the resulting
pipeline on the host adapter.

Based-on: gmankab/fxceless-victory@f6e4e06
Based-on: fxceless/victory-fork#20
Based-on: fxceless/victory-fork#648
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The integrated clamp distinguishes ordinary, ahead-of-draw, and
split-dispatch records with a mode mask. Pass the ahead-of-draw bit
for the windowed benchmark so it exercises the same path as the runtime.

Based-on: fxceless/victory-fork#20
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 (benchmark on prior DXC base)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
Pass entry points and profiles through the string-based runtime shader
compiler on the combined branch. This allows the compositor and both
upscaler shaders to use the Wine fallback alongside the explicit root
signatures.

Based-on: fxceless/victory-fork#20
Based-on: ZSlayerHQ/zslayer-pc-port-runtime#10
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 (Series S pipeline tests on the source branch)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The DXC fallback removes the parent module's direct FXC imports, so
the benchmark fails to compile when the fallback is rebased onto the
submit-thread changes. Compile the benchmark's vertex and pixel shaders
through the same helper as the clamps so Wine can supply the vertex
shader's root signature.

Based-on: fxceless/victory-fork#20
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 and vkd3d-proton (3,200-draw benchmark)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The current comparison shader and indirect clamp already use the
DXC fallback. In-flight card fetches still compile independently
through FXC, so Wine can disable them when the compiler rejects
their HLSL or omits the root signature.

Use the same compiler for CARD_FETCH and exercise the resulting
pipeline on the host adapter.

Based-on: gmankab/fxceless-victory@f6e4e06
Based-on: fxceless/victory-fork#20
Based-on: fxceless/victory-fork#648
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The integrated clamp distinguishes ordinary, ahead-of-draw, and
split-dispatch records with a mode mask. Pass the ahead-of-draw bit
for the windowed benchmark so it exercises the same path as the runtime.

Based-on: fxceless/victory-fork#20
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 (benchmark on prior DXC base)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
Pass entry points and profiles through the string-based runtime shader
compiler on the combined branch. This allows the compositor and both
upscaler shaders to use the Wine fallback alongside the explicit root
signatures.

Based-on: fxceless/victory-fork#20
Based-on: ZSlayerHQ/zslayer-pc-port-runtime#10
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 (Series S pipeline tests on the source branch)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The DXC fallback removes the parent module's direct FXC imports, so
the benchmark fails to compile when the fallback is rebased onto the
submit-thread changes. Compile the benchmark's vertex and pixel shaders
through the same helper as the clamps so Wine can supply the vertex
shader's root signature.

Based-on: fxceless/victory-fork#20
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 and vkd3d-proton (3,200-draw benchmark)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The current comparison shader and indirect clamp already use the
DXC fallback. In-flight card fetches still compile independently
through FXC, so Wine can disable them when the compiler rejects
their HLSL or omits the root signature.

Use the same compiler for CARD_FETCH and exercise the resulting
pipeline on the host adapter.

Based-on: gmankab/fxceless-victory@f6e4e06
Based-on: fxceless/victory-fork#20
Based-on: fxceless/victory-fork#648
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
The integrated clamp distinguishes ordinary, ahead-of-draw, and
split-dispatch records with a mode mask. Pass the ahead-of-draw bit
for the windowed benchmark so it exercises the same path as the runtime.

Based-on: fxceless/victory-fork#20
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 (benchmark on prior DXC base)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 25, 2026
Pass entry points and profiles through the string-based runtime shader
compiler on the combined branch. This allows the compositor and both
upscaler shaders to use the Wine fallback alongside the explicit root
signatures.

Based-on: fxceless/victory-fork#20
Based-on: ZSlayerHQ/zslayer-pc-port-runtime#10
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 (Series S pipeline tests on the source branch)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 26, 2026
The DXC fallback removes the parent module's direct FXC imports, so
the benchmark fails to compile when the fallback is rebased onto the
submit-thread changes. Compile the benchmark's vertex and pixel shaders
through the same helper as the clamps so Wine can supply the vertex
shader's root signature.

Based-on: fxceless/victory-fork#20
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 and vkd3d-proton (3,200-draw benchmark)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 26, 2026
The current comparison shader and indirect clamp already use the
DXC fallback. In-flight card fetches still compile independently
through FXC, so Wine can disable them when the compiler rejects
their HLSL or omits the root signature.

Use the same compiler for CARD_FETCH and exercise the resulting
pipeline on the host adapter.

Based-on: gmankab/fxceless-victory@f6e4e06
Based-on: fxceless/victory-fork#20
Based-on: fxceless/victory-fork#648
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 with vkd3d-proton (previous integration smoke test)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 26, 2026
The integrated clamp distinguishes ordinary, ahead-of-draw, and
split-dispatch records with a mode mask. Pass the ahead-of-draw bit
for the windowed benchmark so it exercises the same path as the runtime.

Based-on: fxceless/victory-fork#20
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 (benchmark on prior DXC base)
Assisted-by: gpt-6.2 sol xhigh
gmankab added a commit to gmankab/marvisak-victory that referenced this pull request Nov 26, 2026
Pass entry points and profiles through the string-based runtime shader
compiler on the combined branch. This allows the compositor and both
upscaler shaders to use the Wine fallback alongside the explicit root
signatures.

Based-on: fxceless/victory-fork#20
Based-on: ZSlayerHQ/zslayer-pc-port-runtime#10
Tested-on: AMD Radeon RX 6800, Fedora Linux 45, Wine 11.0 (Series S pipeline tests on the source branch)
Assisted-by: gpt-6.2 sol xhigh
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.

Linux/Proton: runs with a DXC fallback for the runtime HLSL compiles; 6a2d9f9 stable on RTX 5070 Ti; speed switches under Wine

8 participants