The d3d12.dll contained in the Wow installation directory makes it crash when running with VKD3D

Questions about Wine on Linux
Post Reply
SwimmingTiger
Newbie
Newbie
Posts: 2
Joined: Fri Oct 18, 2019 5:27 am

The d3d12.dll contained in the Wow installation directory makes it crash when running with VKD3D

Post by SwimmingTiger » Wed Sep 16, 2020 1:38 am

I installed VKD3D, so I put its "d3d12.dll" to the "system32" directory and set the DLL override "d3d12" to "native then builtin".

It works well with other DX12 games, except World of Warcraft. The problem is that the World of Warcraft installation directory (_retail_) contains its own "d3d12.dll" (used to provide user mode D3D12 in Windows 7). So when I set "d3d12" as "native then builtin", wine will load this "d3d12.dll" instead of the right one located in "system32". The DLL obviously cannot run normally in wine, so the game will just crash.

I know two simple solutions, but neither is good:
1. Delete "d3d12.dll" in the World of Warcraft installation folder.
2. Replace this dll with "d3d12.dll" of VKD3D.

The problem is that both of these need modify the game installation files. This brings up the following problems:
1. Every time the game is updated, the launcher will regenerate "d3d12.dll" which we don't want. Then we need to delete or replace again.
2. Due to issue 1, the process of deleting or replacing "d3d12.dll" cannot be automated by script (such as Lutris). When a Lutris user directly launches the game after downloading / updating it via the launcher, the game will crash and the Lutris client did not have the right time to intervene in the process.

So, can wine provide a way to control the native DLL loading order? Or does such a method already exist? I have two native dlls, one in "system32" and one in the game installation folder. Can I set environment variables or registry keys to make wine only load the native dll in "system32" and ignore the one in the game installation folder?

SwimmingTiger
Newbie
Newbie
Posts: 2
Joined: Fri Oct 18, 2019 5:27 am

Re: The d3d12.dll contained in the Wow installation directory makes it crash when running with VKD3D

Post by SwimmingTiger » Wed Sep 16, 2020 8:30 pm

I got VKD3D from here:

https://github.com/lutris/dxvk/releases

It is compiled to native dll "d3d12.dll", just like DXVK's "d3d11.dll".

Post Reply