HeadlinesBriefing favicon HeadlinesBriefing.com

Triton: DirectX 11 Driver for QEMU Virtual Machines

Hacker News •
×

Triton is a new Windows driver that, combined with Neptune, brings full DirectX 11 support to QEMU virtual machines. Neptune previously enabled Direct3D protocol forwarding for Wine on Linux guests, but the real goal was modern graphics acceleration for Windows guests. Unlike the DLL replacement approach used by Wine and DXVK, Triton implements the DirectX Device Driver Interface (DDI) directly. This avoids performance issues with CPU blitting and compatibility problems with anti-cheat systems. The driver implements both user-mode (UMD) and kernel-mode (KMD) components, communicating with Virt IO devices. The team leveraged existing work by anonymix007 and arehnman on Venus KMD implementations, using anonymix007's branch as the base. They studied Mesa's DirectX 10 UMD and Virtual Box's DirectX 11 UMD for reference, though Virtual Box's bytecode translation approach was rejected due to compatibility concerns and license incompatibility. Instead, Triton transforms DDI calls back to DirectX API calls, allowing reuse of the Neptune protocol without additional transport layers.

The implementation focuses on transforming DDI calls back to DirectX API calls rather than using intermediate bytecode translation like Virtual Box. This approach leverages the existing Neptune protocol for serialization across the hypervisor boundary, avoiding latency and compatibility issues introduced by additional translation layers. The team used Virtual Box's implementation primarily to identify minimal DDI requirements and understand undocumented features like DXBC signature algorithms.

By implementing proper Windows DDI interfaces instead of DLL replacement, Triton enables native Windows graphics acceleration in QEMU VMs without modifying system files or compromising desktop experience smoothness.