The Windows-game "Monster Girl Island" running under WINE with DXVK for 3D rendering.
|Original author(s)||Philip "doitsujin" Rebohle|
|Developer(s)||Philip "doitsujin" Rebohle with a little help from Joshua-Ashton|
DXVK is a DirectX 9, 10 and 11 to Vulkan translation layer for Wine. It performs a lot better than Wine's built-in DX9-11 translayer and it has better compatibility with games, scene demos and other graphical programs using DX9 to 11. It is something you definitively want to install if you run games and other graphical applications in Wine.
DXVK is written in C++. It is free software under the zlib License.
DXVK is a lot faster than the DX to OpenGL translation layer built into Wine. Wine's built-in translation layer will typically provide 70-80% of the performance DXVK offers. It is simply a more efficient translation layer using a more efficient graphics API.
How much faster DXVK will be will depend on the game, but it is generally a lot faster. Do note that it will only affect games using DX 9 to 11, it will not be used for applications using the DX12, OpenGL and Vulkan APIs directly.
The FINAL FANTASY XIV: Stormblood benchmark does not only show that DXVK is faster, it also illustrates differences in compatibility. There are many visible rendering errors when Wine's built-in translation layer is used that are not when DXVK is enabled.
See Wine 6.3 Built-in vs DXVK 1.8: A Comparison Of Two Very Different DirectX Implementations for a comparison of several applications done in March 2021.
Verdict And Conclusion
DXVK makes Wine a lot better. It's that simple. The benchmarks we have done have revealed that:
- DXVK really is a lot faster, and
- it is also more compatible
There is simply no reason to use Wine's built in DX to OpenGL translation layer when DXVK exists - unless you are a purist who mind that DXVK is written in C++, not beautiful clean C like Wine and Wine's DX to OpenGL translation layer is. The underlying C code does not provide any performance-advantage in this case, so it isn't a worthwhile factor unless you are religious about those sorts of things.
There are packages for it available in the repositories of several Linux distributions.
WINEPREFIX=$HOME/.wine setup_dxvk install
Fedora users can install it system-wide with
dnf install wine-dxvk wine-dxvk-d3d9 . It is enabled automatically if those packages are installed.
It is also possible, and fairly easy, to install DXVK directly into a
.wine folder. You will need to get a tarball from the DXVK releases page at github.com/doitsujin/dxvk/releases, extract it and run
setup_dxvk.sh within with with
install as an argument (
./setup_dxvk.sh install) and that's it.
Installing from source
|Warning: Make sure you do NOT have any |
The dependencies will be biggest hurdle you will have if you want to install DXVK from source.
Those are Wine, meson, mingw-w64 and mingw-w32, mingw64-winpthreads and mingw32-winpthreads, and glslang.
Fedora users can install them with:
dnf -y install mingw-binutils-generic meson mingw64-gcc-c++ mingw32-gcc-c++ glslang mingw32-winpthreads mingw64-winpthreads mingw32-winpthreads-static mingw64-winpthreads-static
The clone the directory and enter it:
git clone https://github.com/doitsujin/dxvk.git cd dxvk/
..and now comes the somewhat unusual part. DXVK is built by running a script called
package-release.sh with the argument
master followed by a folder and, optionally,
--no-package. The script will create a subfolder named
dxvk-master within the folder you specify.
You may want to build and install it in your
.wine directory. It can, in that case, be built by running:
./package-release.sh master $HOME/.wine/ --no-package
A folder named
$HOME/.wine/dxvk-master will be created if it builds successfully. That folder will contain a script called
setup_dxvk.sh along with two folders:
x64. You can enter that folder and run
setup_dxvk.sh install to make Wine use your shiny new DXVK build.
package-release.sh build script will complain that
$HOME/.wine/dxvk-master exists if you update the source tree with
git pull and run it again, so you will have to eradicate the target folder between compilations.
DXVK comes with it's own built-in heads up display. It can be used to show frame-count and other information on an overlay.
It can be enabled by setting the environment variable
DXVK_HUD. It can be set to display an array of data including
frametimes and more. See the dxvk github page for all. Setting
DXVK_HUD=devinfo,fps which displays GPU and driver version and framerate. Setting
DXVK_HUD=full enables everything the HUD can show.