Windows Subsystem for Linux gains support for DX12 and apps with gui
At its developer build event, Microsoft announced that it is bringing GPU acceleration to Windows 10’s Linux subsystem. Before that, WSL2 gets support for DirectX 12 and can also run Linux programs with gui.
In a blog article, Microsoft details the arrival of hardware graphics acceleration to the Windows Subsystem for Linux 2. WSL2 is part of Windows 10 as of the May 2020 Update and includes a Linux kernel, for example, but the subsystem only runs command-based by default. line tools. Applications with a graphical user interface require a user to use external applications such as X11.
Microsoft is working to change that. The move is the result of Microsoft’s work on GPU virtualization. To this end, the company is developing a Linux kernel driver that makes a GPU available for Linux user mode via the wddm GPU paravirtualization protocol.
According to Microsoft, applications in the Linux environment therefore get the same access to the GPU as Windows applications. Microsoft further emphasizes that it is the full D3D 12 API that offers the same functionality and performance as on Windows, minus the overhead that comes with virtualization.
Microsoft further reports that it will also use the OpenCL and OpenGL layers for DX12 it is working on to bring hardware acceleration based on those standards to the Linux subsystem. This will be done via the open source Mesa library. Microsoft makes the GPU kernel driver for Linux open source, but the DirectX core and D3D 12 libraries remain closed.
Microsoft is also working with Nvidia on cuda support for the Windows Subsystem for Linux. That support is coming with the arrival of Nvidia’s upcoming wddm v2.9 driver. The extension of WSL 2 is intended to keep developers using Linux tools on board with Windows 10.
At the same time, it shows Microsoft’s changed attitude towards open source. Recently, Microsoft president Brad Smith said his company was “on the wrong side of history when open source exploded at the turn of the century.”