| 1 |
#pragma clang diagnostic ignored "-Wmissing-prototypes" |
| 2 |
|
| 3 |
#include <metal_stdlib> |
| 4 |
#include <simd/simd.h> |
| 5 |
|
| 6 |
using namespace metal; |
| 7 |
|
| 8 |
struct VertexOutput |
| 9 |
{ |
| 10 |
float4 HPosition; |
| 11 |
}; |
| 12 |
|
| 13 |
struct TestStruct |
| 14 |
{ |
| 15 |
float3 position; |
| 16 |
float radius; |
| 17 |
}; |
| 18 |
|
| 19 |
struct TestStruct_1 |
| 20 |
{ |
| 21 |
packed_float3 position; |
| 22 |
float radius; |
| 23 |
}; |
| 24 |
|
| 25 |
struct CB0 |
| 26 |
{ |
| 27 |
TestStruct_1 CB0[16]; |
| 28 |
}; |
| 29 |
|
| 30 |
struct main0_out |
| 31 |
{ |
| 32 |
float4 _entryPointOutput [[color(0)]]; |
| 33 |
}; |
| 34 |
|
| 35 |
static inline __attribute__((always_inline)) |
| 36 |
float4 _main(thread const VertexOutput& IN, constant CB0& _RESERVED_IDENTIFIER_FIXUP_24) |
| 37 |
{ |
| 38 |
TestStruct st; |
| 39 |
st.position = float3(_RESERVED_IDENTIFIER_FIXUP_24.CB0[1].position); |
| 40 |
st.radius = _RESERVED_IDENTIFIER_FIXUP_24.CB0[1].radius; |
| 41 |
float4 col = float4(st.position, st.radius); |
| 42 |
return col; |
| 43 |
} |
| 44 |
|
| 45 |
fragment main0_out main0(constant CB0& _RESERVED_IDENTIFIER_FIXUP_24 [[buffer(0)]], float4 gl_FragCoord [[position]]) |
| 46 |
{ |
| 47 |
main0_out out = {}; |
| 48 |
VertexOutput IN; |
| 49 |
IN.HPosition = gl_FragCoord; |
| 50 |
VertexOutput param = IN; |
| 51 |
VertexOutput param_1 = param; |
| 52 |
out._entryPointOutput = _main(param_1, _RESERVED_IDENTIFIER_FIXUP_24); |
| 53 |
return out; |
| 54 |
} |
| 55 |
|