Working OpenCL Through Gallium3D Clover With LLVM To SPIR-V Conversion

Written by Michael Larabel in Mesa on 13 May 2019 at 06:03 AM EDT. 3 Comments
Karol Herbst of Red Hat who has been working for more than the past year on providing OpenCL support in Gallium3D's "Clover" state tracker via SPIR-V so it can easily work with drivers like Nouveau seems to be approaching the finish line.

Karol posted the latest patches this weekend in the feat of running Clover/OpenCL via SPIR-V with the Gallium3D drivers rather than Clover's current design around using Gallium3D's TGSI IR. This OpenCL through SPIR-V support is achieved by relying on the SPIR-V LLVM Translator library to convert LLVM IR to SPIR-V. Besides the patches allowing Clover to consume SPIR-V, there are a few Nouveau bits part of this patch series and ultimately exposing the SPIR-V support for the Nouveau NVC0 driver.

The latest patches for now are on the mailing list while we hope to see this work ideally merged for the current Mesa 19.2 cycle.

It will certainly be interesting to see how this SPIR-V OpenCL support performs on Nouveau NVC0. Our main concern with this Nouveau OpenCL effort has been slow performance particularly for the GeForce GTX 900 series and newer where there is currently no re-clocking support available for these desktop GPUs. The best supported hardware for Nouveau compute would be the vintage GeForce GTX 700 series, but we'll see what our benchmarks show when the time comes and how it competes with NVIDIA's OpenCL proprietary driver.

Besides Nouveau, this Clover OpenCL work may also prove useful to the other SPIR-V-supporting Gallium3D drivers now and moving forward.
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