• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#include <metal_stdlib>
2#include <simd/simd.h>
3using namespace metal;
4struct A {
5    int x;
6    int y;
7};
8struct B {
9    float x;
10    array<float, 2> y;
11    A z;
12};
13struct Inputs {
14};
15struct Outputs {
16    half4 sk_FragColor [[color(0)]];
17};
18struct Globals {
19    A a1;
20    B b1;
21};
22fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
23    Globals _globals{{}, {}};
24    (void)_globals;
25    Outputs _out;
26    (void)_out;
27    _globals.a1.x = 0;
28    _globals.b1.x = 0.0;
29    _out.sk_FragColor.x = half(_globals.a1.x) + half(_globals.b1.x);
30    return _out;
31}
32