Wednesday, August 15, 2018

How to Set Up DXVK DirectX to Vulkan implementation on Linux and Windows

Can anyone tell me what is DXVK?

Well, DXVK is a Vulkan-based translation layer for Direct3D 10/11 which allows running 3D applications on Linux using Wine. DXVK also works on Windows 10 as well and the project is still in development phase, so expect more bugs, errors and crashes!



Prequisites
Before you want to install DXVK, make sure that your PC meets the requirements below:

For Linux

1. A PC/laptop with dedicated GPU card, mainly from AMD/Nvidia with non-free drivers installed. Open source drivers may not work.
2. Latest version of Linux desktop, at least linux version 4.10+
3. Latest WINE staging version only, DXVK will not work on stable builds.

For Windows

1. A PC/laptop with dedicated GPU card, mainly from AMD/Nvidia with latest driver version.
2. Updated version of Windows (at least Windows 7 and above)


Installation Steps

A. For Linux desktop OS

1. Install WINE staging version first, the package should be labelled as wine-staging.

2. Download the latest DXVK builds from this site: https://github.com/doitsujin/dxvk

3. Extract DXVK archive file and copy all .dll files into game directory where the executable sits. You will need to copy it according to the CPU architecture type, either 32-bit or 64-bit.

4. Run winecfg and you will required to add the DXVK dll. library files to override it and set all of it as "Native" only.

5. Before running the game, you might want to see the DXVK HUD that clearly verifies that the game is run with DXVK. To do it, just type it below in the terminal:
$ export DXVK_HUD=1
$ wine mygame.exe

or
$ export DXVK_HUD=devinfo,fps
$ wine mygame.exe

or
$ DXVK_HUD=devinfo,fps wine mygame.exe

If you're using steam, just run the command below:

$ export DXVK_HUD=1
$ WINEPREFIX=~/path/to/prefix wine "~/path/to/prefix/drive_c/Program Files(x86)/Steam/Steam.exe"


6. When the game runs, you will see the DXVK HUD displayed on the top left of the screen. Verify the implementation of DXVK by checking at both [game]_d3d11.log and [game]_dxgi.log text files.


B. For Windows OS

1. Install Vulkan SDK from the website here: https://www.lunarg.com/vulkan-sdk/

2. Download the latest DXVK builds from this site: https://github.com/doitsujin/dxvk

3. Extract DXVK archive file and copy all .dll files into game directory where the executable sits. You will need to copy it according to the CPU architecture type, either 32-bit or 64-bit.

4. Launch the game. Verify the implementation of DXVK by checking at both [game]_d3d11.log and [game]_dxgi.log text files.