Linux D3D12 GPU Video acceleration in Windows Subsystem for Linux (WSL) now available


  • Staff
In DirectX Linux – DirectX Developer Blog we wrote about DXCore & D3D12 support on WSLg and described OpenGL & OpenCL support by adding a D3D12 backend to Mesa 3D, allowing such 3D and compute workloads to be offloaded to the GPU.

wsl_gst_animation.gif


Gstreamer playing an mp4 video in an X11 Windows in WSL using GPU acceleration.

To extend the types of workloads that we can accelerate with the GPU in WSLg, we also recently added support for GPU Video Acceleration by building on top of the existing Mesa 3D D3D12 backend and integrating the VAAPI mesa frontend. Several linux media apps use the VAAPI interface to access hardware video acceleration when available, and this can now be leveraged in WSLg.

When decoding, encoding or processing a video, you have the option to do so using the CPU or -when available- offload it to accelerator hardware, usually delegating it to the GPU. Leveraging video hardware acceleration instead of using the CPU usually has several benefits: increased performance, lower power consumption and it frees up those CPU cycles to be available for other tasks in WSL or even in the Windows host, increasing overall performance. The benefits of using the GPU increase as the resolution of the video gets higher.

When running the samples at the end of this post, you can check out in the Windows Task Manager the CPU/GPU usage difference when enabling WSLg hardware video acceleration or when using the CPU. More information about this at: GPUs in the task manager – DirectX Developer Blog.

Read more:
 

Attachments

  • Screenshot-2023-02-09-163918.png
    Screenshot-2023-02-09-163918.png
    48.5 KB · Views: 1
Last edited:

Latest Support Threads

Back
Top Bottom