Wine: DXC fallback for host shaders (Series S stretch builds without a patch); 152 world frames at 4.0 fps median 215 ms on 8 GB #1270
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#1270
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@YaBulochka on GitHub · 2026-11-26 07:37 UTC · original
Wine: host shaders fall back to
dxcompiler.dllwhenD3DCompilerefuses them — the Series S stretch then builds without a hand-written HLSL patch, and the Series S profile holds ~4 fps on an 8 GB cardTwo Wine-only gaps were costing us shaders, and one fallback closes both. Reporting the technique and the numbers, since they also apply to anyone else running this on Proton/RADV.
Build:
maind510ee4+ #1052 + #1011 + #1010 + #1054, plus the remap lock split (neutral here) and the fallback below;x86_64-pc-windows-gnu,--features diagnostics.Environment: CachyOS kernel 7.3.5, Ryzen 5 9600X, 30 GB, Radeon RX 7600 XT 8 GB, RADV (Mesa 27.0.0), Wine 11.22, vkd3d-proton built from master,
dxcompiler.dll/dxil.dll1.9.2609 next to the executable, retail 1.0.2.1.The fallback. In
host::compile, whenD3DCompilefails, the same source is compiled throughdxcompiler.dllas<stage>_6_0(DxcCreateInstance+IDxcCompiler3::Compile,DXC_OUT_OBJECTfor the blob,DXC_OUT_ERRORSlogged).VICTORY_DXC=1forces it for testing; otherwise it only runs after a failure, so Microsoft-compiled paths are unchanged on Windows.What it fixed:
corner/over(vs_5_1/ps_5_1)vs_6_0,ps_6_0cs_5_1,GetDimensionson aRWTexture2D)E5005, thenno pass to stretch the upscaler's input, black 3Dcs_6_0,the upscaler's output is made by a plain stretch, pictureWith the fallback in place I reverted the hand-written stretch patch (sizes as constants) and the Series S profile still draws, so that patch is no longer needed in our tree.
Throughput, Series S, 152 consecutive world frames (draws > 1,000, so menus do not flatter the average):
Menus stay at 30 fps. VRAM averages 4.6 GB and peaks at 6.1 GB on Series S (Series X peaks at 7.2 GB); GPU busy is 7-16% and 29-81 W, so the remaining cost is still CPU-side preparation, not the card.
One more Wine-only gap, for completeness: without
VICTORY_TEXTURE_BUDGET_MBset,room()inresource.rsrefuses host copies once the card is 90% full, so on an 8 GB card 5,438 textures (7,045 MB) never get one and everything samples a placeholder.VICTORY_TEXTURE_BUDGET_MB=4096took that to 369 and the textures appear.Would you take the fallback as a PR? It is one function plus the COM plumbing; TobiasFornell confirmed the same approach independently on a 9070 XT under Proton (Belobug#183), so there would be two testers.
No game files, dumps or screenshots are included; numbers and technique only.