SPIRV-Cross/shaders-msl/comp/array-length.msl2.argument.discrete.comp
2019-05-27 16:44:02 +02:00

39 lines
535 B
Plaintext

#version 450
layout(local_size_x = 1) in;
layout(set = 0, binding = 1, std140) buffer SSBO
{
uint size;
float v[];
};
layout(set = 1, binding = 2, std430) buffer SSBO1
{
float bz[];
} ssbos[2];
layout(set = 2, binding = 5, std140) buffer SSBO2
{
uint size2;
float w[];
};
layout(set = 3, binding = 2, std430) buffer SSBO3
{
float bz[];
} ssbos2[2];
uint get_size()
{
uint len = v.length();
len += ssbos[1].bz.length();
len += w.length();
len += ssbos2[0].bz.length();
return len;
}
void main()
{
size = get_size();
}