Sunday, August 23, 2020

Some Ugly Code Can Get Nvidia's Linux Driver Working with Accelerated XWayland

Red Hat's Adam Jackson has been working on "GLX Delay" as a means of offering accelerated GLX with OpenGL for XWayland when using the NVIDIA proprietary driver. The proposed code is going through Mesa even though it's for the proprietary NVIDIA driver benefit and also requires a change to the OpenGL Vendor Neutral Dispatch Library (libglvnd).

This work-in-progress code does allow the likes of glxgears and glxinfo to now successfully run on XWayland with the NVIDIA proprietary driver. Adam prominently noted, "due to the design of this approach the actual GL rendering part should be about as fast as it is against Xorg, or against EGL on the bare metal, so in principle this can eventually be just as performant as it is with Xorg."

So while it's nice for NVIDIA binary Linux gamers wanting accelerated XWayland support, this code is quite a bit hacky and does some wrangling so it will work without changes to the NVIDIA proprietary driver. Among the features not implemented are support for resizing XWayland windows, various GLX features, SwapBuffers extra features like vsync are not wired up, and more. The code is being sent in through Mesa since it's reusing Mesa's GLX code

As for why Jackson is working on this NVIDIA XWayland acceleration support, he commented, "I want the xfree86 code out of my life, and this approach seems like it'll eliminate a large class of reasons why you might need to use Xorg and NVIDIA's driver. Certainly it's better than what you currently get for GLX clients in that scenario, which is llvmpipe. On the other hand, I can see the argument that this entrenches the position of NVIDIA's libEGL, since we've only made it more useable. But I think, on balance, that this reduces the binary driver footprint, and I think that's a good direction to go."

The work-in-progress code can be found via

this Mesa merge request

. We'll see what other upstream Linux graphics driver developers think of this approach over the days ahead.



from Hacker News https://ift.tt/2FUp7mJ

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.