Skip to content

amdvlk-admin/spvgen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPVGEN

SPVGEN is a libaray to generate SPIR-V binary. It integrates glslang and SPIRV-Tools.

APIs

The APIs are listed in spvgen.h and vfx.h.

Initialization

  • InitSpvGen()

Convert GLSL to SPIR-V binary

  • spvCompileAndLinkProgram()
  • spvGetSpirvBinaryFromProgram()
  • spvDestroyProgram()

Assemble SPIR-V

  • spvAssembleSpirv()

Disassemble SPIR-V

  • spvDisassembleSpirv()

Optimize SPIR-V

  • spvOptimizeSpirv
  • spvFreeBuffer

Validate SPIR-V

  • spvValidateSpirv()

Parse .pipe file

  • vfxParseFile()
  • vfxGetPipelineDoc()
  • vfxCloseDoc()

How to build

cd external/
python fetch_external_sources.py
cd ..
cmake -H. -Brbuild64 -DCMAKE_BUILD_TYPE=release -DXGL_LLPC_PATH=<PATH_TO_LLPC> 
cd rbuild64
make
cd ..
cmake -H. -Bdbuild64 -DCMAKE_BUILD_TYPE=Debug -DXGL_LLPC_PATH=<PATH_TO_LLPC>
cd dbuild64
make

To build 32bit library, please add "-DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32" in cmake.

SPVGEN depends on LLPC header files. You need to download the files from llpc/include/.

About

Library to Generate SPIR-V Binary

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 95.6%
  • C 3.6%
  • CMake 0.8%