Build Microsoft has followed up the crowd-pleasing announcement of GUI and GPU-enablement for Linux apps running on Windows Subsystem for Linux (WSL) 2 with details of the tweaks needed to make the magic happen.
The team has been busily developing client GPU virtualization technology over the last few Windows releases, integrating the toys into the Windows Display Driver Model (WDDM) from version 2.5 onward.
Referred to as WDDM GPU Paravirtualization (GPU-PV), the tech had been limited to Windows running in a VM or container, but with WDDM 2.9. the team is extending a hand to Linux guests via a new Linux kernel driver to expose GPUs to Penguistas.
It’s a neat trick. The new driver, dxgkrnl, mimics the native WDDM D3DKMT kernel service layer on Windows and uses the VM bus connection to get at the GPUs. “There is,” said Microsoft, “no partitioning of resources between Linux and Windows or limit imposed on Linux applications.”
Microsoft has also made the code of the driver open source, and insists that the Linux dxgkrnl is a “clean room implementation.”
The change has also meant that the Redmond gang has been able to bring the DirectX API to Linux (in WSL2) as well. “This,” boasted the Windows giant, “is the real and full D3D12 API, no imitations, pretender or reimplementation here,” although it does admit that there is no presentation integration as yet. WSL is, after all, a console experience. While the D3D12 API is good for offscreen rendering, those pixels cannot, as yet, be flung onto the screen.
As well as D3D12, Microsoft has also ported its machine learning API, DirectML and is working on OpenGL and OpenCL to WSL. Support for CUDA in WSL 2 will also turn up in NVIDIA’s WDDM 2.9 driver. The gang is, however, remaining tightlipped about its plans for Vulkan.
Microsoft was also uncharacteristically open about when Windows Insiders would get their mitts on the new toys. Fast Ring Insiders are currently on the Manganese (Mn) branch and can expect support for DxCore, D3D12, DirectML and NVIDIA CUDA to arrive in June, when the Fast Ring should switch to the Iron (Fe) branch.
Support for GUI applications and the long wished-for Year of Linux on the Desktop will come a little later. ®
Sponsored: Webcast: Simplify data protection on AWS
Rojenx is a leading concept artist who work appears in games and publications
Check out his personal gallery here