2016-09-02 17:20:21 +00:00
|
|
|
#version 450 core
|
|
|
|
|
|
|
|
struct MyStruct
|
|
|
|
{
|
2016-09-11 18:33:43 +00:00
|
|
|
vec2 foo[2];
|
2016-09-02 17:20:21 +00:00
|
|
|
bool sb;
|
|
|
|
};
|
|
|
|
|
|
|
|
layout(binding = 0, std430) buffer SSBO0
|
|
|
|
{
|
|
|
|
MyStruct a;
|
|
|
|
} inBuf;
|
|
|
|
|
|
|
|
layout(binding = 1, std430) buffer SSBO1
|
|
|
|
{
|
|
|
|
MyStruct b;
|
|
|
|
} outBuf;
|
|
|
|
|
|
|
|
layout(binding = 2, std140) uniform UBO
|
|
|
|
{
|
|
|
|
MyStruct c;
|
|
|
|
} uBuf;
|
|
|
|
|
|
|
|
struct Nested {
|
|
|
|
float f;
|
2016-09-11 18:33:43 +00:00
|
|
|
MyStruct S[2];
|
2016-09-02 17:20:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
layout(binding = 2, std140) uniform UBON
|
|
|
|
{
|
|
|
|
Nested N1;
|
|
|
|
} uBufN;
|
|
|
|
|
|
|
|
layout(binding = 1, std430) buffer SSBO1N
|
|
|
|
{
|
|
|
|
Nested N2;
|
|
|
|
} outBufN;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
MyStruct t = inBuf.a;
|
|
|
|
outBuf.b = t;
|
|
|
|
t = uBuf.c;
|
|
|
|
outBuf.b = t;
|
|
|
|
|
|
|
|
Nested n = uBufN.N1;
|
|
|
|
outBufN.N2 = n;
|
|
|
|
}
|