The Newest Mesa NIR/SPIR-V Code For Handling OpenCL Kernels

Written by Michael Larabel in Mesa on 15 November 2018 at 05:46 AM EST. 5 Comments
It's now been nearly one year since longtime Nouveau contributor Karol Herbst joined Red Hat where one of his big projects has been working on OpenCL support for this open-source NVIDIA driver by bringing up NIR/SPIR-V support and making the necessary improvements for allowing OpenCL kernels to be represented in that IR commonly used by the Mesa drivers. The work still isn't yet in Mesa Git, but Karol this week sent out his newest patches.

Karol Herbst sent out 22 patches this week in regards to adding support for OpenCL kernels within Mesa's NIR and SPIR-V common code. The patches are mostly adding the necessary OpenCL bits to the common NIR/SPIR-V compiler code for handling the intricacies of OpenCL kernels with features like physical pointer support, cl_size/cl_alignment, and other bits.

He's also been working on the NIR back-end for Nouveau though the patches sent out this week are not on that front.

We'll see if this initial Nouveau compute support is ready in time for Mesa 19.0, which is now open on Mesa Git and will be releasing in early 2019, or if this is still an even longer-term effort. It also remains to be seen why Red Hat is investing so much into Nouveau compute support when the performance on recent generations of NVIDIA hardware is crippled due to re-clocking challenges made immensely more difficult by NVIDIA's signed firmware requirements. Last month Red Hat and NVIDIA did announce they would be collaborating on some open-source efforts. We'll see.
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