DXVK

From Gentoo Wiki
Jump to: navigation, search
Resources

DXVK is a Vulkan-based translation layer for Direct3D 9/10/11 which allows running 3D applications on Linux using Wine.

Requirements


Building from source

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

user $for toolchain in cross-x86_64-w64-mingw32 cross-i686-w64-mingw32; do
   crossdev --stable --libc "~7.0.0" --target ${toolchain}
   echo "EXTRA_ECONF=\"--enable-threads=posix\"" >> /etc/portage/env/mingw-gcc.conf
   echo "${toolchain}/gcc mingw-gcc.conf" >> /etc/portage/package.env/mingw
   echo "${toolchain}/mingw64-runtime libraries" >> /etc/portage/package.use/mingw
   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, revert edits to /etc/portage/env/mingw-gcc.conf, /etc/portage/package.env/mingw, and /etc/portage/package.use/mingw before retrying otherwise 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 eapp-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

External resources

References