Microsoft Announces Direct3D 12 For Linux / WSL2
Written by Michael Larabel in Microsoft on 19 May 2020 at 12:42 PM EDT. 117 Comments
MICROSOFT --
As part of bringing GPU acceleration to WSL2 that was announced at today's virtual Build conference, Microsoft just published a blog post with more details including their port of Direct3D 12 for Linux.

Part of this DirectX work for Linux involves a new "DXGKRNL" Linux kernel driver for exposing the DirectX graphics adapters to the Linux user-space through the WSL2 setup. The DXGKRNL driver interfaces with the Windows host via a VM bus connection. Multiple GPUs will be supported.

The more interesting work is in user-space with Microsoft to provide a "real and full D3D12 API" for Linux. "This is the real and full D3D12 API, no imitations, pretender or reimplementation hereā€¦ this is the real deal. libd3d12.so is compiled from the same source code as d3d12.dll on Windows but for a Linux target."

The current support allows only offscreen rendering until the WSL2 GUI support is in place. This support will also require Windows WDDMv2.9 graphics drivers.

Before getting too excited, the Direct3D 12 library for Linux will be closed-source. The DirectX core and D3D12 libraries will be closed-source and shipped as part of Windows. With it targeting the DXGKRNL kernel interfaces, these libraries will likely be of little value to Wine / Proton and the like unless there was a new layer implemented so the DXGKRNL interfaces could be re-implemented for bare metal Linux systems.

Via this Direct3D 12 implementation is also how WSL2 will support OpenGL, OpenCL, and Vulkan. You may recall recently Microsoft and Collabora announced their work to map OpenGL and OpenCL over DirectX 12.

Microsoft is also working with NVIDIA to support CUDA under WSL2.

More details via this interesting blog post.

Additionally, Microsoft also published now their virtual GPU driver for the Linux kernel. The kernel driver portion is open-source and ultimately they will be looking to mainline it. This kernel driver is just relevant in the context of a Windows host / WSL2 setup and contingent upon Microsoft Hyper-V.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week