After six months of development, a new version of DXVK (Direct3D to Vulkan Translation Layer) has been released. This open library transforms Direct3D 8, 9, 10, and 11 API calls into Vulkan commands. It enables running 3D applications and games developed for Windows on systems lacking native Direct3D support, leveraging the more efficient graphics API Vulkan.
Key changes
The new version has transitioned to using Vulkan 1.4 specifications and extensions, which will require a compatible driver..
DXVK now uses dxbc-spirv for compiling shaders for all supported shader models. This resolves several issues that were previously unmanageable:
Rendering issues in games caused by either reliance on undefined behavior or instances where FXC generates incorrect code, as seen in Postal: Brain Damaged, Snowrunner.
The generated code is more compact than simply converted SPIR-V code, significantly reducing the memory footprint of DXVK. In games like Overwatch or God of War, this results in saving around 1 GB of system memory.
Shader compilation is now fully offloaded to worker threads, which may shorten launch times in games such as Days Gone and Final Fantasy XIV, or in some cases reduce stuttering. Previously, DXVK handled SPIR-V translation in the application thread and only compiled actual Vulkan pipelines on the worker processes.
The intermediate representation of compiled shaders in DXVK is now cached on disk within the AppData/Local directory of the current Wine prefix. This is necessary as the compilation time has increased compared to the old compiler. The path to the cache can be changed using the environment variable DXVK_SHADER_CACHE_PATH.
The new Vulkan extension VK_EXT_descriptor_heap is now used by default in drivers that support it.
It is expected that this new binding model will provide roughly the same level of CPU-related performance compared to the old implementation based on VK_EXT_descriptor_buffer, all while avoiding performance drops on Nvidia GPUs (requires nvidia-drivers-595.84 or newer).
Changes in D3D9
To emulate the legacy fixed-function pipeline that allows D3D8 and D3D9 games to render without shaders, DXVK previously generated its own shader code on-the-fly based on pipeline state. In some games, such as Unreal Tournament 2004, this could lead to noticeable stuttering even after long periods of gameplay.
To address this, DXVK now implements the fixed-function pipeline as a pair of uber shaders, for which optimized variants are compiled in the background.
Buffer loading optimization
To more accurately match Windows behavior, different types of buffers that were previously placed directly in VRAM are now loaded on demand, and a strategy to limit the amount of RAM used has been implemented, which fixes address space issues in a number of 32-bit D3D9 games.
These changes may also improve performance on systems lacking a resizable BAR in games such as GTA IV.
On systems that sufficiently support VK_EXT_sample_locations and VK_EXT_extended_dynamic_state3, the rendering state D3DRS_MULTISAMPLEANTIALIAS now works correctly, allowing applications to use single-sample rasterization when rendering to multi-sampled render targets. This eliminates UI rendering issues in Anno 1701, Men of War Assault Squad, and similar problems in other games with MSAA enabled.
Common resources now work with the original Wine implementation and no longer require Proton-specific patches.
It's also worth mentioning that numerous fixes for various games have been introduced, which will now perform better.
Source: linux.org.ru
