1#version 450 core
2
3#extension GL_EXT_scalar_block_layout : enable
4
5// Block memory layout
6struct S
7{
8    float      a;   // offset 0
9    vec2       b;   // offset 4
10    double     c;   // offset 16
11    float      d;   // offset 24
12    vec3       e;   // offset 28
13    float      f;   // offset 40
14    // size = 44, align = 8
15};
16
17layout(column_major, scalar) uniform B1
18{
19    float      a;     // offset = 0
20    vec2       b;     // offset = 4
21    vec3       c;     // offset = 12
22    float      d[2];  // offset = 24
23    mat2x3     e;     // offset = 32, takes 24 bytes, matrixstride = 12
24    mat2x3     f[2];  // offset = 56, takes 48 bytes, matrixstride = 12, arraystride = 24
25    float      g;     // offset = 104
26    S          h;     // offset = 112 (aligned to multiple of 8)
27    S          i[2];  // offset = 160 (aligned to multiple of 8) stride = 48
28};
29
30void main()
31{
32}
33