diff --git a/src/spirv.hpp b/src/spirv.hpp new file mode 100644 index 00000000..f1251459 --- /dev/null +++ b/src/spirv.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include +#include + +namespace vil::spirv { + +struct Parsed { + std::vector spirv; + + // See spec "2.4. Logical Layout of a Module" + // Offsets to the beginning of the respective sections. + struct { + u32 caps; + u32 exts; + u32 extInstImport; + u32 memModel; + u32 entryPoints; + u32 execMode; + u32 debug; + u32 annotations; + u32 types; + u32 funcDecls; + u32 funcDefs; + } positions; +}; + +} // namespace