Triton: DirectX 11 Driver for QEMU
The article describes the development of a DirectX 11 driver named Triton, which provides full DirectX 11 support for QEMU virtual machines. Initially, the project aimed to create a Direct3D protocol forwarding layer called Neptune that serialized Direct3D API calls across the hypervisor boundary, allowing Wine games on a Linux guest with a Linux host to run faster than with DXVK directly in the guest.
However, due to performance limitations and compatibility issues, the team decided to build a brand new Windows driver called Triton, in conjunction with Neptune, to achieve full DirectX 11 support.
The article explains that while Neptune serializes Direct3D API calls, Windows typically uses Direct3D, making it seem like the goal has been achieved. However, due to certain disadvantages such as the inability to achieve good performance, the window compositor's interaction with the GPU image buffer, and difficulties in replacing system files without breaking Windows, Triton was developed to implement the DirectX Direct Device Interface (DDI) instead.
This approach involves creating a custom d3d11.dll and dxgi.dll to intercept API calls and implementing a user-mode driver (UMD) and kernel-mode driver (KMD) for communication with the graphics hardware.
The team faced challenges in implementing the DDI for DirectX 11, as there are limited open-source resources to draw inspiration from. They turned to Mesa's DirectX 10 UMD and VirtualBox's DirectX 11 UMD for guidance. While these resources provided valuable insights, the team decided against adopting VirtualBox's bytecode-based approach due to potential compatibility issues.
Ultimately, Triton aims to provide a more user-friendly experience by implementing the DirectX DDI, rather than relying on replacing system files or using a per-application basis for graphics acceleration.
Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.