blob: 14acac19794b5687365dbe1bd0cba4d64c448150 [file] [log] [blame]
Jeff Bolz9f2aec42019-01-06 17:58:04 -06001#version 450
2
3#extension GL_EXT_buffer_reference : enable
4#pragma use_vulkan_memory_model
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 layout(offset = 32) int f[2];
13 coherent layout(offset = 48) ivec4 g;
14};
15
16layout(std430) buffer t2 {
17 blockType f;
18 blockType g;
19} t;
20
21void main() {
22 t.f.b = t.g.a;
23
24 blockType j = t.f;
25 j.d = j.c;
26 j.d = j.f[1];
27 j.d = j.g.y;
28}