#include <metal_stdlib>
#include <simd/simd.h>

using namespace metal;

struct SSBO3
{
    float4 v;
};

struct SSBO0
{
    float4 v;
};

struct SSBO1
{
    float4 v;
};

struct SSBO2
{
    float4 v;
};

constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u);

struct spvDescriptorSetBuffer0
{
    device SSBO0* ssbo0 [[id(0)]];
};

struct spvDescriptorSetBuffer1
{
    device SSBO1* ssbo1 [[id(0)]];
};

kernel void main0(constant spvDescriptorSetBuffer0& spvDescriptorSet0 [[buffer(0)]], constant spvDescriptorSetBuffer1& spvDescriptorSet1 [[buffer(1)]], device SSBO3& ssbo3 [[buffer(2)]], device SSBO2& ssbo2 [[buffer(3)]])
{
    ssbo3.v = ((*spvDescriptorSet0.ssbo0).v + (*spvDescriptorSet1.ssbo1).v) + ssbo2.v;
}

