Further reading
We have covered only a small subset of the SPIR-V specification. If you would like to expand our parser implementation for your needs, we highly recommend consulting the official specification: https://www.khronos.org/registry/SPIR-V/specs/unified1/SPIRV.html.
We wrote a custom SPIR-V parser for this chapter, primarily for educational purposes. For your own project, we recommend using the existing reflection library from Khronos: https://github.com/KhronosGroup/SPIRV-Reflect.
It provides the functionality described in this chapter to deduce the pipeline layout for a shader binary and many other features.