SPIR-V Binary code Manipulation
SBM is an ObjectWeb’s ASM like library to manipulate SPIR-V binary code with Java.
The library uses a visitor model, meaning that SPIR-V modules will be
generated/read with objects having a function for each instruction possible
in the SPIR-V Specifications (up to 1.1 as to 2017/03/03). Those objects are what are called visitors.
Each visitor function name contains the corresponding instruction name with a few variations:
The CodeWriter
, CodeVisitor
, FunctionVisitor
, MemoryVisitor
, ModuleReaderDispatcher
, TypeVisitor
and Opcodes
classes are generated thanks to Spir-V Spec to Json