Compiling OpenCL Kernel to SPIR-V, then use in Vulkan

I just came across this project on GitHub (, which seems to allow to compile OpenCL kernels to SPIR-V. I’ve already used GLSL compute shaders, compiled to SPIR-V, within Vulkan as compute shaders, so I was wondering, whether there is also a way to execute to-spirv-compiled OpenCL kernels with the Vulkan compute pipeline?
If it’s possible at all, are there any resources, that may contain further information about this ?

Thanks in advance!

If you compile OpenCL kernels to SPIR-V, then your kernels presumably use OpenCL features. Which means that the SPIR-V it generates will be flavored for use in OpenCL by using features that aren’t allowed in Vulkan. The most notable of which is the use of a Phsycial32/64 addressing mode rather than Logical. Physical addressing modes means that you can use pointers. But the Vulkan execution environment doesn’t allow for Physical addressing; you have to use Logical.

Among other things.

Don’t mix SPIR and SPIR-V. Two different things. seems to be the appropriate project.

Then, as AR said the SPIR-V still needs to be under Vulkan semantics. That’s probably not (yet) implemented.