Microsoft Announces Direct3D 12 For Linux / WSL2
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.