Triton: DirectX 11 Driver for QEMU
Triton: A New DirectX 11 Driver for QEMU
Announcing Triton, the latest breakthrough in graphics acceleration for QEMU. Users can now experience modern Windows gaming within a virtualized environment.
Published: July 24, 2026 | Author: osy claude-opus-4-8
In a [previous discussion], we introduced Neptune, a forwarding layer designed for the Direct3D protocol via VirtIO. Neptune's primary function was the serialization of Direct3D API calls across the hypervisor boundary. While this allowed Wine games on a Linux guest (with a Linux host) to outperform direct DXVK implementation in the guest, the results were merely a stepping stone.
The ultimate objective was always more ambitious: providing modern graphics acceleration for Windows guests. This has been realized through the creation of Triton, a specialized Windows driver that, in tandem with Neptune, enables comprehensive DirectX 11 support for QEMU VMs.
Caption: High-performance gaming on virtualized Windows 11 ARM64.
What exactly is Triton?
One might assume that if Neptune can already serialize Direct3D calls, and Windows utilizes Direct3D, the problem is solved. After all, if it works in Wine, why wouldn't it work in Windows?
The Neptune Mesa drivers generate d3d11.dll and dxgi.dll files that implement the Direct3D API. By placing these files in the same directory as a game's executable, the game may load them instead of the native Windows drivers. This is the same logic used by previous attempts utilizing the pipeline: DXVK Vulkan Venus.
However, this "DLL replacement" method is fundamentally flawed:
- Performance Bottlenecks: The Windows Desktop Window Manager (DWM) perceives the frame as a simple image. Consequently, it relies on CPU blitting to move the GPU image buffer to the correct window coordinates. While full-screen "scanout" tricks exist, a fluid desktop experience is impossible.
- System Stability: Since
d3d11.dllanddxgi.dllare critical system components, replacing them globally would break Windows. - Security/Anti-Cheat: Many modern games employ anti-cheat software that flags the modification of these core DLLs.
- User Experience: Manually copying files into every single game folder is
efficienttedious and unfriendly.
Comparison: API Implementation vs. DDI Implementation
| Feature | API Replacement (DLL) | DDI Implementation (Triton) |
|---|---|---|
| Scope | Per-application | System-wide |
| DWM Integration | Poor (CPU Blitting) | Native/Smooth |
| Anti-Cheat | Often Detected | Transparent |
| Installation | Manual file copying | Driver installation |
The Verdict: To achieve true acceleration, one must not implement the DirectX APIs, but rather the DirectX DDIs (Device Driver Interfaces).
The Architecture of a Windows Graphics Driver
To understand Triton, we must look at how Windows handles graphics. The communication flow is as follows:
- The API Layer: The application talks to
d3d11.dll, which handles state tracking and sends a cleaned stream of commands to the User-Mode Driver (UMD). - The DDI Layer: The UMD implements the DDI.
- The Coordination Layer: The application uses
dxgi.dllfor adapter initialization and swapchain setup. The UMD also utilizes DXGI to communicate with the Kernel-Mode Driver (KMD). - The Hardware Layer: The KMD (written by the vendor) drives the actual hardware—or in this case, the virtualized hardware.
While Wine requires a custom d3d11.dll, Windows requires a custom UMD (implementing the DDI) and a KMD (communicating with the VirtIO device).
Development Milestones
- Implement KMD for VirtIO communication.
- Develop UMD with DirectX DDI interface.
- Integrate with Neptune protocol.
- Optimize for high-refresh displays.
Engineering the Solution
The team leveraged existing research into Vulkan. Both anonymix007 and arehnman had been developing KMDs for Venus (Vulkan). Because Vulkan is an independent API, it doesn't need the DirectX DDI; its UMD communicates directly with the KMD.
Since Neptune is modeled after Venus, the high-level kernel interfaces (DMA, command buffers, etc.) are nearly identical. The team ultimately utilized anonymix007's branch as the foundation due to its superior KMD feature set.
Learning from Open Source
Finding open-source DDI implementations is difficult because the field is dominated by a few proprietary hardware vendors. However, two sources provided vital inspiration:
- Mesa (Linux): Mesa implements OpenGL and emits Gallium API calls.
- Mesa DirectX 10 UMD: This acts as an alternative to OpenGL, emitting those same Gallium calls, which are then converted by a backend (AMD, Intel, VirGL).
While the upstream Mesa only supports software rasterization for DX10, and the macOS virglrenderer lacks the necessary features for this UMD, the Mesa codebase provided a blueprint for Triton's integration.
The logic follows a specific mathematical transformation of commands:
To implement this, the team considered a simple port of the bytecode emitter, which might look like this in a pseudo-configuration:
// Hypothetical Triton Bytecode Mapping
if (ddi_call == D3D11_CREATE_DEVICE) {
emit_bytecode(OP_CREATE_DEVICE, params);
} else if (ddi_call == D3D11_DRAW_INDEXED) {
emit_bytecode(OP_DRAW_INDEXED, params);
}
Despite the ease of using AI to port this bytecode interpreter into QEMU, the team decided against it for... [Article ends]