RADV on Windows: From First Triangle to Counter-Strike 2

Collabora has ported the open-source Mesa Vulkan driver for AMD GPUs, RADV, to Windows. The work builds on Faith Ekstrand's 2024 XDC talk, which demonstrated a rotating 3D model using reverse-engineered WDDM2 calls. Now, the driver can run Counter-Strike 2 on Windows with the -vulkan flag.

RADV has become the de facto Vulkan driver for AMD on Linux, even leading AMD to discontinue its proprietary PAL-based driver. Porting it to Windows brings an open-source Vulkan implementation to Windows users, offering a shared codebase, easier debugging, and faster fixes.

Technical Challenges and Solutions

The port relies on the WDDM2 interface, which provides a clear model for user-mode drivers (UMD) but requires private data blobs that are undocumented. Faith created the wddm2-pdd-re tool to log and reverse-engineer these blobs. Collabora upgraded this into a full WDDM2 logging layer, able to analyze any application run with the official Vulkan driver, dumping command streams, registers, and shader code.

Key technical hurdles included:

  • Hardware differences: Gen 11 GPUs (RX 7900 XT) behaved differently from Gen 10 (RX 7800 XT), causing hangs. Improved tooling reduced discrepancies with the proprietary driver.
  • MSVC compatibility: Mesa's codebase assumes GCC/Clang behavior. MSVC interprets enums as signed 32-bit values, leading to surprising bugs.
  • Opaque blobs: The D3DKMTEscape method allows vendor-specific hooks with entirely private data. These currently appear safe to ignore but may complicate advanced features like multi-GPU.

Production Readiness and Future Work

The biggest open question is the interface to AMD's proprietary kernel-mode driver (KMD). The current reverse-engineered approach is fragile because UMD and KMD ship as a matched pair with no backward-compatibility guarantee. Collabora proposes either a stable, documented interface or a shim library that mediates private data communication.

Presentation also needs work. Currently, RADV uses a slow CPU path for presentation. Enabling DXGI swapchains requires importing images from D3D12 (more opaque metadata). Zero-copy swaps could yield 3x performance gains for non-GPU-bound apps but require AMD and Microsoft involvement.

How to Try It

The work is available in this branch. To run Counter-Strike 2, use the -vulkan argument. Expect crashes and missing features—it's not yet conformant.

Why This Matters

An open-source Vulkan driver on Windows benefits game developers, tool makers, and the entire graphics community. It enables cross-platform code sharing, faster bug fixes, and community contributions. Valve sponsored this phase of the work.

Editor's Take

I've been following RADV since its early days on Linux, and seeing it run on Windows is surreal. The reverse-engineering effort here is heroic, but I'm skeptical about long-term stability without AMD's cooperation. The WDDM2 logging layer is a clever hack, but every driver update could break it. I'd love to see AMD open up the KMD interface—it would save everyone time and make Windows graphics more competitive.