Author Topic: DirectX 12 is coming to the Windows Subsystem for Linux (OpenGL/Vulkan too)  (Read 2525 times)

0 Members and 1 Guest are viewing this topic.

JeGX

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2445
    • Geeks3D.com
Quote
At //build 2020 we announced that GPU hardware acceleration is coming to the Windows Subsystem for Linux 2 (WSL 2).

What is WSL? WSL is an environment in which users can run their Linux applications from the comfort of their Windows PC. If you are a developer working on containerized workload that will be deployed in the cloud inside of Linux containers, you can develop and test these workloads locally on your Windows PC using the same native Linux tools you are accustomed to. In response to popular demand, these Linux applications and tools can now benefit from GPU acceleration.

...

GPU Virtualization

To bring support for GPU acceleration to WSL 2, WDDMv2.9 will expand the reach of GPU-PV to Linux guests. This is achieved through a new Linux kernel driver that leverages the GPU-PV protocol to expose a GPU to user mode Linux. The projected abstraction of the GPU follows closely the WDDM GPU abstraction model, allowing API and drivers built against that abstraction to be easily ported for use in a Linux environment.

...

DxCore & D3D12 on 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. It offers the same level of functionality and performance (minus virtualization overhead). The only exception is Present(). There is currently no presentation integration with WSL as WSL is a console only experience today. The D3D12 API can be used for offscreen rendering and compute, but there is no swapchain support to copy pixels directly to the screen

...

OpenGL, OpenCL & Vulkan

On Linux, users typically use Khronos APIs for graphics.  So, what about support for GPU acceleration for OpenGL, OpenCL or Vulkan?
We have recently announced work on mapping layers that will bring hardware acceleration for OpenCL and OpenGL on top of DX12. We will be using these layers to provide hardware accelerated OpenGL and OpenCL to WSL through the Mesa library. After our work is done, WSL distro will need to update Mesa in order to light up this acceleration. For distros picking up this Mesa update, acceleration will automatically be enabled whenever a WDDMv2.9 driver or above is installed on the Windows host.

...

Full article: https://devblogs.microsoft.com/directx/directx-heart-linux/

DX12 on Windows Subsystem for Linux (WSL)