CUDA Graphical Samples Not Working under WSLg

When you install the CUDA Toolkit for WSL2 you get a bunch of example CUDA programs with their source code. Most of the text based CUDA applications work fine BUT when you run any of the GUI CUDA examples such as Mandelbrot, simpleTexture3D, volumeRender, particles, oceanFFT etc. or basically any of the GUI apps from their Graphics, Imaging or Simulation directories you will basically get the same program errors and then a segmentation fault. Is anyone else seeing this?

New Text Document.txt (1.8 KB)

I’ve attached an example of the output I get when I try to run those CUDA samples.

Here is the explanation for this behavior;

Hello @mw7301. This is because CUDA GUI application require the NVIDIA native GL driver which exposes extension for CUDA. OpenGL is accelerated in WSLg through Mesa mapping on top of our vGPU/DX12 projection and Mesa doesn’t support those CUDA extension. To support this would require NVIDIA to bring their native GL driver to WSL. This is something probably best requested/discussed on the NVIDIA forum for WSL.

So does nVidia have any plans to bring their native GL driver to WSLg?