SPIRV-Cross/reference/shaders/vulkan/comp/spec-constant-op-member-array.vk.comp.vk
Hans-Kristian Arntzen 4e7777c443 Update to latest glslang/SPIRV-Tools.
Fix various bugs along the way.
2019-01-30 13:41:57 +01:00

36 lines
599 B
Plaintext

#version 450
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
layout(constant_id = 0) const int a = 100;
layout(constant_id = 1) const int b = 200;
struct A
{
int member0[a];
int member1[b];
};
struct B
{
int member0[b];
int member1[a];
};
layout(constant_id = 2) const int c = 300;
const int d = (c + 50);
layout(constant_id = 3) const int e = 400;
layout(set = 1, binding = 0, std430) buffer SSBO
{
A member_a;
B member_b;
int v[a];
int w[d];
} _22;
void main()
{
_22.w[gl_GlobalInvocationID.x] += (_22.v[gl_GlobalInvocationID.x] + e);
}