• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#include <metal_stdlib>
2#include <simd/simd.h>
3using namespace metal;
4struct Inputs {
5};
6struct Outputs {
7    float4 sk_FragColor [[color(0)]];
8};
9void out_half_vh(thread float& v);
10void _skOutParamHelper0_out_half_vh(thread float& h) {
11    float _var0;
12    out_half_vh(_var0);
13    h = _var0;
14}
15void out_half2_vh2(thread float2& v);
16void _skOutParamHelper1_out_half2_vh2(thread float2& h2) {
17    float2 _var0;
18    out_half2_vh2(_var0);
19    h2 = _var0;
20}
21void out_half3_vh3(thread float3& v);
22void _skOutParamHelper2_out_half3_vh3(thread float3& h3) {
23    float3 _var0;
24    out_half3_vh3(_var0);
25    h3 = _var0;
26}
27void out_half4_vh4(thread float4& v);
28void _skOutParamHelper3_out_half4_vh4(thread float4& h4) {
29    float4 _var0;
30    out_half4_vh4(_var0);
31    h4 = _var0;
32}
33void out_half_vh(thread float& v);
34void _skOutParamHelper4_out_half_vh(thread float3& h3) {
35    float _var0;
36    out_half_vh(_var0);
37    h3.y = _var0;
38}
39void out_half2_vh2(thread float2& v);
40void _skOutParamHelper5_out_half2_vh2(thread float3& h3) {
41    float2 _var0;
42    out_half2_vh2(_var0);
43    h3.xz = _var0;
44}
45void out_half4_vh4(thread float4& v);
46void _skOutParamHelper6_out_half4_vh4(thread float4& h4) {
47    float4 _var0;
48    out_half4_vh4(_var0);
49    h4.zwxy = _var0;
50}
51void out_pair_vhh(thread float& v1, thread float& v2);
52void _skOutParamHelper7_out_pair_vhh(thread float& h, thread float& h1) {
53    float _var0;
54    float _var1;
55    out_pair_vhh(_var0, _var1);
56    h = _var0;
57    h1 = _var1;
58}
59void out_pair_vhh(thread float& v1, thread float& v2);
60void _skOutParamHelper8_out_pair_vhh(thread float& h, thread float&) {
61    float _var0;
62    float _var1;
63    out_pair_vhh(_var0, _var1);
64    h = _var0;
65    h = _var1;
66}
67void out_pair_vhh(thread float& v1, thread float& v2);
68void _skOutParamHelper9_out_pair_vhh(thread float2& h2, thread float2&) {
69    float _var0;
70    float _var1;
71    out_pair_vhh(_var0, _var1);
72    h2.x = _var0;
73    h2.y = _var1;
74}
75void out_pair_vhh(thread float& v1, thread float& v2);
76void _skOutParamHelper10_out_pair_vhh(thread float2& h2, thread float2&) {
77    float _var0;
78    float _var1;
79    out_pair_vhh(_var0, _var1);
80    h2.x = _var0;
81    h2.x = _var1;
82}
83void out_pair_vhh(thread float& v1, thread float& v2);
84void _skOutParamHelper11_out_pair_vhh(thread float2& h2, thread float3& h3) {
85    float _var0;
86    float _var1;
87    out_pair_vhh(_var0, _var1);
88    h2.x = _var0;
89    h3.x = _var1;
90}
91void out_half2x2_vh22(thread float2x2& v);
92void _skOutParamHelper12_out_half2x2_vh22(thread float2x2& h2x2) {
93    float2x2 _var0;
94    out_half2x2_vh22(_var0);
95    h2x2 = _var0;
96}
97void out_half3x3_vh33(thread float3x3& v);
98void _skOutParamHelper13_out_half3x3_vh33(thread float3x3& h3x3) {
99    float3x3 _var0;
100    out_half3x3_vh33(_var0);
101    h3x3 = _var0;
102}
103void out_half4x4_vh44(thread float4x4& v);
104void _skOutParamHelper14_out_half4x4_vh44(thread float4x4& h4x4) {
105    float4x4 _var0;
106    out_half4x4_vh44(_var0);
107    h4x4 = _var0;
108}
109void out_half3_vh3(thread float3& v);
110void _skOutParamHelper15_out_half3_vh3(thread float3x3& h3x3) {
111    float3 _var0;
112    out_half3_vh3(_var0);
113    h3x3[1] = _var0;
114}
115void out_half4_vh4(thread float4& v);
116void _skOutParamHelper16_out_half4_vh4(thread float4x4& h4x4) {
117    float4 _var0;
118    out_half4_vh4(_var0);
119    h4x4[3].zwxy = _var0;
120}
121void out_half2_vh2(thread float2& v);
122void _skOutParamHelper17_out_half2_vh2(thread float2x2& h2x2) {
123    float2 _var0;
124    out_half2_vh2(_var0);
125    h2x2[0] = _var0;
126}
127void out_int_vi(thread int& v);
128void _skOutParamHelper18_out_int_vi(thread int& i) {
129    int _var0;
130    out_int_vi(_var0);
131    i = _var0;
132}
133void out_int2_vi2(thread int2& v);
134void _skOutParamHelper19_out_int2_vi2(thread int2& i2) {
135    int2 _var0;
136    out_int2_vi2(_var0);
137    i2 = _var0;
138}
139void out_int3_vi3(thread int3& v);
140void _skOutParamHelper20_out_int3_vi3(thread int3& i3) {
141    int3 _var0;
142    out_int3_vi3(_var0);
143    i3 = _var0;
144}
145void out_int4_vi4(thread int4& v);
146void _skOutParamHelper21_out_int4_vi4(thread int4& i4) {
147    int4 _var0;
148    out_int4_vi4(_var0);
149    i4 = _var0;
150}
151void out_int3_vi3(thread int3& v);
152void _skOutParamHelper22_out_int3_vi3(thread int4& i4) {
153    int3 _var0;
154    out_int3_vi3(_var0);
155    i4.xyz = _var0;
156}
157void out_float_vf(thread float& v);
158void _skOutParamHelper23_out_float_vf(thread float& f) {
159    float _var0;
160    out_float_vf(_var0);
161    f = _var0;
162}
163void out_float2_vf2(thread float2& v);
164void _skOutParamHelper24_out_float2_vf2(thread float2& f2) {
165    float2 _var0;
166    out_float2_vf2(_var0);
167    f2 = _var0;
168}
169void out_float3_vf3(thread float3& v);
170void _skOutParamHelper25_out_float3_vf3(thread float3& f3) {
171    float3 _var0;
172    out_float3_vf3(_var0);
173    f3 = _var0;
174}
175void out_float4_vf4(thread float4& v);
176void _skOutParamHelper26_out_float4_vf4(thread float4& f4) {
177    float4 _var0;
178    out_float4_vf4(_var0);
179    f4 = _var0;
180}
181void out_float2_vf2(thread float2& v);
182void _skOutParamHelper27_out_float2_vf2(thread float3& f3) {
183    float2 _var0;
184    out_float2_vf2(_var0);
185    f3.xy = _var0;
186}
187void out_float_vf(thread float& v);
188void _skOutParamHelper28_out_float_vf(thread float2& f2) {
189    float _var0;
190    out_float_vf(_var0);
191    f2.x = _var0;
192}
193void out_float2x2_vf22(thread float2x2& v);
194void _skOutParamHelper29_out_float2x2_vf22(thread float2x2& f2x2) {
195    float2x2 _var0;
196    out_float2x2_vf22(_var0);
197    f2x2 = _var0;
198}
199void out_float3x3_vf33(thread float3x3& v);
200void _skOutParamHelper30_out_float3x3_vf33(thread float3x3& f3x3) {
201    float3x3 _var0;
202    out_float3x3_vf33(_var0);
203    f3x3 = _var0;
204}
205void out_float4x4_vf44(thread float4x4& v);
206void _skOutParamHelper31_out_float4x4_vf44(thread float4x4& f4x4) {
207    float4x4 _var0;
208    out_float4x4_vf44(_var0);
209    f4x4 = _var0;
210}
211void out_float_vf(thread float& v);
212void _skOutParamHelper32_out_float_vf(thread float2x2& f2x2) {
213    float _var0;
214    out_float_vf(_var0);
215    f2x2[0].x = _var0;
216}
217void out_float4_vf4(thread float4& v);
218void _skOutParamHelper33_out_float4_vf4(thread float4x4& f4x4) {
219    float4 _var0;
220    out_float4_vf4(_var0);
221    f4x4[1] = _var0;
222}
223void out_bool_vb(thread bool& v);
224void _skOutParamHelper34_out_bool_vb(thread bool& b) {
225    bool _var0;
226    out_bool_vb(_var0);
227    b = _var0;
228}
229void out_bool2_vb2(thread bool2& v);
230void _skOutParamHelper35_out_bool2_vb2(thread bool2& b2) {
231    bool2 _var0;
232    out_bool2_vb2(_var0);
233    b2 = _var0;
234}
235void out_bool3_vb3(thread bool3& v);
236void _skOutParamHelper36_out_bool3_vb3(thread bool3& b3) {
237    bool3 _var0;
238    out_bool3_vb3(_var0);
239    b3 = _var0;
240}
241void out_bool4_vb4(thread bool4& v);
242void _skOutParamHelper37_out_bool4_vb4(thread bool4& b4) {
243    bool4 _var0;
244    out_bool4_vb4(_var0);
245    b4 = _var0;
246}
247void out_bool2_vb2(thread bool2& v);
248void _skOutParamHelper38_out_bool2_vb2(thread bool4& b4) {
249    bool2 _var0;
250    out_bool2_vb2(_var0);
251    b4.xw = _var0;
252}
253void out_bool_vb(thread bool& v);
254void _skOutParamHelper39_out_bool_vb(thread bool3& b3) {
255    bool _var0;
256    out_bool_vb(_var0);
257    b3.z = _var0;
258}
259void out_half_vh(thread float& v) {
260    v = 1.0;
261}
262void out_half2_vh2(thread float2& v) {
263    v = float2(2.0);
264}
265void out_half3_vh3(thread float3& v) {
266    v = float3(3.0);
267}
268void out_half4_vh4(thread float4& v) {
269    v = float4(4.0);
270}
271void out_half2x2_vh22(thread float2x2& v) {
272    v = float2x2(2.0);
273}
274void out_half3x3_vh33(thread float3x3& v) {
275    v = float3x3(3.0);
276}
277void out_half4x4_vh44(thread float4x4& v) {
278    v = float4x4(4.0);
279}
280void out_int_vi(thread int& v) {
281    v = 1;
282}
283void out_int2_vi2(thread int2& v) {
284    v = int2(2);
285}
286void out_int3_vi3(thread int3& v) {
287    v = int3(3);
288}
289void out_int4_vi4(thread int4& v) {
290    v = int4(4);
291}
292void out_float_vf(thread float& v) {
293    v = 1.0;
294}
295void out_float2_vf2(thread float2& v) {
296    v = float2(2.0);
297}
298void out_float3_vf3(thread float3& v) {
299    v = float3(3.0);
300}
301void out_float4_vf4(thread float4& v) {
302    v = float4(4.0);
303}
304void out_float2x2_vf22(thread float2x2& v) {
305    v = float2x2(2.0);
306}
307void out_float3x3_vf33(thread float3x3& v) {
308    v = float3x3(3.0);
309}
310void out_float4x4_vf44(thread float4x4& v) {
311    v = float4x4(4.0);
312}
313void out_bool_vb(thread bool& v) {
314    v = true;
315}
316void out_bool2_vb2(thread bool2& v) {
317    v = bool2(false);
318}
319void out_bool3_vb3(thread bool3& v) {
320    v = bool3(true);
321}
322void out_bool4_vb4(thread bool4& v) {
323    v = bool4(false);
324}
325void out_pair_vhh(thread float& v1, thread float& v2) {
326    v1 = 1.0;
327    v2 = 2.0;
328}
329fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
330    Outputs _out;
331    (void)_out;
332    float h;
333    _skOutParamHelper0_out_half_vh(h);
334    float2 h2;
335    _skOutParamHelper1_out_half2_vh2(h2);
336    float3 h3;
337    _skOutParamHelper2_out_half3_vh3(h3);
338    float4 h4;
339    _skOutParamHelper3_out_half4_vh4(h4);
340    _skOutParamHelper4_out_half_vh(h3);
341    _skOutParamHelper5_out_half2_vh2(h3);
342    _skOutParamHelper6_out_half4_vh4(h4);
343    _out.sk_FragColor = float4(h, h2.x, h3.x, h4.x);
344    float h1;
345    _skOutParamHelper7_out_pair_vhh(h, h1);
346    _skOutParamHelper8_out_pair_vhh(h, h);
347    _skOutParamHelper9_out_pair_vhh(h2, h2);
348    _skOutParamHelper10_out_pair_vhh(h2, h2);
349    _skOutParamHelper11_out_pair_vhh(h2, h3);
350    float2x2 h2x2;
351    _skOutParamHelper12_out_half2x2_vh22(h2x2);
352    float3x3 h3x3;
353    _skOutParamHelper13_out_half3x3_vh33(h3x3);
354    float4x4 h4x4;
355    _skOutParamHelper14_out_half4x4_vh44(h4x4);
356    _skOutParamHelper15_out_half3_vh3(h3x3);
357    _skOutParamHelper16_out_half4_vh4(h4x4);
358    _skOutParamHelper17_out_half2_vh2(h2x2);
359    _out.sk_FragColor = float4(h2x2[0].x, h3x3[0].x, h4x4[0].x, 1.0);
360    int i;
361    _skOutParamHelper18_out_int_vi(i);
362    int2 i2;
363    _skOutParamHelper19_out_int2_vi2(i2);
364    int3 i3;
365    _skOutParamHelper20_out_int3_vi3(i3);
366    int4 i4;
367    _skOutParamHelper21_out_int4_vi4(i4);
368    _skOutParamHelper22_out_int3_vi3(i4);
369    _out.sk_FragColor = float4(float(i), float(i2.x), float(i3.x), float(i4.x));
370    float f;
371    _skOutParamHelper23_out_float_vf(f);
372    float2 f2;
373    _skOutParamHelper24_out_float2_vf2(f2);
374    float3 f3;
375    _skOutParamHelper25_out_float3_vf3(f3);
376    float4 f4;
377    _skOutParamHelper26_out_float4_vf4(f4);
378    _skOutParamHelper27_out_float2_vf2(f3);
379    _skOutParamHelper28_out_float_vf(f2);
380    _out.sk_FragColor = float4(f, f2.x, f3.x, f4.x);
381    float2x2 f2x2;
382    _skOutParamHelper29_out_float2x2_vf22(f2x2);
383    float3x3 f3x3;
384    _skOutParamHelper30_out_float3x3_vf33(f3x3);
385    float4x4 f4x4;
386    _skOutParamHelper31_out_float4x4_vf44(f4x4);
387    _skOutParamHelper32_out_float_vf(f2x2);
388    _skOutParamHelper33_out_float4_vf4(f4x4);
389    _out.sk_FragColor = float4(f2x2[0].x, f3x3[0].x, f4x4[0].x, 1.0);
390    bool b;
391    _skOutParamHelper34_out_bool_vb(b);
392    bool2 b2;
393    _skOutParamHelper35_out_bool2_vb2(b2);
394    bool3 b3;
395    _skOutParamHelper36_out_bool3_vb3(b3);
396    bool4 b4;
397    _skOutParamHelper37_out_bool4_vb4(b4);
398    _skOutParamHelper38_out_bool2_vb2(b4);
399    _skOutParamHelper39_out_bool_vb(b3);
400    _out.sk_FragColor = float4(float(b), float(b2.x), float(b3.x), float(b4.x));
401    return _out;
402}
403