项目作者: jglrxavpok

项目描述 :
SPIR-V Binary code Manipulation
高级语言: Java
项目地址: git://github.com/jglrxavpok/SBM.git
创建时间: 2016-04-10T17:41:27Z
项目社区:https://github.com/jglrxavpok/SBM

开源协议:MIT License

下载


SBM - SPIR-V Binary Manipulation library

SBM Logo

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:

  • OpType instructions are converted to CodeVisitor::visitType(args…)
  • OpExecutionMode does not have the exact same arguments as the corresponding instruction:
    the operands array is directly accessible in the ExecutionMode object.

Code generation

The CodeWriter, CodeVisitor, FunctionVisitor, MemoryVisitor, ModuleReaderDispatcher, TypeVisitor and Opcodes classes are generated thanks to Spir-V Spec to Json