Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 1.8 KB

what_is_spirv.md

File metadata and controls

16 lines (11 loc) · 1.8 KB

What is SPIR-V

SPIR-V is a binary intermediate representation interchange format used to interface with a heterogeneous machine. SPIR-V expresses the operations that can be broken down to match an ISA found on a GPU, FPGA, DSP, CPU, etc. The most common use cases of SPIR-V is to be used for graphical-shader stages and compute kernels in other APIs such as Vulkan, OpenGL and OpenCL.

The Khronos SPIR-V Registry is the home for:

  • The SPIR-V specification,
  • Specifications for supported extended instruction sets, and
  • Specifications for Khronos and vendor extensions to SPIR-V.

LunarG has written a very nice white paper about SPIR-V and its advantages, and a high-level description of the binary representation. There are also two great Khronos presentations from Vulkan DevDay 2016 here and here (video of both).

Compiler technology and languages evolve quickly. SPIR-V provides a common interchange format to transition, not just into Vulkan, OpenGL, and OpenCL drivers, but between different tool chains. With a well defined format, validation rules, and rich tools SPIR-V enables custom shader compiler flows, choice of language, and debuggability not available with graphical shaders and compute kernels before. what_is_spirv_overview.png