For developers looking to bring their games to Linux officially, DXVK Native can be a good option to help reduce the time and complexity involved in doing so. Developed by Joshua Ashton who has been involved in DXVK, VKD3D-Proton, updating a few Valve games and more. Be sure to check out our interview!
Built against the Steam Runtime, the idea is that developers would use DXVK Native to get Vulkan support in their native Linux builds of games cutting out a chunk of the work needed on bringing up a whole new graphics API. It's the native version of DXVK, which does not need the Wine compatibility layer to work.
How does it work? From GitHub:
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.
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:
__uuidof(type)is supported, but
__uuidof(variable)is not supported. Use
DXVK Native also has some performance tweaks for D3D9, disabling float emulation and some validation. This is configurable in
Multiple games already use it too including:
- Portal 2 (Valve - Windows & Linux)
- Left 4 Dead 2 (Valve - Windows & Linux)
- Ys VIII, Ys IX (PH3 Games - Stadia)
- Trails of Cold Steel 3 & 4 (PH3 Games - Stadia)
- Perimeter (Linux)
For the likes of Portal 2 and Left 4 Dead, both got official upgrades earlier this year to add it in. The originals used Valve's own Direct3D to OpenGL abstraction layer ToGL with both of the games now having an option to launch with Vulkan instead of OpenGL on Linux. Interestingly for Stadia, Google recently announced they're working on their own 'Porting Toolkit' that includes translation libraries for DirectX to Vulkan.
DXVK Native been around for a little while but only today saw a first proper tagged release, and an actual readme to give a little more information on what it's for.
Check out DXVK Native on GitHub under the zlib/libpng license.