Microsoft has confirmed that DirectX is coming to the Windows Subsystem for Linux (WSL), making it yet another crowd pleasing announcement coming from the ongoing Build 2020. The company shifted its gears last year and moved away from the whole Linux-cancer thing to be a more active part of the open source community. The Windows maker has now taken another step in that direction.
Windows Subsystem for Linux or WSL allows Windows 10 users to run their Linux applications inside the Windows environment. The company said that in response to the popular demand, Linux applications and tools can now benefit from GPU acceleration. “Over the last few Windows releases, we have been busy developing client GPU virtualization technology,” the company wrote.
“This technology is integrated into WDDM (Windows Display Driver Model) and all WDDMv2.5 or later drivers have native support for GPU virtualization. This technology is referred to as WDDM GPU Paravirtualization, or GPU-PV for short. GPU-PV is now a foundational part of Windows and is used in scenarios like Windows Defender Application Guard, the Windows Sandbox or the Hololens 2 emulator. Today this technology is limited to Windows guests, i.e. Windows running inside of a VM or container.”
Now the company is bringing support for GPU acceleration to WSL 2 with WDDMv2.9 expanding the reach of GPU Paravirtualization to Linux guests through a new Linux kernel driver (Dxgkrnl) that “leverages the GPU-PV protocol to expose a GPU to user mode Linux.”
With this, the Linux apps will get the same access to the GPU as native Windows applications without any partitioning of resources or any limits on Linux applications.
The sharing is completely dynamic based on who needs what. There are basically no differences between two Windows applications sharing a GPU versus a Linux and a Windows application sharing the same GPU. If a Linux application is alone on a GPU, it can consume all its resources!
Microsoft has also made the code of the driver open source and says that the Linux dxgkrnl is a “clean room implementation.” As for when can you actually start testing this, Microsoft said Fast ring should expect to receive this new functionality at the end of June when apparently it will move on to testing a new version of Windows 10.
Support for DxCore, D3D12, DirectML and NVIDIA CUDA is coming to a Windows Insider Fast build soon. […] The preview of TensorFlow will become available at about the same time as an installable PyPI package alongside the existing TensorFlow packages in PyPI.org. At that point you’ll be able to replicate all of those cool //build demos.
Support for the OpenGL/OpenCL mapping layer and GUI applications will be coming at a later time through Insider build flighting. As we get closer to having these technologies ready, we will keep you informed through the Windows Insider build release notes and blog updates.
More details about DirectX for Linux over at this blog post.