| 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 main0_out |
| 9 |
{ |
| 10 |
float4 FragColor [[color(0)]]; |
| 11 |
}; |
| 12 |
|
| 13 |
static inline __attribute__((always_inline)) |
| 14 |
float4 foo(thread const float4& foo_1) |
| 15 |
{ |
| 16 |
return foo_1 + float4(1.0); |
| 17 |
} |
| 18 |
|
| 19 |
static inline __attribute__((always_inline)) |
| 20 |
float4 foo(thread const float3& foo_1) |
| 21 |
{ |
| 22 |
return foo_1.xyzz + float4(1.0); |
| 23 |
} |
| 24 |
|
| 25 |
static inline __attribute__((always_inline)) |
| 26 |
float4 foo_1(thread const float4& foo_2) |
| 27 |
{ |
| 28 |
return foo_2 + float4(2.0); |
| 29 |
} |
| 30 |
|
| 31 |
static inline __attribute__((always_inline)) |
| 32 |
float4 foo(thread const float2& foo_2) |
| 33 |
{ |
| 34 |
return foo_2.xyxy + float4(2.0); |
| 35 |
} |
| 36 |
|
| 37 |
fragment main0_out main0() |
| 38 |
{ |
| 39 |
main0_out out = {}; |
| 40 |
float4 foo_3 = float4(1.0); |
| 41 |
float4 foo_2 = foo(foo_3); |
| 42 |
float3 foo_5 = float3(1.0); |
| 43 |
float4 foo_4 = foo(foo_5); |
| 44 |
float4 foo_7 = float4(1.0); |
| 45 |
float4 foo_6 = foo_1(foo_7); |
| 46 |
float2 foo_9 = float2(1.0); |
| 47 |
float4 foo_8 = foo(foo_9); |
| 48 |
out.FragColor = ((foo_2 + foo_4) + foo_6) + foo_8; |
| 49 |
return out; |
| 50 |
} |
| 51 |
|