The SPIR-V Specification (referred usually as the SPIR-V Spec) is the official description of how the SPIR-V intermediate representation is laid out. This defines what is and is not valid SPIR-V.
Most information regarding the spec can be found on in the SPIR-V registry
Starting in SPIR-V 1.3 the SPIR-V Working Group decided to start adopting a "unified spec" instead of creating another separate version. The goal was to be able to reference a single spec instead of having to bounce around versions. Where there is a 1.0, 1.1, and 1.2 version of the spec, it is highly encouraged to ignore those and proceed to use the unified spec.
The spec is generated for
The spec is currently broken down into 4 sections
- Introduction
- Gives a helpful overview of SPIR-V. It is not very long and worth reading as the SPIR-V Guide is aimed not to repeat the information.
- Specification
- Breaks down all the terms used in SPIR-V. It also goes over what is and is not valid.
- Binary Form
- List all instructions, starting with the numerical values for all fields. This is the information found in the SPIRV-Headers
- Instructions
- Lists the information for each instruction found in SPIR-V
- Appendix
- Goes over changes made to unified spec over time
The part of the SPIR-V spec and header is generated from the spirv.core.grammar.json file.
This contains information about every instruction and operand in SPIR-V