mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-11-13 23:50:08 +00:00
36 lines
340 B
Plaintext
36 lines
340 B
Plaintext
#version 450
|
|
layout(local_size_x = 1) in;
|
|
|
|
struct Baz
|
|
{
|
|
float c;
|
|
};
|
|
|
|
struct Bar
|
|
{
|
|
float d[2][4];
|
|
Baz baz[2];
|
|
};
|
|
|
|
struct Foo
|
|
{
|
|
mat2 a;
|
|
vec2 b;
|
|
Bar c[5];
|
|
};
|
|
|
|
layout(row_major, std430, set = 0, binding = 0) buffer SSBO
|
|
{
|
|
Foo foo;
|
|
Foo foo2;
|
|
};
|
|
|
|
void main()
|
|
{
|
|
Foo f = foo;
|
|
f.a += 1.0;
|
|
f.b += 2.0;
|
|
f.c[3].d[1][1] += 5.0;
|
|
foo2 = f;
|
|
}
|