Cracking Windows Open: Porting RADV to Win32

Jul 29, 2026 11:30 AM - 1 day ago 39

Louis-Francis Ratté-Boulianne avatar

Louis-Francis Ratté-Boulianne
July 28, 2026

RADV is the unfastened root Mesa Vulkan driver for AMD GPUs. Over the years, it has go a cornerstone of the Linux graphics stack. It has now efficaciously go the de facto Vulkan driver for AMD hardware connected Linux. AMD moreover discontinued their PAL-based (Platform Abstraction Library) replacement successful its favor, consolidating their open-source efforts astir Mesa.

On Windows however, AMD users are still served only by the proprietary driver. But don't panic, we person a solution: porting RADV to Windows, bringing the aforesaid unfastened root Vulkan implementation that has proven itself connected Linux to them. It's specified an improbable proposition that we mightiness really get location faster than ray (spoiler alert: that's going to beryllium a small slower).

An unfastened root Vulkan driver connected Windows opens up a number of possibilities: a shared codebase crossed platforms, easier debugging and experimentation, faster turnaround connected fixes, and a way for the organization (e.g., crippled developers) to study problems aliases lend improvements that use everyone sloppy of operating system.

From first triangle...

This effort builds straight connected the groundwork laid by Faith Ekstrand, who first explored the feasibility of moving RADV connected Windows and presented her findings astatine XDC 2024. We powerfully propose you spell watch the talk, but present is simply a speedy summary.

A cardinal taxable of her talk is that since Windows 10, the WDDM2 interface provides a overmuch amended instauration for a third-party driver than what came before. It defines a clear exemplary for really a user-mode driver (UMD) interacts pinch the operating strategy and the kernel-mode driver (KMD).

However, location is of people a important catch: galore D3DKMT calls tin transportation private driver data - opaque, vendor-specific blobs whose contents are wholly up to the driver. This intends the UMD and KMD stay tightly coupled and that this interface is wholly undocumented.

To activity astir this, Faith created the wddm2-pdd-re instrumentality to log the WDDM2 calls and the backstage information contented for immoderate D3D12 applications. Using this approach, she was capable to reverse technologist capable of the backstage interface — querying adapter info, allocating buffers, creating queues, and submitting commands — to get RADV to taxable activity to the proprietary kernel driver. And yet she was moreover capable to get a rotating 3D exemplary displayed connected her surface successful each its glory.

...to first game

Where Faith's activity established that this could beryllium done, this task picked up the thread. The extremity was to amended upon it to make it much elastic (support for different hardware by reducing hard-coded values), much portable (breaking free of WSL pinch autochthonal Windows support), and acold much unchangeable (no longer crashing aft 2 minutes of deqp-vk testing).

We improved bid watercourse handling and synchronization and added support for, among others, sparse bindings, tessellation and task shaders, and move querying of GPU properties. It is still not conformant (even though the occurrence complaint has dramatically increased), but the existent item is being capable to tally our first crippled pinch RADV: Counter-Strike 2. Anyone tin effort it by switching the renderer pinch the -vulkan argument.

CounterStrike 2 moving connected apical of RADV

...through darkness

Like immoderate larboard and/or reverse-engineering project, it brought immoderate challenges:

  • New procreation is truthful oversensitive: We were experimenting connected Gen 11 hardware (RX 7900 XT) while Faith was moving pinch a 10th Gen GPU (RX 7800 XT). We weren't capable to replicate Faith's results for rather a while, owed to architecture changes betwixt these 2 generations. The main problem was that it would bent arsenic soon arsenic we tried to do thing much analyzable than clearing a aboveground to a hard-coded color. Unfortunately, pinch nary devices to debug specified hangs connected Windows, this forced america to amended the tooling to trim discrepancies pinch the proprietary driver arsenic overmuch arsenic possible. We upgraded the reverse-engineering inferior into a afloat WDDM2 logging layer, capable to analyse immoderate exertion tally pinch the charismatic Vulkan driver, and added support to dump the bid streams, registers, and shader code.

  • Compilers are not playing nice: Mesa is developed chiefly against GCC and Clang, and its codification guidelines relies connected a number of assumptions that don't guidelines erstwhile compiling pinch MSVC. For instance, MSVC doesn't work together pinch the different compilers connected really to grip enums: it tin construe a worth arsenic signed and limit them to 32-bit values, which tin consequence successful rather astonishing behaviors.

  • I've heard you liked opaque blobs: So let's put opaque information wrong your opaque API telephone - D3DKMTEscape. WDDM2 has the anticipation of vendor-specific hooks done that method, wherever the full contented is wholly up to the vendor. There is nary defined structure, and the only limitation is that it shouldn't replicate thing for an existing "standardized" call. Fortunately for us, it looks for illustration we tin safely disregard those for now, arsenic they look to attraction connected precocious features specified arsenic multi-GPU rendering.

...and beyond

The biggest unfastened mobility for making this production-ready is the interface to the proprietary kernel driver. Developing our ain KMD is not really an option, truthful we request to pass pinch AMD's. Right now, doing truthful relies connected reverse-engineered knowledge of backstage information structures — which is inherently fragile. To make matters worse, the UMD and KMD vessel together arsenic a matched brace pinch nary backward-compatibility guarantee, truthful these structures tin alteration betwixt driver versions pinch nary notice.

For RADV to go genuinely unchangeable and maintainable connected Windows, we request 1 of:

  • A stable, documented interface to the proprietary kernel-mode driver, or
  • A shim library that mediates connection pinch the KMD done the backstage information channel, giving america a unchangeable aboveground to build against moreover arsenic the underlying blobs evolve.

There is besides important activity remaining connected presentation. While Jesse Natalie did immoderate activity connected WSI for Windows (in the discourse of the Dozen driver), RADV presently only supports the slower CPU way for presentation. More activity is needed to alteration the usage of DXGI swapchains to amended performance, but that requires being capable to import an image from D3D12 (more opaque metadata, hurrah!). Even much activity would beryllium required to execute zero-copy swaps, the pinnacle of graphics pipelines. It could perchance lead to a 3x capacity summation for applications that are not GPU-bound. Accomplishing that past measurement would besides require nonstop engagement from AMD and astir apt Microsoft (as location are immoderate limitations related to image sharing). There are precedents to that benignant of quality-of-life improvements for open-source projects, truthful location is hope!

We dream this activity demonstrates the worth of an unfastened Vulkan driver connected Windows and helps motivate everybody progressive to activity toward that unchangeable foundation. For anyone interested, the activity is presently sitting successful this branch.

Thanks besides to Valve for sponsoring this shape of our activity to bring unfastened drivers to Windows.

More