#version 310 es
layout(local_size_x = 1) in;

struct S0
{
   vec4 a;
};

struct S1
{
   vec4 a;
};

vec4 overload(S0 s0)
{
   return s0.a;
}

vec4 overload(S1 s1)
{
   return s1.a;
}

layout(std430, binding = 0) buffer SSBO0
{
   S0 s0s[];
};

layout(std430, binding = 1) buffer SSBO1
{
   S1 s1s[];
};

layout(std430, binding = 2) buffer SSBO2
{
   vec4 outputs[];
};


void main()
{
   S0 s0 = s0s[gl_GlobalInvocationID.x];
   S1 s1 = s1s[gl_GlobalInvocationID.x];
   outputs[gl_GlobalInvocationID.x] = overload(s0) + overload(s1); 
}
