Vulkan-CPU Has Working SPIR-V To LLVM IR Translation, x86 Code Almost Working
Jacob Lifshay, the student developer via GSoC 2017 working on a Vulkan CPU-based implementation to essentially serve as a software renderer that is making use of LLVM, now has working SPIR-V to LLVM IR translation.
SPIR-V, of course, being the intermediate representation used by Vulkan and OpenCL 2.1+. Jacob's work is separate from the other SPIR-V LLVM work being pursued by other parties. Lifshay has now implemented enough of a SPIR-V to LLVM IR translator that it can translate simple shaders onwards to LLVM IR. He also says he is almost at a stage where in turn it can then generate x86 machine code. So in the end it will go from SPIR-V shaders to x86 code that can be executed by the CPU.
More details via his GitHub blog. It will be great once there is finally a working CPU-based implementation of Vulkan for a GPU/hardware-independent driver and possible implications for fallback for compute to the CPU in case of missing/broken Vulkan driver support on systems. Separately is also the effort for clspv to bring OpenCL C code to Vulkan.
SPIR-V, of course, being the intermediate representation used by Vulkan and OpenCL 2.1+. Jacob's work is separate from the other SPIR-V LLVM work being pursued by other parties. Lifshay has now implemented enough of a SPIR-V to LLVM IR translator that it can translate simple shaders onwards to LLVM IR. He also says he is almost at a stage where in turn it can then generate x86 machine code. So in the end it will go from SPIR-V shaders to x86 code that can be executed by the CPU.
More details via his GitHub blog. It will be great once there is finally a working CPU-based implementation of Vulkan for a GPU/hardware-independent driver and possible implications for fallback for compute to the CPU in case of missing/broken Vulkan driver support on systems. Separately is also the effort for clspv to bring OpenCL C code to Vulkan.
2 Comments