fix(frontend): turn on native DirectX shader compilers for Warband, Don't Starve Together and EU4 (#2998)

* fix: turn on d3dx9 and D3DCompiler 42 for Mount & Blade Warband

Warband compiles its postFX effects at launch through d3dx9_42. With Wine's
built-in d3dcompiler_42 the launch stops on an error dialog (E5017 'Write pass
assignments', then E5033 'Unknown target profile __fx_2_0__'). The native
d3dx9 and D3DCompiler 42 components fix it, but nothing picked them: Steam's
list for the game does not name them and the folder scan only recommends d3dx9.

* fix: turn on D3DCompiler 43 for Don't Starve Together

Don't Starve Together renders through its bundled ANGLE, which compiles
vs_3_0/ps_3_0 shaders with d3dcompiler_43. With Wine's built-in compiler
the bytecode trips DXVK's SM3 parser (`m_info.kind == OperandKind::eSrcReg`
in sm3_parser.h), the render thread stops after "Renderer initialize: Okay"
and the game sits on a black screen. The native D3DCompiler 43 component
fixes it, but Steam's list for the game does not name it.

* fix: turn on D3DCompiler 43 for Europa Universalis IV

EU4 builds its map effects at launch through native d3dx9_43, which compiles
them with d3dcompiler_43. Wine's built-in d3dcompiler_43 fails the terrain,
border, map name and bloom shaders with E5005 ('No compatible 2 parameter
declaration for GetFoWColor'), so the map draws black and province names show
as white blocks. Steam's list for the game names only d3dx9; turning on the
native D3DCompiler 43 component as well fixes the map.

* test: keep one per-game redist test, the one that also covers Steam's d3dx9 pick

The Warband and Don't Starve Together tests only restated their SCRIPTED rows;
Skyrim's test already covers how SCRIPTED picks are added.
This commit is contained in:
xlulx authored and GitHub committed 2026-11-24 16:16:45 -05:00
1 parent 76e0460064
commit 86ea861818
2 files changed
+16

No files matched your search

@@ -20,6 +20,12 @@ object SteamRedists {
val SCRIPTED = mapOf(
72850 to listOf("xact" to "DirectX XACT audio"),
489830 to listOf("xact_x64" to "DirectX XACT audio (64-bit)"),
// Warband compiles its postFX .fx effects at launch through d3dx9_42; Wine's own d3dcompiler_42 stops with E5017/E5033 on fx_2_0.
48700 to listOf("d3dx9" to "DirectX 9 (d3dx9)", "d3dcompiler_42" to "D3DCompiler 42"),
// DST's bundled ANGLE compiles SM3 shaders through d3dcompiler_43; DXVK's SM3 parser asserts on what Wine's own one emits.
322330 to listOf("d3dcompiler_43" to "D3DCompiler 43"),
// EU4 builds its map effects through native d3dx9_43, which calls d3dcompiler_43; Wine's own one fails them with E5005, so the map draws black.
236850 to listOf("d3dx9" to "DirectX 9 (d3dx9)", "d3dcompiler_43" to "D3DCompiler 43"),
)
private val BLOCK = Regex("\"SharedDepots\"\\s*\\{([^}]*)\\}", RegexOption.IGNORE_CASE)
private val ENTRY = Regex("\"(\\d+)\"\\s+\"\\d+\"")