GPU: fall back to DXC for indirect compute shaders #233
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/Belobug--VIctory-Belobug-AMD!233
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-233"
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?
@loyodea on GitHub · 2026-11-26 07:37 UTC · original
loyodea:victory-wine-indirect-compiler→main· +186 −69 · 3 files · 2 commits · openRelated to #183. When FXC fails to compile the indirect clamp or build its pipeline, retry the same HLSL with DXC targeting
cs_6_0. A successful FXC pipeline is still used immediately. The fallback checks the application's directory and System32 or an explicit absoluteVICTORY_DXCpath. The README documents how to supply Microsoft's compiler.Tested
cargo test --locked -p victory-gpu -j 4 --lib -- --test-threads=1 --nocapturereported 114 passed, zero failed, and four ignored. One optional depth-bounds mesh check returned early becauseVICTORY_PC_DXCwas unset.Wine, Proton, and retail gameplay remain unverified. The run used original synthetic fixtures. Codex helped implement, review, and test the patch.
@adrianmjim on GitHub · 2026-11-26 21:41 UTC · original
Tested on Windows 11 26300 with an RX 7900 XT (RDNA3, driver 32.0.32029.2010) and on WARP. Head
8f11b3d, base main4f62c2a. I did not test Wine or Proton.Native Windows
D3DCompiler_47.dll10.0.26100.9974 builds the clamp, so the fallback never runs.dxcompiler.dllordxil.dll, onlydxilconv.dll. The System32 search finds DXC only if someone copied it there.DXC versions
I pointed
VICTORY_DXCat three builds. Two checks passed with each one: the new test, and a local check on the 7900 XT that builds a root signature and compute pipeline fromcompile_dxc(SOURCE).dxcompiler.dll1.8.2502.11, next to itsdxil.dll.dxil.dll.dxcompiler.dll1.9.0.5512, which ships withoutdxil.dll.The README asks for May 2025 or newer. On native Windows the February 2025 SDK build also worked. I could not check Wine. If Wine needs the newer version, the README could say why.
Tests
VICTORY_DXC, and the PR withVICTORY_DXC. Other jobs were loading the machine. The only failures wereframe::tests::waits_end_on_ticks_and_count_framesandwatch::guard-page tests, which are flaky here under load.frame::test and two otherwatch::tests.watch::tests::a_view_mapped_beside_a_guarded_one_makes_it_check_againfailed only on PR runs. Neither PR touches that code.warp_dxc_fallback_preserves_clamp_and_workerpassed in every run withVICTORY_DXCset.make_compute_pipeline, it fails inWarpHarness::new.VICTORY_DXCit skips and passes, so a plaincargo testdoes not run the fallback.-p victory-gpu --all-targets: the same 56 warnings on base and on the PR.Other host shaders
Neither this PR nor #243 covers these. I only read them; I did not run them under Wine.
rects.rsexpands rectangle lists for indirect draws. Its doc comment says it is compiled "like the argument clamp". It callsLoadandLoad4onRWByteAddressBuffer. #183 shows Wine's compiler rejectingLoadon that type. If the compile fails, the log says "indirect rectangle draws dropped". So under Wine, indirect rectangle-list draws may still be lost with this PR.card.rsCARD_COMPARE_HLSLcallsLoad4on anRWByteAddressBuffer, and card buffers are on by default. I did not check what happens when it fails to compile.rects.rsSOURCEandcard.rsCARD_COMPARE_HLSLthrough this PR'scompile_dxcandpipeline_from_shader. Both compile with the SDK DXC. Their RTS0 matches FXC byte for byte. Both pipelines build on the 7900 XT.make_compute_pipelineshould work forrects.rsas it is, since it has the same{ root, pso }shape.ambient.rscallsGetDimensionson anRWTexture2D<uint>. YaBulochka reported Wine rejecting that method onRWTexture2D<float4>in #183. I did not check this one.Compared with #243
The two PRs change the same lines in
indirect.rsand conflict.LoadLibraryW("dxcompiler.dll"), which uses the default search order. On this machine it loadedC:\VulkanSDK\1.4.363.0\Bin\dxcompiler.dllfrom PATH. This PR searches only the executable's folder and System32, or the absoluteVICTORY_DXCpath.D3DCompilefails. This PR also falls back when root signature or pipeline creation fails. That also covers a Wine compiler that builds the shader but writes no root signature, as #183 describes.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.