DXVK-2.6.2

Introduction to DXVK

The DXVK package contains DLL files which converts Direct3D 8-11 calls to Vulkan. By default in Wine, Direct3D 8-11 calls are converted to OpenGL calls in a poor manner, leading to bad performance. As such, many people install this package.

[Note]

Note

This may take a while to build. Feel free to do something else while this is building.

DXVK Dependencies

Required

Glslang-15.3.0, MinGW-w64-GCC-15.1.0 (compiled with POSIX thread support), and Wine-10.10

Required (Runtime)

Vulkan-Loader-1.4.313

Downloading DXVK

This package depends on submodules and multiple of them will need to be downloaded. Create a list of the needed tarballs that will be downloaded:

cat > dxvk-2.6.2-list << "EOF"
doitsujin/dxvk/archive/v2.6.2/dxvk-2.6.2.tar.gz
doitsujin/libdisplay-info/archive/275e6459c7ab1ddd4b125f28d0440716e4888078.tar.gz
KhronosGroup/SPIRV-Headers/archive/8b246ff75c6615ba4532fe4fde20f1be090c3764.tar.gz
KhronosGroup/Vulkan-Headers/archive/234c4b7370a8ea3239a214c9e871e4b17c89f4ab.tar.gz
EOF

Download the tarballs using Wget-1.25.0:

mkdir dxvk &&
cd    dxvk &&
grep -v '^#' ../dxvk-2.6.2-list | wget -i- -c \
    -B https://github.com

Installation of DXVK

Extract all the tarballs:

for i in *.tar.?z*; do
  echo "Extracting $i..."
  tar -xf $i
done

Now that the tarballs have been extracted, the submodules need to be moved in place. Do so now:

mv -T libdisplay-info-*                       \
      dxvk-2.6.2/subprojects/libdisplay-info &&
mv -T SPIRV-Headers-*                         \
      dxvk-2.6.2/include/spirv               &&
mv -T Vulkan-Headers-*                        \
      dxvk-2.6.2/include/vulkan

Go into the dxvk-2.6.2 directory:

cd dxvk-2.6.2
[Note]

Note

If you are doing multilib, it is recommended to install 32-bit along with 64-bit DXVK as there are plenty of 32-bit Direct3D applications.

64-bit Installation

Install 64-bit DXVK by running the following commands:

mkdir build-win64 &&
cd    build-win64 &&

meson setup .. --cross-file=../build-win64.txt \
               --buildtype=release             \
               --prefix=$PWD/DESTDIR &&

ninja

Now as the root user:

ninja install &&
cd ..         &&

mkdir   -pv     /usr/lib/dxvk/win64 &&
install -vDm644 build-win64/DESTDIR/bin/*.dll \
                /usr/lib/dxvk/win64

32-bit Installation

Install 32-bit DXVK by running the following commands:

mkdir build-win32 &&
cd    build-win32 &&

meson setup .. --cross-file ../build-win32.txt \
               --buildtype=release             \
               --prefix=$PWD/DESTDIR &&

ninja

Now as the root user:

ninja install &&
cd ..         &&

mkdir   -pv     /usr/lib/dxvk/win32 &&
install -vDm644 build-win32/DESTDIR/bin/*.dll \
                /usr/lib/dxvk/win32

Setting Up DXVK

[Note]

Note

This section requires a running graphical environment. If you are not ready yet, you may skip this section and return back once you are in a graphical environment.

First, create the Wine prefix if it is not already made:

WINEPREFIX=~/.wine wineboot -u
[Note]

Note

wineboot may report an error in the output, but this is normal and frequent. Usually, these errors are non-fatal and you won't need to typically worry about them. Wine is very verbose.

While the DXVK DLL files have been installed, they are not yet in the Wine prefix. Create symlinks so that they can be found by Wine, whilst allowing updating of this package without having to copy everything over again. Along with this, the registry must be updated to use the new DLLs. Do this for each archetecture you have installed.

64-bit Setup

For 64-bit:

for DLL_FILE in /usr/lib/dxvk/win64/*.dll; do
    ln -sfv $DLL_FILE ~/.wine/drive_c/windows/system32/$(basename $DLL_FILE) &&
    DLL_FILE=$(basename $DLL_FILE | sed s/.dll//g) &&
    wine reg add \
        'HKEY_CURRENT_USER\Software\Wine\DllOverrides' \
        /v "$DLL_FILE" /d native /f
done

32-bit Setup

For 32-bit:

for DLL_FILE in /usr/lib/dxvk/win32/*.dll; do
    if [ ! -d ~/.wine/drive_c/windows/syswow64 ]; then
        ln -sfv $DLL_FILE ~/.wine/drive_c/windows/system32/$(basename $DLL_FILE)
    else
        ln -sfv $DLL_FILE ~/.wine/drive_c/windows/syswow64/$(basename $DLL_FILE)
    fi
    DLL_FILE=$(basename $DLL_FILE | sed s/.dll//g) &&
    wine reg add \
        'HKEY_CURRENT_USER\Software\Wine\DllOverrides' \
        /v "$DLL_FILE" /d native /f
done

Command Explanations

[Note]

Note

Inspect meson_options.txt or meson.options for a full list of options.

git checkout v2.6.2: This command switches to a stable release in the commit history.

--cross-file=../build-win{32,64}.txt: This parameter changes what Win archetecture to build for.

--buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

WINEPREFIX=~/.wine wineboot -u: This command creates a Wine prefix and copies over any missing files to it. It will not reset an existing prefix.

wine reg add ...: This command overrides the registry so that Wine will use the new DLL files instead of the old ones.

Contents

Installed Programs: None
Installed Libraries: d3d10core, d3d11, d3d8, d3d9, and dxgi (all DLLs)
Installed Directories: /usr/lib/dxvk/{win32,win64}

Short Descriptions

d3d10core

converts Direct3D 10 calls to Vulkan

d3d11

converts Direct3D 11 calls to Vulkan

d3d8

converts Direct3D 8 calls to Vulkan

d3d9

converts Direct3D 9 calls to Vulkan

dxgi

handles the Direct3D Graphics Infrastructure