[Libclc-dev] add support for building spir-v support library from libclc

Dave Airlie via Libclc-dev libclc-dev at lists.llvm.org
Thu Sep 26 17:59:15 PDT 2019

This series adds support to libclc to produce a spir-v library for
most of the libclc functions. This library is to be consumed by the
Mesa SPIR-V backend in order to allow drivers to pick which libclc
implementations vs native ones they want to choose.

This library will be converted in Mesa into NIR and linked with the
CL kernel. It allows Mesa to use libclc to implement complex functions
using CLC rather than directly in IR. We don't include all the libclc
functions, some of them have no SPIR-V representation, and some of them
are generate a lot more code than just writing the IR in Mesa (e.g. 
shuffle* added 10MB to this file for 30 lines of IR generator).

I'm sure we'll tweak over time what goes into the library, but this works
for most of the built-ins piglit tests at the moment.


More information about the Libclc-dev mailing list