Show Your Support: This site is primarily supported by advertisements. Ads are what have allowed this site to be maintained on a daily basis for the past 18+ years. We do our best to ensure only clean, relevant ads are shown, when any nasty ads are detected, we work to remove them ASAP. If you would like to view the site without ads while still supporting our work, please consider our ad-free Phoronix Premium.
Nouveau Developer Working On NIR For SPIR-V Compute, Step Towards Vulkan In The Future
Karol Herbst, a longtime community developer who for years has been working on Nouveau, has sent out a series of patches working on NIR support for the NVC0 Gallium3D driver!
But before getting to that NIR excitement, Karol Herbst who has been contributing to Nouveau the past 2+ years in his free-time is now working for Red Hat. We've known Red Hat was looking to hire more open-source GPU driver experts and he appears to be one of their latest hires with sending off this patch series from a RedHat.com email address. Ben Skeggs, the Nouveau DRM maintainer, is also a Red Hat developer. Congrats to Karol on his new job and hopefully will mean seeing more contributions to Nouveau.
Back to the 22 new patches, he's posted very early and experimental support for adding NIR support to Nouveau. NIR, of course, being the intermediate representation spearheaded by Intel for their Mesa driver and has since been picked up by Freedreno/VC4 and is experimentally supported in RadeonSI too for RADV/Vulkan interop support.
His goal in supporting NIR is to end up re-using SPIR-V to NIR support within Mesa. This in turn would mean getting SPIR-V, the IR used by OpenCL 2.1+ and Vulkan, working for the open-source NVIDIA driver. Two years back was some work by another developer on SPIR-V for Nouveau that was aiming to take SPIR-V directly to the NVIDIA instructions, but it didn't end up making too much headway. With going the NIR route, hopefully it will pan out and be brought up quicker.
Karol with this NIR/SPIR-V focus is on getting compute support working through NIR. With this NIR code there is also GLSL 1.30 era games working; currently this support with the patches is experimental and disabled unless setting the NV50_PROG_USE_NIR=1 environment variable.
Currently Karol is looking for feedback and has more work still left to get this Nouveau NIR support into shape. Features coming up next will be geometry shader handling and uniform buffer objects.
This NIR to NVIR code for Mesa so far is coming in at just over two thousand lines of code. So far there are just mentions of this code in the context of compute, but hopefully this will also be a big step towards seeing Nouveau Vulkan support. Vulkan on the open-source NVIDIA (Nouveau) driver would certainly be fun to see, but not too performant until re-clocking is sorted out for Pascal/Maxwell GPUs.
The patches for now can be found on Mesa-dev but will be interesting to see if the experimental, non-default code gets merged in time for Mesa 18.0.