SPVGEN is a library to generate SPIR-V binary. It integrates glslang and SPIRV-Tools.
The APIs are listed in include/spvgen.h and vfx.h.
- InitSpvGen()
- spvCompileAndLinkProgram()
- spvGetSpirvBinaryFromProgram()
- spvDestroyProgram()
- spvAssembleSpirv()
- spvDisassembleSpirv()
- spvOptimizeSpirv()
- spvFreeBuffer()
- spvValidateSpirv()
- vfxParseFile()
- vfxGetPipelineDoc()
- vfxCloseDoc()
SPVGEN is now built as part of the AMDVLK build system, but is not built by default.
First, follow the AMDVLK instructions to get sources and use cmake
to set up the build.
Then, use
cd spvgen/external && python fetch_external_sources.py
cd xgl && cmake --build {build directory} --target spvgen