Shader compiler changes
DXVK now uses dxbc-spirv for shader compilation, replacing the legacy shader translation code for all supported shader models. This fixes a number of issues that were previously impossible to address:
- Rendering issues in games that are caused either by games relying on undefined behaviour, or by FXC generating invalid code in some cases, as seen in Postal: Brain Damaged (#3488) and Snowrunner (see Mesa issue #13251).
- The generated code is more compact than naively translated SPIR-V, which substantially reduces DXVK's memory footprint. In games such as Overwatch or God of War, this can save around 1 GiB of system memory.
- Shader compilation is now fully offloaded to worker threads, which can reduce the start-up time in games such as Days Gone and Final Fantasy XIV, or reduce stutter in some cases. Previously, DXVK would perform the SPIR-V translation on the application thread and only compile the actual Vulkan pipelines on workers.
- DXVK's own intermediate representation of compiled shaders is now cached on disk inside the
AppData/Localdirectory of the current Wine prefix. This is necessary because compile times have increased compared to the old compiler. The cache path can be changed with the environment variableDXVK_SHADER_CACHE_PATH.
Shader Model 1-3 support for D3D9 was implemented by @K0bin.
Note: Outside of specific edge cases, the new compiler is not expected to improve overall performance.
For developers: When making changes to the shader compiler, set DXVK_SHADER_CACHE=0 to avoid loading stale shaders.
Descriptor heaps
The new Vulkan extension VK_EXT_descriptor_heap is now used by default on drivers that support it.
Compared to the older binding model implementation based on VK_EXT_descriptor_buffer, this new model is expected to achieve roughly the same level of CPU-bound performance, while reducing the GPU-bound performance penalty observed on Nvidia GPUs. The descriptor buffer path introduced in DXVK 2.7 is thus deprecated and will be removed in a future release.
Note: For Nvidia drivers, version 595.84 or newer is required for this feature to work. The feature is disabled on older drivers due to performance regressions. DXVK will print the log message info: Binding model: Descriptor heap if the extension is used.
D3D9 changes
Fixed-function pipeline
In order to emulate the legacy fixed-function pipeline that allows D3D8 and D3D9 games to perform rendering without shaders, DXVK previously generated its own shaders code on the fly based on pipeline state. In some games, such as Unreal Tournament 2004, this could lead to noticeable stuttering even after prolonged periods of gameplay.
To fix this, DXVK now implements the fixed-function pipeline as a pair of ubershaders, for which optimized variants are compiled in the background as the game sets up different fixed-function setups. For more details, see PR #5192.
Buffer upload optimizations
In order to more closely match Windows behaviour, various types of buffers that were previously placed directly in VRAM are now uploaded on demand, and a strategy was implemented to limit the amount of memory in flight, which fixes address space-related crashes in a number of 32-bit D3D9 games. See PR #5350 for details.
Note: These changees may also improve performance on systems without Resizeable BAR in games such as GTA IV.
Multisampling render state
On systems that sufficiently support VK_EXT_sample_locations and VK_EXT_extended_dynamic_state3, the D3DRS_MULTISAMPLEANTIALIAS render state now works correctly to allow apps to use single-sampled rasterization while rendering to multisampled render targets. This fixes UI rendering issues in Anno 1701 (#1415), Men of War Assault Squad (#4946), and similar issues in other games with MSAA enabled.
Other changes
Shared resources
Shared resources now work on Wine's upstream implementation, and no longer require Proton-specific patches. (PR #5257).
The legacy path will continue to work for the time being to not unnecessarily break older Proton versions, but will likely be dropped in a future release.
Frame rate limiter
The environment variable DXVK_FRAME_RATE to enable the built-in frame rate limiter was removed. Users are encouraged to use external limiters such as those of Gamescope or Mangohud instead, which will usually provide a smoother experience.
Users that wish to keep using the built-in limiter can use the configuration option dxvk.maxFrameRate = n.
Bug fixes and Improvements
- Fixed a number of minor Vulkan validation errors.
- Fixed various issues with software vertex processing in D3D8/9, including games such as Vietcong or The I of the Dragon. (PR #5656)
- Fixed incorrect D3D8/9 fixed-function fog calculations in some cases. This affects Sea Dogs. (#5165)
- If supported by the driver,
VK_EXT_border_color_swizzleis now used to fix border color behaviour for various emulated D3D9 texture formats. (#5388, PR #5390) - Reduced unnecessary GPU synchronization to allow overlapping mutliple independent render passes, as well as render passes with compute shaders. This is especially effective on systems that support
VK_KHR_unified_image_layouts, and can improve GPU-bound performance in games such as Dirt Rally 2. - The asynchronous transfer queue is now used more aggressively to perform resource uploads into VRAM. (PR #5713)
- The D3D11 Class Linkage feature is now supported. No games are known to use this feature, but some demo applications that do use it should work now.
- Optimized various common D3D9 code paths to reduce CPU overhead. This helps games such as Resident Evil 6.
- Optimized D3D9 shader constant uploads to reduce memory usage and improve performance. (PR #5686, #5689)
- DXVK will no longer spoof the vendor ID of Intel GPUs via DXGI for games shipping with XeSS 2. This spoofing was only necessary with older XeSS versions, but started causing issues with various D3D12 titles.
- Bioshock Infinite: Fixed a long-standing issue where the game would exhaust the sampler pool and start flickering. (PR #5376)
- Borderlands 2: Fix flickering grass when enabling anisotropic filtering. (#5441, PR #5549)
- Colin McRae Rally 3: Fix broken rendering with SilentPatch. (#4803, PR #5213)
- Fallout New Vegas: Fixed depth resolve issue with certain mods. (#5665)
- Insurgency & Counter-Strike: Global Offensive: Worked around engine bug causing missing textures. (PR #5602)
- Jump Space: Worked around a case of undefined behaviour that would lead to artifacting around objects in certain scenes.
- Max Payne: Fixed a crash when launching the game with more than one monitor connected. (PR #5221)
- Railroad Tycoon 3: Fixed Z-fighting issues on terrain. (#4114)
- Sang-Froid: Tales of Werewolves: Fixed various issues with fixed-function lighting.
- Splinter Cell 4: Worked around an issue where the game does not render correctly when it detects AMD GPUs. (#5729)
- The Sims 3: Worked around an issue where the game would deliberately lower shadow quality on AMD cards.
- Total War: Pharaoh: Worked around a game bug that would cause the main menu to flicker, and worked around a major performance issue that is caused by questionable shader code when MSAA is enabled. (PR #5517)
- Witch on the Holy Night: Fixed drop-down shadows in the gallery not displaying properly. (#3785)
- World of Final Fantasy: Worked around an issue where the game deliberately decides not to render water and certain character hair when detecting an AMD GPU.
Driver support
Many of the features and extensions added in Vulkan 1.4 are now required. In practice, this means that a driver recent enough to support Vulkan 1.4 is now also needed to run DXVK. The Driver Support page was updated accordingly.
This is not scary, just make sure your drivers aren't several years out of date.
RDNA1/2 on Windows
While this release will generally work, AMD's Windows driver for these GPUs no longer receives feature updates, can only use the slow legacy binding model, and suffers from severe performance issues that are not seen on any other driver. Affected users should stick to DXVK 2.x or consider moving to Linux.