SPIR-V/Compilation

From OpenGL Wiki
< SPIR-V
Revision as of 17:28, 14 September 2017 by Alfonse (talk | contribs) (Page for SPIR-V compilation model, useful for transclusion.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

SPIR-V's compilation model looks similar to that of GLSL, but it does have some unique characteristics.

SPIR-V has the concept of specialization constants. These are values provided after a module is loaded but before it is linked. They are considered constant expressions in most cases, and they allow you

To support this in OpenGL, a shader object populated with a SPIR-V module can be specialized with constants. This function must be called before linking with a SPIR-V shader object, even if your shader does not use specialization constants.