Vulkan-based implementation of D3D9, D3D10 and D3D11 for Linux / Wine
If supported by the driver, DXVK will now use the VK_NV_raw_access_chains
extensions to allow more efficient shader code generation on specifically on Nvidia GPUs. This is intended to close the gap to Windows performance drivers specifically in D3D11 games in GPU-bound scenarios, but not all games will see an improvement.
Note: This extension is currently only supported on Vulkan beta drivers, version 550.40.55 or later, and currently requires Proton Experimental.
DXGI_FORMAT_R16G16B16A16_FLOAT
swap chains.dxgi.syncInterval
option to also apply to D3D12 games.VK_FORMAT_A8_UNORM
due to rendering issues in some games.VkApplicationInfo::applicationVersion
field to 1.dxvk.ignoreGraphicsBarriers
option to increase performance in case neither NVAPI nor AGS are loaded.Note: Updated binaries due to buggy version number display.
sha256: 3d8e73e574bc0666aa965ddb37c7e4126f831d2d82c4068740fe1463075b4c76
If VK_KHR_present_wait
is supported, and if vertical synchronization is enabled, frame latency events will now be signaled when an image is actually being presented, rather than when rendering work prior to the present request has completed on the GPU. This may reduce input latency in some games, also affects the dxgi.maxFrameLatency
and d3d9.maxFrameLatency
options.
This functionality is also used to more accurately report the number of frames actually presented via DXGI frame statistics.
Note: On some platforms and compositors, Vulkan present events may not correspond to the image actually being presented on screen, in which case frame latency is going to remain higher than expected.
Additionally, if VK_EXT_swapchain_maintenance1
is supported, enabling and disabling vertical synchronization may no longe require recreating the Vulkan swap chain, which works around severe performance issues in games which change their present interval on a per-frame basis.
Note: On Linux, this is currently only supported when running Gamescope with ENABLE_GAMESCOPE_WSI=1
set.
The dxgi.nvapiHack
config option was deprecated, and a new option dxgi.hideNvidiaGpu
with a slight change in behaviour was added instead, alongside similar options for AMD and Intel GPUs. This allows implementing more targeted application workarounds for issues with e.g. XESS libraries in the future if necessary. Refer to the example configuration for more details.
Note: The old dxgi.nvapiHack
option still works if dxgi.hideNvidiaGpu
is not set, but will be removed in a future release.
Additionally, the dxgi.tearFree
and d3d9.tearFree
options were consolidated into a new dxvk.tearFree
option, due to changes in the presentation logic. The old options were removed.
DXVK_CONFIG
. See the README for details (PR #3581).VK_EXT_depth_bias_control
is supported, depth bias scaling will now be correct in most situations. This fixes shadow rendering artifacts in various D3D9 games and is especially important on GPUs that do not support 24-bit depth formats. This affects games such as F.E.A.R. (#1461), Far Cry 2 (#2941) and Assassin's Creed Brotherhood (#2642).VK_EXT_line_rasterization
and its relevant features are supported, smooth or rectangular lines will now be used if requested by the application. This functionality is generally not used by games, but may be useful for applications such as level editors.VK_KHR_maintenance5
is supported, DXGI_FORMAT_A8_UNORM
images will now use the corresponding Vulkan format.In order to enable D3D12 support in recent Unity Engine titles such as Lego Builder's Journey, this release introduces support for creating D3D11 devices from a D3D12 device using D3D11On12CreateDevice, as well as the basic ID3D11On12Device interface. This is achieved by importing the Vulkan device and resource handles from vkd3d-proton into DXVK, and otherwise uses DXVK's existing D3D11 implementation.
A vkd3d-proton
build as of https://github.com/HansKristian-Work/vkd3d-proton/commit/26c4fed09b14530a4cf1bbcca79a102a8908158a or later is required for this to work.
DXVK now supports presenting to parts of a window by copying the contents of the backbuffer to system memory and then drawing them into the window on the CPU. This improves compatibility with game launchers, particularly those based on Microsoft's WPF toolkit, and some visual novels. It will however come with a noticable performance hit.
Additionally, overall behaviour of D3D9 swap chains was improved and the d3d9.noExplicitFrontBuffer
option was removed.
When running on Proton or plain Wine, DXVK will no longer create log files by default and instead only write log messages to the console using wine-specific functionality, in order to avoid creating unnecessary extra files. This matches vkd3d-proton behaviour. Note that log file creation can be re-enabled by setting the environment variable DXVK_LOG_PATH
to a valid path.
When filing bug reports, users are encouraged to upload the full Proton log.
QueryInterface
will only be logged once in order to avoid growing log files indefinitely in some games. (#3231)VK_EXT_extended_dynamic_state3
features to avoid hitting slow paths on some drivers.On systems supporting HDR10 color spaces, HDR can now be enabled by setting the environment variable DXVK_HDR=1
, or by setting the option dxgi.enableHDR = True
in the configuration file. When using vkd3d-proton 2.8 or newer, this will allow D3D12 games to detect and use the HDR10 color space if they support it.
No major Linux desktop environment currently supports HDR. In order to use this on Linux, a Gamescope session with --hdr-enabled
is required. This is currently only supported under AMDGPU and requires kernel patches from the josh-hdr-colorimetry branch.
Note: D3D11 support is implemented, but not expected to work in most games as they typically require AMDAGS or NVAPI to set up HDR output, rather than using the corresponding DXGI APIs. Additionally, only Nvidia drivers are expected to work on Windows.
Use of pipeline libraries was extended to pipelines with tessellation or geometry shaders in order to further reduce stutter. Additionally, more features of the VK_EXT_extended_dynamic_state3
extension are leveraged to reduce stutter in some situations when MSAA is used, provided that the Vulkan driver supports them.
Note: Current development builds of RADV will expose VK_EXT_graphics_pipeline_library
with the features that DXVK needs if the RADV_PERFTEST=gpl
environment variable is set. Note that the implementation is not yet complete and does not support shader caching at this time, but it should generally work with DXVK.
For older games that support MSAA, the d3d9.forceSampleRateShading
and d3d11.forceSampleRateShading
options were added to let users enable sample rate shading for all shaders. This will have a very high impact on GPU-bound performance, but may increase overall image quality in certain games that suffer from specular aliasing or shimmering alpha-tested geometry.
Note: Games that resolve the rendered images inadequately (e.g. performing a linear resolve on HDR render targets) will likely not benefit from this option.
For native Linux builds of DXVK, a GLFW backend was added as a compile-time alternative to the existing SDL2 backend. See PR #3111 for details.
DXGI_FORMAT_A8_UNORM
UAVs. Note that UAVs of this format may not work as expected.winevulkan.dll
directly instead of the actual Vulkan loader.
Note that this change will break Red Dead Redemption 2 with dxvk-nvapi prior to this commit: https://github.com/jp7677/dxvk-nvapi/commit/ac00a42fb6355d6e940b520341b670097c586438
EXT_graphics_pipeline_library
support.Note: The setup script setup_dxvk.sh
was no longer deemed useful and got removed. This change will only affect users who manually install DXVK into a wine prefix, rather than using it through Proton or Lutris.
Note: Due to changes to our DXGI implementation, older versions of vkd3d-proton (prior to 2.8) will no longer work with this version of DXVK.
A Vulkan 1.3 capable driver and wine version are required to run this version of DXVK. See the driver support page for details.
Many features in this release, especially the shader compilation changes detailed below, require the use of modern Vulkan features, such as Dynamic Rendering, Extended Dynamic State, and Null Descriptors. Due to the significant changes required to make use of them, it was no longer practical to maintain and test code paths for older drivers which do not support these features.
In practice, any system capable of running D3D11 and D3D12 games using Proton Experimental right now will be able to run DXVK 2.0.
Note: Third-party Vulkan layers that were not updated for Vulkan 1.3 will no longer work.
In order to reduce the likelihood of running out of address space in 32-bit D3D9 games, DXVK will now use memory-mapped files to store shadow copies of textures. This allows us to unmap memory that is not being used by the game, thus freeing up significant amounts of address space, up to several hundred Megabytes. See PR #2663 for implementation details.
Note: This change does not affect 64-bit games since address space is not a concern there. It also does not affect D3D10 or D3D11 since resource uploads work differently in those APIs and are much more memory efficient.
On drivers which support VK_EXT_attachment_feedback_loop_layout
, reading from an active render target in D3D9 games is now properly supported, which previously caused rendering artifacts on newer AMD hardware and required driver-level workarounds. This affects a number of games, including GTA IV.
The D3D9 alpha test implementation was changed to more closely match the behaviour of Nvidia's implementation, which fixes inaccuracies in various games. The d3d9.alphaTestWiggleRoom
option was removed, and games that previously required this option should now work correctly by default.
DXVK previously shipped incomplete implementations of d3d10.dll
and d3d10_1.dll
, but has not installed them by default since Version 1.6 since wine's implementation provides more features that are needed for D3D10 games to run, including the D3D10 Effects framework.
Since our implementation is incomplete and has not been used by Proton or Lutris for a very long time, DXVK will no longer ship these DLLs starting with this release. The D3D10 API itself is still supported via d3d10core.dll
.
DXVK now exposes D3D11 Feature Level 12_1 with the following newly added features:
While no games are known to use these features directly in D3D11, some games and game launchers rely on feature support being consistent between D3D11 and D3D12 in order to allow users to enable D3D12 in the game options. While our implementation of these feature is generally functional, there may be bugs or performance issues in case a game does use them.
Furthermore, DXVK now supports the D3D11_FEATURE_SHADER_CACHE
and D3D11_FEATURE_D3D11_OPTIONS5
feature queries.
Note: AMD Vulkan drivers do currently not support fragment shader interlock and are limited to feature level 12_0.
Note: Intel's ANV driver currently does not support the corresponding Vulkan features and is therefore limited to feature level 11_1. This applies to both DXVK and vkd3d-proton.
The implementations of ID3D11DeviceContext
were refactored so that immediate contexts and deferred contexts no longer use common entry points. This is closer to Windows behaviour and may improve compatibility to third-party libraries and mods that hook into the D3D11 immediate context specifically, and reduces CPU overhead since some frequently used code paths are now more specialized for each context type.
State clear and restore methods were optimized to further reduce CPU overhead in games that heavily use deferred contexts, e.g. Assassin's Creed: Origins, or explicitly call ClearState
frequently, e.g. God of War.
On drivers which support VK_EXT_graphics_pipeline_library
, including the IndependentInterpolationDecoration
feature, Vulkan shaders will now 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.
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: The relevant Vulkan features are currently only supported by Nvidia drivers (version 520.56.06 or later). Driver support is expected to improve in the future.
This feature largely replaces the state cache. If the given Vulkan features are supported, only pipelines that cannot use the pipeline library feature (e.g. pipelines using tessellation shaders) will be written to and read from the state cache, so newly created state cache files will typically only contain a few dozen to a few hundred pipelines, as opposed to thousands or tens of thousands. If the graphics pipeline library feature is not supported, the state cache will be used the same way as it was in older DXVK versions.
Note: State cache files created with DXVK versions prior to 1.4.3 can no longer be used.
Note: Despite our efforts, due to the significant changes under the hood, there may be issues when using an older state cache file under some circumstances. If you experience crashes, please test if the game runs with a clean cache file (DXVK_STATE_CACHE=reset
) before reporting a bug.
__GL_SHADER_DISK_CACHE_SKIP_CLEANUP=1
, or setting a new limit manually via __GL_SHADER_DISK_CACHE_SIZE
(in bytes).Work from dxvk-native has been upstreamed in order to facilitate native Linux builds of DXVK, which can be used as a drop-in replacement to port D3D applications without having to change rendering code.
Note: When porting a D3D11 application, please refer to the Feature support and Developer Guidelines pages on the Wiki to avoid hitting unsupported or slow code paths in DXVK.
As part of cleaning up the repository, test applications that were of limited usefulness, as well as our custom d3dcompiler frontends, have been moved to the new dxvk-tests repository.
Vulkan and SPIR-V headers are now pulled in as submodules from the original repositories. This changes how the repository needs to be cloned and updated, or otherwise building DXVK will fail:
git clone --recursive https://github.com/doitsujin/dxvk.git
# Run the following command to make git pull
# automatically pull in submodule updates
cd dxvk
git config submodule.recurse true
The project wiki was also updated and expanded to be more useful.
WriteToSubresource
and ReadFromSubresource
methods.DXGI_FORMAT_A8_UNORM
(D3D11) or D3DFMT_A8
(D3D9) render targets with blending enabled.DXVK_STATE_CACHE
environment variable, see the README
for details.DXVK_PERF_EVENTS
environment variable to DXVK_DEBUG
, see the README
for details.Special thanks to @Blisto91 for doing a significant amount of testing during development.
This is a minor maintenance release for an upcoming Proton release. New Vulkan extensions are not yet required.
d3d11.ignoreGraphicsBarriers
option to work around some GPU-bound performance issues.VK_EXT_non_seamless_cube_map
extension if supported by the driverd3d11.samplerAnisotropy
option would apply to the wrong kind of samplersd3d11.cachedDynamicResources
option to work around performance issues (PR #2709)Implemented initial support for shared resources (PR #2516). This fixes video playback in a number of Koei Tecmo games (Atelier series, Nioh 2), as well as the D3D11-based UI in the Windows version of Black Mesa. The required wine patches are currently only available in Proton Experimental. This feature will not be supported on Windows systems.
This feature is still experimental and has not been thoroughly tested on all graphics drivers, so issues are to be expected. Currently, only basic 2D texture sharing between D3D9 and D3D11 is supported when using DXVK for both APIs. API features that are currently not supported include:
IDXGIKeyedMutex
. Documentation is very poor and it's not clear how an implementation is supposed to behave.Note: The Black Mesa UI flickers heavily when the game is not GPU-bound. This also happens on Windows to some degree and is a game bug.
DXVK_ENABLE_NVAPI
to bypass the vendor ID override. Setting it to 1
behaves exactly the same as setting dxvk.nvapiHack = False
in the config file, but may allow for better integration into Lutris or the Proton launch script. (#2544)DXGI_FORMAT_R11G11B10_FLOAT
images that can also be used with unordered access views.d3d11.cachedDynamicResources = a
to work around severe performance issues.d3d11.cachedDynamicResources = c
to work around low CPU-bound performance.dxgi.maxFrameLatency = 1
is now set by default to work around this issue.d3d11.maxImplicitDiscardSize
option.D3D11On12CreateDevice
stub so applications using this don't immediately crash (PR #2485).
Note that supporting D3D11on12 is currently not viable.Replaced the previous d3d11.apitraceMode
option with d3d11.cachedDynamicResources
, which provides a more granular way to specify resource types to allocate in cached system memory. Refer to the example dxvk.conf
for details. This change was not made for the equivalent D3D9 option yet.
Normally, D3D11_USAGE_DYNAMIC resources are expected to be write-only from the CPU and read-only from the GPU, but despite this, some games perform CPU-side reads on the mapped memory, which can cause severe performance degradation since those reads would have to go over PCI-E, or at least uncached write-combined memory. This is especially problematic on systems with Resizeable BAR and can cause issues even on Windows D3D11 drivers.
Games that will use this option by default include Age of Empires 2: Definitive Edition (#2491), Anno 1800, Final Fantasy XIV, Nier Replicant, The Evil Within (PR #2522), and all games that previously had d3d11.apitraceMode
enabled by default.
This is a small maintenance release in preparation for upcoming Proton versions.
dxvk.shrinkNvidiaHvvHeap
option is enabled (#2438).