SPIRV-Cross/reference/shaders/vulkan/comp/spec-constant-work-group-size.vk.comp.vk
2018-11-01 11:23:48 +01:00

25 lines
575 B
Plaintext

#version 450
layout(local_size_x_id = 10, local_size_y = 20, local_size_z = 1) in;
layout(constant_id = 1) const int b = 2;
layout(constant_id = 0) const int a = 1;
const uint _21 = (uint(a) + 0u);
const uint _27 = gl_WorkGroupSize.x;
const uint _28 = (_21 + _27);
const uint _29 = gl_WorkGroupSize.y;
const uint _30 = (_28 + _29);
const int _32 = (1 - a);
layout(set = 1, binding = 0, std430) writeonly buffer SSBO
{
int v[];
} _17;
void main()
{
int spec_const_array_size[b];
spec_const_array_size[a] = a;
_17.v[_30] = b + spec_const_array_size[_32];
}