SPIRV-Cross/reference/shaders-msl/comp/defer-parens.comp
2019-09-24 18:13:04 -04:00

26 lines
523 B
Plaintext

#include <metal_stdlib>
#include <simd/simd.h>
using namespace metal;
struct SSBO
{
float4 data;
int index;
};
constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u);
kernel void main0(device SSBO& _13 [[buffer(0)]])
{
float4 d = _13.data;
_13.data = float4(d.x, d.yz + float2(10.0), d.w);
_13.data = (d + d) + d;
_13.data = (d.yz + float2(10.0)).xxyy;
float t = (d.yz + float2(10.0)).y;
_13.data = float4(t);
t = (d.zw + float2(10.0))[_13.index];
_13.data = float4(t);
}