dxvk README

The project's README from github.com/doitsujin/dxvk. As one markdown file: README.md.

DXVK

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

For the current status of the project, please refer to the project wiki.

The most recent development builds can be found here.

Release builds can be found here.

How to use

In order to install a DXVK package obtained from the release page into a given wine prefix, copy or symlink the DLLs into the following directories as follows, then open winecfg and manually add native DLL overrides for d3d8, d3d9, d3d10core, d3d11 and dxgi under the Libraries tab.

In a default Wine prefix that would be as follows:

export WINEPREFIX=/path/to/wineprefix
cp x64/*.dll $WINEPREFIX/drive_c/windows/system32
cp x32/*.dll $WINEPREFIX/drive_c/windows/syswow64
winecfg

For a pure 32-bit Wine prefix (non default) the 32-bit DLLs instead go to the system32 directory:

export WINEPREFIX=/path/to/wineprefix
cp x32/*.dll $WINEPREFIX/drive_c/windows/system32
winecfg

Verify that your application uses DXVK instead of wined3d by enabling the HUD (see notes below).

In order to remove DXVK from a prefix, remove the DLLs and DLL overrides, and run wineboot -u to restore the original DLL files.

Tools such as Steam Play, Lutris, Bottles, Heroic Launcher, etc will automatically handle setup of dxvk on their own when enabled.

DLL dependencies

Listed below are the DLL requirements for using DXVK with any single API.

Notes on Vulkan drivers

Before reporting an issue, please check the Wiki page on the current driver status and make sure you run a recent enough driver version for your hardware.

Online multi-player games

Manipulation of Direct3D libraries in multi-player games may be considered cheating and can get your account banned. This may also apply to single-player games with an embedded or dedicated multiplayer portion. Use at your own risk.

HUD

The DXVK_HUD environment variable controls a HUD which can display the framerate and some stat counters. It accepts a comma-separated list of the following options:

Additionally, DXVK_HUD=1 has the same effect as DXVK_HUD=devinfo,fps, and DXVK_HUD=full enables all available HUD elements.

Logs

When used with Wine, DXVK will print log messages to stderr. Additionally, standalone log files can optionally be generated by setting the DXVK_LOG_PATH variable, where log files in the given directory will be called app_d3d11.log, app_dxgi.log etc., where app is the name of the game executable.

On Windows, log files will be created in the game's working directory by default, which is usually next to the game executable.

Device filter

Some applications do not provide a method to select a different GPU. In that case, DXVK can be forced to use a given device:

Note: If the device filter is configured incorrectly, it may filter out all devices and applications will be unable to create a D3D device.

Debugging

The following environment variables can be used for debugging purposes.

Graphics Pipeline Library

On drivers which support VK_EXT_graphics_pipeline_library Vulkan shaders will be compiled at the time the game loads its D3D shaders, rather than at draw time. This reduces or eliminates shader compile stutter in many games when compared to the previous system.

In games that load their shaders during loading screens or in the menu, this can lead to prolonged periods of very high CPU utilization, especially on weaker CPUs. For affected games it is recommended to wait for shader compilation to finish before starting the game to avoid stutter and low performance. Shader compiler activity can be monitored with DXVK_HUD=compiler.

Note: Games which only load their D3D shaders at draw time (e.g. most Unreal Engine games) will still exhibit some stutter, although it should still be less severe than without this feature.

Build instructions

In order to pull in all submodules that are needed for building, clone the repository using the following command:

git clone --recursive https://github.com/doitsujin/dxvk.git

Requirements:

Building DLLs

The simple way

Inside the DXVK directory, run:

./package-release.sh master /your/target/directory --no-package

This will create a folder dxvk-master in /your/target/directory, which contains both 32-bit and 64-bit versions of DXVK, which can be set up in the same way as the release versions as noted above.

In order to preserve the build directories for development, pass --dev-build to the script. This option implies --no-package. After making changes to the source code, you can then do the following to rebuild DXVK:

# change to build.32 for 32-bit
cd /your/target/directory/build.64
ninja install

Compiling manually

# 64-bit build. For 32-bit builds, replace
# build-win64.txt with build-win32.txt
meson setup --cross-file build-win64.txt --buildtype release --prefix /your/dxvk/directory build.w64
cd build.w64
ninja install

The D3D8, D3D9, D3D10, D3D11 and DXGI DLLs will be located in /your/dxvk/directory/bin.

Build troubleshooting

DXVK requires threading support from your mingw-w64 build environment. If you are missing this, you may see "error: ‘std::cv_status’ has not been declared" or similar threading related errors.

On Debian and Ubuntu, this can be resolved by using the posix alternate, which supports threading. For example, choose the posix alternate from these commands:

update-alternatives --config x86_64-w64-mingw32-gcc
update-alternatives --config x86_64-w64-mingw32-g++
update-alternatives --config i686-w64-mingw32-gcc
update-alternatives --config i686-w64-mingw32-g++

For non debian based distros, make sure that your mingw-w64-gcc cross compiler does have --enable-threads=posix enabled during configure. If your distro does ship its mingw-w64-gcc binary with --enable-threads=win32 you might have to recompile locally or open a bug at your distro's bugtracker to ask for it.

DXVK Native

DXVK Native is a version of DXVK which allows it to be used natively without Wine.

This is primarily useful for game and application ports to either avoid having to write another rendering backend, or to help with port bringup during development.

Release builds are built using the Steam Runtime.

How does it work?

DXVK Native replaces certain Windows-isms with a platform and framework-agnostic replacement, for example, HWNDs can become SDL_Window*s, etc. All it takes to do that is to add another WSI backend.

Note: DXVK Native requires a backend to be explicitly set via the DXVK_WSI_DRIVER environment variable. The current built-in options are SDL3, SDL2, and GLFW.

DXVK Native comes with a slim set of Windows header definitions required for D3D9/11 and the MinGW headers for D3D9/11. In most cases, it will end up being plug and play with your renderer, but there may be certain teething issues such as:

dxvk (doitsujin/dxvk)

Searching Database…

18.3K ·GitHub
What is this?DXVK is a Vulkan-based translation layer for Direct3D 8, 9, 10 and 11. It lets 3D applications and games run on Linux under Wine by translating D3D calls to Vulkan instead of using Wine's built-in wined3d.
So it's not an app I launch — how does it actually hook into my games?It ships as a set of replacement DLLs (d3d8, d3d9, d3d10core, d3d11, dxgi) that a Wine prefix loads in place of Wine's own implementations, so games pick it up automatically at launch.
How do I install it into a Wine prefix?Copy or symlink the 32-bit and 64-bit DLLs into the prefix's system32 and syswow64 directories, then add native overrides for d3d8, d3d9, d3d10core, d3d11 and dxgi in winecfg's Libraries tab. Tools like Steam Play, Lutris, Bottles and Heroic Launcher handle this setup automatically when enabled.
What does my system need to run it?A Vulkan driver recent enough for your hardware — the README points to the wiki's driver status page before filing issues. Only building from source needs more: Wine 10.0+, Meson, Mingw-w64 and glslang.
Can playing online multiplayer games with it get me banned?Possibly — the README warns that manipulating Direct3D libraries in multiplayer games may be considered cheating and can get your account banned, including single-player games with an embedded multiplayer portion. Use at your own risk.
I have two GPUs — can I choose which one it uses?Yes. DXVK_FILTER_DEVICE_NAME selects a Vulkan device by name (substring match) and DXVK_FILTER_DEVICE_UUID by its 32-character UUID, both retrievable with vulkaninfo. A misconfigured filter can leave the app unable to create a D3D device at all.
Does shader compilation cause stutter in games?Less than it used to: on drivers supporting VK_EXT_graphics_pipeline_library, shaders are compiled when the game loads its D3D shaders rather than at draw time, which reduces or eliminates stutter in many games. Unreal Engine titles that load shaders at draw time still stutter somewhat; monitor progress with DXVK_HUD=compiler.
What is DXVK Native?A build of DXVK that runs natively without Wine, mainly for game ports that don't want to write another rendering backend. It requires choosing a windowing backend via the DXVK_WSI_DRIVER variable — SDL3, SDL2 or GLFW — and release builds use the Steam Runtime.
Does it work on Windows too, or only on Linux?Both. It targets Linux and Wine first, but the project's CI builds and tests it on Windows, and the README documents Windows-specific behavior such as log files landing in the game's working directory by default.
How do I remove it from a Wine prefix again?Delete the DXVK DLLs, remove the DLL overrides in winecfg, then run 'wineboot -u' to restore the original Wine DLL files.
Creator
doitsujin
Size
27 MB
Stars
18.3K
Age
9y
Commits · 90 Days