Wine: the argument clamp falls back to DXC (cs_6_0) when d3dcompiler_47 refuses it #243
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!243
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-243"
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?
@TobiasFornell on GitHub · 2026-11-26 09:17 UTC · original
TobiasFornell:dxc-clamp-fallback→main· +52 −5 · 2 files · 1 commits · openFollow-up to #183 (as offered there): when Wine's
d3dcompiler_47refuses the indirect-argument clamp shader, compile the same HLSL with DXC (dxcompiler.dll, beside the executable or system-wide) ascs_6_0instead. The HLSL is unchanged; thecs_6_0container carries the root signature the same way.D3DCompilefails, so Windows behaviour is unchanged.dxcompiler.dllis missing or DXC fails too, the previous error path is kept.crates/victory-gpu/src/indirect.rsand adds theWin32_Graphics_Direct3D_Dxcfeature.Tested only on Linux: CachyOS, RX 9070 XT (RDNA4, RADV), Proton Experimental, on our Belobug-based branch (clamp without the #1011 rewrite): the clamp shaders compile and indirect draws are no longer dropped. On this PR's base (
4f62c2a) it was only build-checked (cargo check -p victory-gpu --target x86_64-pc-windows-msvc).@YaBulochka: this is the clamp case you had not measured; it would make sense to share one DXC helper with your
host::compilefallback.No game files included.
@gut0to on GitHub · 2026-11-26 15:41 UTC · original · reviewed
AI-assisted static review; I inspected the dynamic-load and COM lifetime path, but did not run tests or the game.
@ -120,0 +131,4 @@// SAFETY: loading the compiler and calling its documented entry point// with out pointers of ours; the buffer and arguments outlive the calls.unsafe {let library = LoadLibraryW(w!("dxcompiler.dll"))?;@gut0to on GitHub · 2026-11-26 15:41 UTC · original
LoadLibraryWincrements the module reference count, but this function never callsFreeLibrary. Each fallback compilation therefore keeps anotherdxcompiler.dllreference for the process lifetime, including failures after the load. Could the module handle use an RAII guard that is dropped after the compiler/result objects?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.