Skip to main content

native_d3dx_and_d3dcompiler

Function native_d3dx_and_d3dcompiler 

Source
pub fn native_d3dx_and_d3dcompiler() -> Rule
Expand description

Native, then builtin, for the D3DX and D3DCompiler DLLs in every process.

Wine’s builtins of these DLLs are incomplete. Its d3dx9 returns E_NOTIMPL from ID3DXEffect::SetRawValue for a vector with fewer than 4 columns, so Need for Speed: ProStreet, which sets its sun and ambient colours that way, renders a black scene. Microsoft’s copies, which a game’s DirectX redistributable installs into the prefix or the game ships next to its executable, have what Wine’s lack. Without an override Wine never loads them: it loads a DLL whose version resource names Microsoft as its company builtin first, wherever the file is.

The order is n,b, never n. Where no native copy exists, the prefix holds Wine’s placeholder DLL, and ntdll loads the builtin for a placeholder under n,b; under n the DLL would fail to load. The entry names every D3DX and D3DCompiler DLL Wine builds, since WINEDLLOVERRIDES has no wildcards: d3dx9_24 to d3dx9_43, d3dx10_33 to d3dx10_43, d3dx11_42 and d3dx11_43, d3dcompiler_33 to d3dcompiler_43, d3dcompiler_46 and d3dcompiler_47.

Steam’s and the Social Club’s web helpers ship d3dcompiler_47 in their own folders, so they load that copy native too.

It matches every process, like the other defaults. ntdll keeps the last entry for a module, so a later entry for one of these DLLs, in a * rule or a rule for the program, such as d3dx9_43=b, replaces this one for that DLL. d3dx9_43=default hands it back to the registry and WINEDLLOVERRIDES, as for no_mono_or_gecko: otherwise this entry wins over their entries for the same name.