From cf1fb17c8d59bedb80768fa3e0b4016a955fa46b Mon Sep 17 00:00:00 2001 From: nyorain Date: Tue, 10 Dec 2024 21:20:08 +0100 Subject: [PATCH] WIP: start spirv patching --- src/spirv.hpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/spirv.hpp 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