Work Revised On Adding SPIR-V Support To Clover Gallium3D

Written by Michael Larabel in Mesa on 23 January 2018 at 12:05 AM EST. 6 Comments
MESA
Last May we reported on a Nouveau developer adding SPIR-V support to Gallium3D's OpenCL state tracker. Finally the better part of one year later, Pierre Moreau is ready with the second version of these patches to accept this IR associated with Vulkan / OpenCL 2.1+ within Clover.

The university student's work is on allowing this long-standing OpenCL Gallium3D "Clover" state tracker to accept SPIR-V binaries via the cl_khr_il_program entry point since OpenCL 1.2 or with core functionality present in OpenCL 2.1+. While Clover still only officially supports OpenCL 1.1 and a ways off from OpenCL 2.1 where SPIR-V became a focus, the other motivation for this work is letting SPIR-V in Clover for in turn converting that IR into the NIR intermediate representation. The other Gallium3D drivers supporting NIR but not accepting direct input of SPIR-V could then take this route. Nouveau could be a benefactor as well as drivers like VC5 and Etnaviv eyeing OpenCL support in the future.

With these new patches, the custom SPIR-V linker was dropped in favor of pulling in SPIRV-Tools, there is now Meson build support for this new code, cl_khr_il_program support added, and other improvements.

This updated tentative SPIR-V Clover code can be found for now on Mesa-dev. Hopefully this work will be buttoned up soon without having to wait another year or more before seeing it land.

Along related lines, Nouveau developer turned Red Hat employee Karol Herbst has recently been working on Nouveau NIR support in order to accept SPIR-V.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com 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 OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week