Khronos Publishes SPIRV-Cross: Converting SPIR-V To Other Shader Languages, C++
The Khronos Group this morning opened up the public source access as to their new SPIRV-Cross project, an open-source project for converting the SPIR-V intermediate representation used by Vulkan and OpenCL 2.1+ back into GLSL, C++, and other higher-level languages.
SPIRV-Cross supports taking this IR used by Vulkan/OpenCL and turning it into readable, usable, and efficient higher-level languages. SPIR-V can be turned back into OpenGL GLSL, debuggable C++ code, and there's even experimental support for Apple's Metal Shading Language.
The SPIRV-Cross Reflection API also allows for simplifying the creation of Vulkan pipeline layouts, modfying and tweaking OpDecorations, and more. SPIR-V Cross is designed to work with all vertex, fragment, tessellation, geometry, and compute shaders.
When raising the SPIR-V IR back into a language like GLSL or Apple MSL, "the goal is to emit GLSL or MSL that looks like it was written by a human and not awkward IR/assembly-like code."
The SPIRV-Cross source code is now available via this GitHub repository.
SPIRV-Cross supports taking this IR used by Vulkan/OpenCL and turning it into readable, usable, and efficient higher-level languages. SPIR-V can be turned back into OpenGL GLSL, debuggable C++ code, and there's even experimental support for Apple's Metal Shading Language.
The SPIRV-Cross Reflection API also allows for simplifying the creation of Vulkan pipeline layouts, modfying and tweaking OpDecorations, and more. SPIR-V Cross is designed to work with all vertex, fragment, tessellation, geometry, and compute shaders.
When raising the SPIR-V IR back into a language like GLSL or Apple MSL, "the goal is to emit GLSL or MSL that looks like it was written by a human and not awkward IR/assembly-like code."
The SPIRV-Cross source code is now available via this GitHub repository.
1 Comment