SPIRV-Cross/shaders-msl-no-opt/packing/struct-size-padding.comp
2019-07-23 10:30:37 +02:00

46 lines
352 B
Plaintext

#version 450
layout(local_size_x = 1) in;
struct A
{
float v;
};
struct B
{
vec2 v;
};
struct C
{
vec3 v;
};
struct D
{
vec4 v;
};
struct E
{
vec4 a;
vec2 b;
};
layout(std140, set = 0, binding = 0) buffer SSBO
{
A a[4];
B b[4];
C c[4];
D d[4];
mat2 e[4];
E f[];
};
void main()
{
f[0].a = vec4(2.0);
mat2 tmp = e[1];
e[2] = tmp;
}