• Stars
    star
    833
  • Rank 54,737 (Top 2 %)
  • Language
    C++
  • License
    zlib License
  • Created almost 6 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Direct3D9 to Vulkan layer using the DXVK backend. [Upstreamed to DXVK]

This work has been upstreamed and is continuing development there

This repo is only open for the remaining issues on the tracker

https://github.com/doitsujin/dxvk

DXVK

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

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

How to use

In order to install a DXVK package obtained from the release page into a given wine prefix, run the following commands from within the DXVK directory:

export WINEPREFIX=/path/to/.wine-prefix
./setup_dxvk.sh install

This will copy the DLLs into the system32 and syswow64 directories of your wine prefix and set up the required DLL overrides. Pure 32-bit prefixes are also supported.

The setup script optionally takes the following arguments:

  • --symlink: Create symbolic links to the DLL files instead of copying them. This is especially useful for development.
  • --without-dxgi: Do not install DXVK's DXGI implementation and use the one provided by wine instead. This is necessary for both vkd3d and DXVK to work within the same wine prefix.

Verify that your application uses DXVK instead of wined3d by checking for the presence of the log file d3d11.log in the application's directory, or by enabling the HUD (see notes below).

In order to remove DXVK from a prefix, run the following command:

export WINEPREFIX=/path/to/.wine-prefix
./setup_dxvk.sh uninstall

Build instructions

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

A winelib build can be created by adding the --winelib argument.

Compiling manually

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

The D3D10, D3D11 and DXGI DLLs will be located in /your/dxvk/directory/bin. Setup has to be done manually in this case.

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:

  • devinfo: Displays the name of the GPU and the driver version.
  • fps: Shows the current frame rate.
  • frametimes: Shows a frame time graph.
  • submissions: Shows the number of command buffers submitted per frame.
  • drawcalls: Shows the number of draw calls and render passes per frame.
  • pipelines: Shows the total number of graphics and compute pipelines.
  • memory: Shows the amount of device memory allocated and used.
  • gpuload: Shows estimated GPU load. May be inaccurate.
  • version: Shows DXVK version.
  • api: Shows the D3D feature level used by the application. Does not work correctly for D3D10 at the moment.
  • compiler: Shows shader compiler activity

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

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:

  • DXVK_FILTER_DEVICE_NAME="Device Name" Selects devices with a matching Vulkan device name, which can be retrieved with tools such as vulkaninfo. Matches on substrings, so "VEGA" or "AMD RADV VEGA10" is supported if the full device name is "AMD RADV VEGA10 (LLVM 9.0.0)", for example. If the substring matches more than one device, the first device matched will be used.

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

State cache

DXVK caches pipeline state by default, so that shaders can be recompiled ahead of time on subsequent runs of an application, even if the driver's own shader cache got invalidated in the meantime. This cache is enabled by default, and generally reduces stuttering.

The following environment variables can be used to control the cache:

  • DXVK_STATE_CACHE=0 Disables the state cache.
  • DXVK_STATE_CACHE_PATH=/some/directory Specifies a directory where to put the cache files. Defaults to the current working directory of the application.

Debugging

The following environment variables can be used for debugging purposes.

  • VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation Enables Vulkan debug layers. Highly recommended for troubleshooting rendering issues and driver crashes. Requires the Vulkan SDK to be installed on the host system.
  • DXVK_LOG_LEVEL=none|error|warn|info|debug Controls message logging.
  • DXVK_LOG_PATH=/some/directory Changes path where log files are stored.
  • DXVK_CONFIG_FILE=/xxx/dxvk.conf Sets path to the configuration file.

Troubleshooting

DXVK requires threading support from your mingw-w64 build environment. If you are missing this, you may see "error: 'mutex' is not a member of 'std'". On Debian and Ubuntu, this can usually be resolved by using the posix alternate, which supports threading. For example, choose the posix alternate from these commands (use i686 for 32-bit):

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

More Repositories

1

VPhysics-Jolt

Volt (VPhysics Jolt) is a replacement physics module for the Source Engine.
C++
1,207
star
2

dxvk-native

D3D9/11 but it runs natively on Linux!
C++
404
star
3

dxup

A d3d9 and d3d10 to d3d11 translation layer.
C++
256
star
4

HL2-GamepadUI

Source code for GamepadUI for Half-Life 2 and friends.
C++
107
star
5

Source-PlusPlus

C++
80
star
6

neun-auf-zwoelf

D3D9 wrapper library using Microsoft's D3D9On12 implementation
C++
73
star
7

vkroots

A stupid simple method of making Vulkan layers, at home!
C++
68
star
8

riscv-vscript

A port of mini-rv32ima to VScript (Squirrel 3)
Squirrel
52
star
9

mini-source-sdk

A minified version of Source SDK with support for VS 2022
C++
39
star
10

VAudio-MiniMP3

Replacement MP3 playback module for the Source Engine
C
32
star
11

protongdb

Little helper to run Steam apps under Proton with a GDB debugger
Python
24
star
12

libjobs

A cross-platform, header-only compute-shader-styled job dispatching API written in C++.
C++
20
star
13

frog_utf

Single file C header for UTF-x-to-y conversions + helpers
C
12
star
14

msvc-msbuild-wine-docker

Has MSVC + MSBuild run via Wine in a Linux docker container
Dockerfile
12
star
15

AceOfFrogs

C
9
star
16

arch-mingw-github-action

This action provides a build setup for MinGW-based projects on Arch Linux.
Dockerfile
9
star
17

mingw-directx-headers

A copy of the DirectX Headers from MinGW-64.
C
8
star
18

GamescopeShaders

HLSL
7
star
19

Shadey

A Discord bot that runs shaders
C++
7
star
20

VkLayer_FOOL_printed_surface_cups

An implementation of VK_FOOL_printed_surface
C++
6
star
21

simple_notif_daemon

A simple notification daemon that prints to stdout.
C
5
star
22

minigpt4_docker

A docker container for minigpt4.cpp
Dockerfile
5
star
23

Dolphins

The classic Xbox demo ported to D3D11 Win32
C++
5
star
24

NoiseFrog

An open source plugin and gui for real-time noise cancellation using rnnoise
C++
5
star
25

libvtf-plusplus

C++
5
star
26

SocialLife

Pls fix
4
star
27

SteamworksItemManagementUtility

Allows you to add items to a player via a button in a Tampermonkey userscript.
JavaScript
4
star
28

dxvk-native-sample

C++
4
star
29

website

HolyC
4
star
30

d9vr

C++
4
star
31

quick_kernel_dev_guide

4
star
32

arch-linux-virtio-example

Shell
3
star
33

libvpk-plusplus

C++
3
star
34

maps_creator

Creates texture maps for PBRStandard shader
C
3
star
35

TheGuin2

A Discord bot that isn't terribly made.
C#
3
star
36

TheGuin3

TheGuin3
C#
2
star
37

hexheader

Creates a hexdump of a file to a c header.
C
2
star
38

Containment

Fancy macro containers for C
C
2
star
39

VisualStudio-RegKeys-VPC

Visual Studio project template registry keys to allow VPC to generate sln files when only having a newer platform toolset
2
star
40

libtxc_dxtn-cmake

C
2
star
41

mesa

wip mesa shit by me
C
2
star
42

sdl-touch-test

CMake
2
star
43

jgui

C
2
star
44

gitgud

A little wrapper for git that simplifies some otherwise relatively complex operations
Rust
2
star
45

Image2Shader

Convert images to shaders!
Python
2
star
46

Checkmate

2
star
47

libvpk

C
2
star
48

SteamIconGetter

Get the high resolution .ico file for any public appid
C#
2
star
49

WorkshopItemParser

A little class to extract workshop item data
C#
2
star
50

Fundamental

C
2
star
51

gamescope-type

C
2
star
52

Keychron-Q4-Pro-AnnePro2StyleLayout

2
star
53

frog_hashmap

Single file C header for a decent hashmap implementation
C
2
star
54

Mandelbro

C
1
star
55

what-is-stdout-anyway

What actually is stdout anyway?
C
1
star
56

Vegan-Frogs-from-Outer-Space

Code and resources to NONAGON's Frog Jam 2017 entry.
JavaScript
1
star
57

lookout-docker

1
star
58

Imperative

C++
1
star
59

PointerHelpers

C++
1
star
60

wine-whatever-pkgbuild

Shell
1
star
61

ladspa-sdk

C
1
star
62

DumpWindowStyles

Decodes regular int of window styles -> flags
C
1
star
63

Spirit

A cross-platform 2D game engine using BGFX
1
star
64

ShadeyShadingLanguage

1
star
65

jenkins-steamruntime

1
star
66

Collision

C Crash Handler
C
1
star
67

ranae

C++
1
star
68

Noticord

Go
1
star
69

RegistryTweaks

Batchfile
1
star
70

source-2013-jenkinsfile

1
star
71

Ephemeral

A high-resolution cross-platform time library in C that supports sleeping and "clocks" that can be used to tell you if a certain time has passed since its start.
C
1
star
72

Win8-Initial-Setup-Script

1
star
73

ktest

C
1
star
74

Toad

A very silly 2D Vulkan engine
1
star
75

sphaera

1
star
76

redgpu

1
star
77

blade-symphony-docker

Shell
1
star
78

Broton

Build Proton in Pressure-Vessel
Shell
1
star
79

Gitea-Black-NONAGON

CSS
1
star
80

glfw_extensions

C
1
star
81

git-reflector

Mirror two git repos via a webhook server (useful for Gitlab!)
Lua
1
star
82

steamvr-room-setup-unrestricted

A modded version of the SteamVR Room Setup to remove the size limitations for a minimal play space that exist for absolutely no reason!
1
star