SPIRV-Cross/reference/shaders/comp
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
..
atomic.comp Do not add dependencies for variables loaded from UniformConstant. 2016-04-01 19:58:26 +02:00
bake_gradient.comp Fix declaration of coherent images. 2017-08-29 15:52:59 +02:00
barriers.comp Add more exhaustive test for barrier handling. 2018-01-09 12:26:46 +01:00
basic.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
casts.comp Implement more correct integer op handling. 2016-05-13 15:23:33 +02:00
cfg-preserve-parameter.comp Analyze parameter preservation for functions. 2017-03-25 16:25:30 +01:00
cfg.comp Fix edge-case where do/while body is a dominator. 2017-08-02 11:58:24 +02:00
coherent-block.comp Add test shader for coherent SSBO. 2017-08-28 09:02:08 +02:00
coherent-image.comp Add restrict qualifier for images. 2017-08-29 15:54:22 +02:00
composite-array-initialization.comp Alter the handling of spec consts in non-Vulkan GLSL 2018-11-01 00:39:09 -07:00
composite-construct.comp Deduce constant LUTs from read-write variables. 2018-07-05 13:25:57 +02:00
culling.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
defer-parens.comp Add more dedicated test shader for defer-parens. 2016-12-08 09:05:30 +01:00
dowhile.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
generate_height.comp Rewrite everything to use Bitset rather than uint64_t. 2018-03-12 13:24:14 +01:00
image.comp Fix declaration of coherent images. 2017-08-29 15:52:59 +02:00
inout-struct.invalid.comp Preserve arguments with inout unless complete writes are made. 2017-08-09 17:06:41 +02:00
insert.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
mat3.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
mod.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
modf.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
read-write-only.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
rmw-matrix.comp Do not use RMW rewrite for matrices. 2018-05-04 10:35:56 +02:00
rmw-opt.comp Add regression test for RMW optimizations. 2017-09-06 09:20:55 +02:00
shared.comp Optimize away redundant barriers. 2018-01-09 12:17:38 +01:00
ssbo-array.comp Add array-of-SSBO test. 2016-03-22 14:49:43 +01:00
struct-layout.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
struct-packing.comp Handle inout properly with split access chains. 2018-05-11 10:15:42 +02:00
torture-loop.comp Emit readonly, writeonly for SSBOs. 2017-01-21 10:08:27 +01:00
type-alias.comp Defer parenthesis generation until needed. 2016-12-05 10:56:54 +01:00
udiv.comp Defer parenthesis generation until needed. 2016-12-05 10:56:54 +01:00