SPIRV-Cross/reference/shaders/comp/struct-packing.comp

69 lines
916 B
Plaintext
Raw Normal View History

2016-03-02 17:09:16 +00:00
#version 310 es
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
struct S0
{
vec2 a[1];
float b;
};
struct S1
{
vec3 a;
float b;
};
struct S2
{
vec3 a[1];
float b;
};
struct S3
{
vec2 a;
float b;
};
struct Content
{
S0 m0s[1];
S1 m1s[1];
S2 m2s[1];
S0 m0;
S1 m1;
S2 m2;
S3 m3;
float m4;
2016-03-02 17:09:16 +00:00
};
layout(binding = 1, std430) buffer SSBO1
2016-03-02 17:09:16 +00:00
{
Content content;
Content content1[2];
Content content2;
2016-03-02 17:09:16 +00:00
mat2 m0;
mat2 m1;
mat2x3 m2[4];
mat3x2 m3;
layout(row_major) mat2 m4;
layout(row_major) mat2 m5[9];
layout(row_major) mat2x3 m6[2][4];
layout(row_major) mat3x2 m7;
float array[];
2016-03-02 17:09:16 +00:00
} ssbo_430;
layout(binding = 0, std140) buffer SSBO0
{
Content content;
Content content1[2];
Content content2;
float array[];
} ssbo_140;
void main()
{
ssbo_430.content = ssbo_140.content;
}