GPU: build our own HLSL with DXC when Wine's compiler refuses it #21
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!21
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/21/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@oeirughrepuiohg on GitHub · 2026-11-24 20:09 UTC · original
oeirughrepuiohg:gpu-dxc-fallback→main· +195 −22 · 5 files · 1 commits · closed without mergingUnder Wine/Proton,
D3DCompileis Wine'sd3dcompiler_47(vkd3d-shader), which has noRWByteAddressBuffermethods. The indirect-argument clamp then fails to build:and every indirect draw and dispatch is dropped, so the world stays black on Linux. Two testers on VIctory #844 (an RTX 5070 Ti and my RTX 4070 Ti) needed a DXC fallback to get this fork's lit first scene under Proton.
What is in it (one commit, on
7b0f736, +195/−22)crates/victory-gpu/src/dxc.rs(new): loaddxcompiler.dll(VICTORY_DXC, besidedxil.dll, else the exe's folder / System32), compile the same HLSL as SM 6.0, sign withdxil.dllwhen the digest is zero. Adapted from Marvisak/VIctory PR #178 by Ortomanic, generalized to any entry point and SM 5.x target.indirect.rs(make_for),host.rs(compile, and the card-compare pass inmake_card_work): whenD3DCompilefails, use the DXC result instead of returning the error. The clamp logs the refusal at info level and warns only if DXC fails too.Cargo.toml: theWin32_Graphics_Direct3D_Dxcfeature ofwindows.On Windows
D3DCompilesucceeds and none of this runs.Tested
cae8353e, DXC 1.9.2609 (dxcompiler.dll+dxil.dllgiven viaVICTORY_DXC). Diag build, cross-compiled forx86_64-pc-windows-msvc.d279e69+ VIctory #454 + this change: the log shows the clamp refused by Wine's compiler and then built by DXC, no further error; indirect work runs (~4000–5000 draws per frame in the world); the first gameplay scene renders lit and is controllable with a pad, ~2 fps (8-minute steady window: avg 1.96 fps, p50 507 ms, p99 624 ms). Two runs, ~25 min each, no device loss.7b0f736): builds forx86_64-pc-windows-msvcin release and in the diag profile, andcargo clippy --release -p victory-gpureports no warnings. (My cross build needs blake3'spurefeature, applied locally only; it is not in this PR.) The runs above used the same change ond279e69; I have not yet run this rebased commit in the game.Not tested
AI use
Claude Code (Claude Opus 5.5) wrote the change, ran the builds and tests on my machine and drafted this description.
🤖 Generated with Claude Code
@oeirughrepuiohg on GitHub · 2026-11-24 20:43 UTC · original
Closing in favour of #20 by @ErRusso, which was opened a few minutes earlier and covers more: the in-place probe and the root signature Wine's compiler drops, with tests. I've posted my in-game results there. Sorry for the duplicate; I missed #20 when I opened this.
Pull request closed