1#version 450
2
3#extension GL_ARB_gpu_shader_int64 : enable
4#extension GL_EXT_buffer_reference : enable
5
6layout(buffer_reference, std430) buffer blockType {
7    layout(offset = 0)  int a;
8    layout(offset = 4)  int b;
9    layout(offset = 8)  int c;
10    layout(offset = 12) int d;
11    layout(offset = 16) int e;
12};
13
14layout(std430) buffer t2 {
15    blockType f;
16    blockType g;
17} t;
18
19flat in uint64_t h, i;
20
21void main() {
22
23    blockType b1[2] = blockType[2](blockType(h), blockType(i));
24    b1[0].a = b1[1].b;
25    blockType b2 = blockType(h);
26    blockType b3 = blockType(i);
27    b2.a = b3.b;
28    uint64_t j = uint64_t(b2);
29    b2 = blockType(j+256);
30}
31