SPIRV-Cross/reference
Grigory Dzhavadyan a5d82d1138 Alter the handling of spec consts in non-Vulkan GLSL
Previously, when generating non-Vulkan GLSL, each use of a spec constant
would be subsituted for its default value and the declaration of the constant
itself would be omitted completely.

This change slightly alters this behavior. The uses of the constant are kept,
as well as the declaration, although the latter is stripped of the layout
qualifier. The declaration is also prepended with the following code:

    #ifndef <constant name>_value
    #define <constant name> <default constant value>
    #endif

and the constant itself now looks like

    const <constant type> <constant name> = <constant name>_value;

The rationale for this change is that it gives the user a way to provide
custom values for specialization constants even when the target does not
support them.
2018-11-01 00:39:09 -07:00
..
opt Alter the handling of spec consts in non-Vulkan GLSL 2018-11-01 00:39:09 -07:00
shaders Alter the handling of spec consts in non-Vulkan GLSL 2018-11-01 00:39:09 -07:00
shaders-hlsl Add Windows support in Travis CI. 2018-10-27 00:22:30 +02:00
shaders-hlsl-no-opt Declare OpSpecConstantOp up-front on relevant targets. 2018-05-15 14:20:16 +02:00
shaders-msl Add Windows support in Travis CI. 2018-10-27 00:22:30 +02:00
shaders-msl-no-opt MSL: Swizzle gathers on depth textures as well. 2018-10-03 11:47:13 -05:00
shaders-no-opt Alter the handling of spec consts in non-Vulkan GLSL 2018-11-01 00:39:09 -07:00
shaders-reflection Prefix integer types with underscore 2018-06-21 09:24:22 -07:00