| 1 |
#version 450 |
| 2 |
#extension GL_EXT_scalar_block_layout : require |
| 3 |
layout(local_size_x = 3, local_size_y = 3, local_size_z = 2) in; |
| 4 |
|
| 5 |
struct X |
| 6 |
{ |
| 7 |
int x; |
| 8 |
int y; |
| 9 |
float z; |
| 10 |
}; |
| 11 |
|
| 12 |
layout(set = 0, binding = 0, scalar) uniform Foo |
| 13 |
{ |
| 14 |
int a; |
| 15 |
int b; |
| 16 |
mat4 c; |
| 17 |
X x[2]; |
| 18 |
}; |
| 19 |
|
| 20 |
layout(set = 0, binding = 1) uniform Bar |
| 21 |
{ |
| 22 |
int d; |
| 23 |
int e; |
| 24 |
}; |
| 25 |
|
| 26 |
layout(set = 1, binding = 2) buffer Baz |
| 27 |
{ |
| 28 |
int f; |
| 29 |
int g; |
| 30 |
} baz[3]; |
| 31 |
|
| 32 |
void main() |
| 33 |
{ |
| 34 |
uvec3 coords = gl_GlobalInvocationID; |
| 35 |
baz[coords.x].f = a + d; |
| 36 |
baz[coords.x].g = b * e; |
| 37 |
} |