DXVK
DXVK is a Vulkan-based translation layer for Direct3D 9/10/11 which allows running 3D applications on Linux using Wine.
Requirements
- Wine 3.10 or newer (5.8 or newer recommended)
- Vulkan
- Vulkan capable GPU
- Driver supported by DXVK (With AMD, you can check which driver is used by running lspci -k. If it says that the driver in use is radeon, your system will not be able to use DXVK.)
Building from source
- dev-util/meson (at least version 0.46)
- dev-util/glslang
- Mingw (at least version 6.0)
Installation
From source
Older versions could be compiled with winegcc, a gcc wrapper from wine. However, upstream discourages the use of winegcc and recommends Mingw. Support for winegcc was completely dropped after version 1.6.1.
app-emulation/dxvk is available from the unofficial repositories “FireBurn” (mingw & winegcc), “ppfeufer-gentoo-overlay” (mingw & winegcc), “tastytea” (mingw) and “thegreatmcpain” (mingw & winegcc).[1] See the wiki article about ebuild repositories for how to use them.
Install Mingw for 64 and 32 bit
It is recommended to create a dedicated crossdev repository.
Make sure that mingw64-runtime does not have the
tools
useflag enabled when bootstrapping. See bug #644556.user $
for toolchain in cross-x86_64-w64-mingw32 cross-i686-w64-mingw32; do
crossdev --stable --libc "~8.0.0" --target ${toolchain}
crossdev --stable --libc "~8.0.0" --lenv 'USE="libraries"' \
--genv 'EXTRA_ECONF="--enable-threads=posix"' \
--init-target --target ${toolchain}
emerge --oneshot ${toolchain}/mingw64-runtime
emerge --oneshot ${toolchain}/gcc
done
Add --disable-sjlj-exceptions --with-dwarf2
to EXTRA_ECONF for cross-i686-w64-mingw32/gcc (but not for cross-x86_64-w64-mingw32/gcc) for improved performance.[2][3]
If crossdev generation of the target toolchain should fail, ensure that USE="libraries"
is enabled on ${toolchain}/mingw64-runtime
by simply prefixing the relevant emerge command with env USE="libraries"
, mirroring the application of the USE flag to libc via crossdev's lenv
argument.
Revert edits to /etc/portage/env/mingw-gcc.conf, /etc/portage/package.env/mingw, and /etc/portage/package.use/mingw before retrying, or toolchain generation will fail due to the --enable-threads
flag.
Install DXVK
To include 32-bit bindings:
root #
echo 'app-emulation/dxvk ABI_X86: 64 32' >> /etc/portage/package.use/dxvk
root #
echo 'app-emulation/dxvk' >> /etc/portage/package.accept_keywords/dxvk
root #
emerge --ask app-emulation/dxvk
Pre-built release
Pre-built DXVK binaries are available from the GURU repository.
root #
echo 'app-emulation/dxvk-bin' >> /etc/portage/package.accept_keywords/dxvk
root #
emerge --ask app-emulation/dxvk-bin
Configuration
Lutris
Move/copy all .dll files to ~/.local/share/lutris/runtime/dxvk/x{32,64}.
app-emulation/dxvk:
user $
mkdir -p ~/.local/share/lutris/runtime/dxvk/x{32,64}
user $
cp /usr/lib/dxvk/*.dll ~/.local/share/lutris/runtime/dxvk/x32
user $
cp /usr/lib64/dxvk/*.dll ~/.local/share/lutris/runtime/dxvk/x64
app-emulation/dxvk-bin:
user $
mkdir -p ~/.local/share/lutris/runtime/dxvk/x{32,64}
user $
cp /usr/lib/dxvk-bin/*.dll ~/.local/share/lutris/runtime/dxvk/x32
user $
cp /usr/lib64/dxvk-bin/*.dll ~/.local/share/lutris/runtime/dxvk/x64
Wine
It is recommended to create the ~/.wine-32 or ~/.wine-64 directories for different architectures.
app-emulation/dxvk:
user $
WINEPREFIX=~/.wine-64 setup_dxvk.sh install --symlink
user $
WINEPREFIX=~/.wine-32 setup_dxvk.sh install --symlink
app-emulation/dxvk-bin:
user $
WINEPREFIX=~/.wine-64 setup_dxvk-bin.sh install --symlink
user $
WINEPREFIX=~/.wine-32 setup_dxvk-bin.sh install --symlink