a5d82d1138
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.
22 lines
344 B
Plaintext
22 lines
344 B
Plaintext
#version 450
|
|
layout(local_size_x = 1, local_size_y = 2, local_size_z = 3) in;
|
|
|
|
|
|
layout(binding = 0, std430) buffer _6_8
|
|
{
|
|
float _m0[];
|
|
} _8;
|
|
|
|
layout(binding = 1, std430) buffer _6_9
|
|
{
|
|
float _m0[];
|
|
} _9;
|
|
|
|
uvec3 _22 = gl_WorkGroupSize;
|
|
|
|
void main()
|
|
{
|
|
_8._m0[gl_WorkGroupID.x] = _9._m0[gl_WorkGroupID.x] + _8._m0[gl_WorkGroupID.x];
|
|
}
|
|
|