Nouveau Begins Shifting Around Code For Use By New Driver - Vulkan And/Or New Driver

Written by Michael Larabel in Nouveau on 31 May 2022 at 06:38 AM EDT. 24 Comments
While the just talked about Nouveau beginning to land GeForce RTX 30 "Ampere" open-source support is exciting, as mentioned there still are hurdles to overcome for having good open-source NVIDIA driver performance on modern GPUs. So equally exciting news is that Nouveau has begun adapting some of their code into a standalone library so it can be used in the future by other new driver(s).

The past few days has seen work begin on restructuring the Nouveau Mesa driver's code around code generation so it can live in a standalone library.

This is simply summed up at this time by Red Hat's David Airlie as, "This just moves the codegen build into a separate library, this is just prep work for a future where another drivers wants to reuse this code. this isn't perfect for plugging into a vulkan driver, but doing that requires more in depth surgery."

2022 will be interesting for the open-source NVIDIA driver efforts.

Basically this current effort is moving the driver's code generation into a standalone library inside Mesa so it can be easily re-used by other future code outside of the Nouveau Gallium3D. Among the most likely uses with this standalone library include:

- Working on a Nouveau Vulkan driver while sharing the shader compiler code generation between drivers... Besides performance, the lack of a open-source NVIDIA Vulkan driver has been one of the big sore spots for the Nouveau effort in 2022 with most Linux games either natively or by way of Steam Play able to make use of the Vulkan API.

- Working on a new Mesa driver to make use of NVIDIA's recently open-sourced kernel driver. This is very likely as well. Basically with all of the changed kernel interfaces when comparing the Nouveau DRM/KMS driver to NVIDIA's new kernel driver that they have been working on, it may be easier starting from a cleaner slate / morphing the Nouveau driver code into a separate new driver that explicitly targets that new kernel driver. This new driver would also be able to focus just on the newer Turing and beyond GPUs supported by that kernel driver and eliminate all of the old/legacy support and other cruft that has built up within the Nouveau Mesa code over the years.

Or quite possibly, both scenarios.

As outlined in the prior NVIDIA open-source articles, if NVIDIA wants to get their new open-source kernel driver eventually mainlined into the upstream Linux kernel, they will need an open-source user-space driver that exercises all of the exposed kernel interfaces... With it unlikely NVIDIA would open-source their OpenGL or Vulkan closed-source drivers, via NVIDIA engineers and their Red Hat partners they would need to come up with Mesa driver usage of this new kernel driver -- either adapting their existing Nouveau Gallium3D code to support that kernel driver or judging from this Mesa code restructuring it could come in the form of a new Mesa driver.

In any event the pending change to move Nouveau's code generation into a standalone library is just one small initial step of the much larger effort of bringing up any new open-source NVIDIA driver within Mesa. As it stands today, that pending code has no immediate impact on end-users. At least it's happening and Red Hat continues to be partnered with NVIDIA on this multi-year, open-source driver effort.

Meanwhile when it comes to Nouveau's upstream DRM/KMS kernel driver, there hasn't been any major work to report on in recent times. More than likely we'll see that driver further stagnate and remain around for those on pre-Turing GPUs wanting to use the open-source driver... As a reminder though, this driver is really only practical and performant for GeForce GTX 600/700 "Kepler" GPUs and GTX 750 "Maxwell1" hardware where re-clocking can be achieved for hitting the top performance states. Red Hat engineers are the main contributor to the Nouveau kernel driver over the past number of years and if they focus all of their resources on this modern NVIDIA open-source kernel driver, don't expect much future code activity to happen for that open-source, reverse-engineered kernel driver.

Stay tuned to Phoronix as this modern NVIDIA open-source driver effort evolves -- it's still likely to be quite some months before the NVIDIA open-source kernel driver would be a candidate for mainlining into the kernel.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week