SPIR-V/Compilation: Difference between revisions

From OpenGL Wiki
Jump to navigation Jump to search
Page for SPIR-V compilation model, useful for transclusion.
(No difference)

Revision as of 17:28, 14 September 2017

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.