SPIRV-Cross/shaders-msl-no-opt/packing/struct-size-padding.comp

46 lines
352 B
Plaintext
Raw Normal View History

2019-07-23 08:30:37 +00:00
#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;
}