1cb93a386Sopenharmony_ci#include <metal_stdlib>
2cb93a386Sopenharmony_ci#include <simd/simd.h>
3cb93a386Sopenharmony_ciusing namespace metal;
4cb93a386Sopenharmony_cistruct Inputs {
5cb93a386Sopenharmony_ci};
6cb93a386Sopenharmony_cistruct Outputs {
7cb93a386Sopenharmony_ci    half4 sk_FragColor [[color(0)]];
8cb93a386Sopenharmony_ci};
9cb93a386Sopenharmony_cistruct Globals {
10cb93a386Sopenharmony_ci    texture2d<half> test2D;
11cb93a386Sopenharmony_ci    sampler test2DSmplr;
12cb93a386Sopenharmony_ci    texture2d<half> test2DRect;
13cb93a386Sopenharmony_ci    sampler test2DRectSmplr;
14cb93a386Sopenharmony_ci};
15cb93a386Sopenharmony_cifragment Outputs fragmentMain(Inputs _in [[stage_in]], texture2d<half> test2D[[texture(0)]], sampler test2DSmplr[[sampler(0)]], texture2d<half> test2DRect[[texture(1)]], sampler test2DRectSmplr[[sampler(1)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
16cb93a386Sopenharmony_ci    Globals _globals{test2D, test2DSmplr, test2DRect, test2DRectSmplr};
17cb93a386Sopenharmony_ci    (void)_globals;
18cb93a386Sopenharmony_ci    Outputs _out;
19cb93a386Sopenharmony_ci    (void)_out;
20cb93a386Sopenharmony_ci    float3 _skTemp0;
21cb93a386Sopenharmony_ci    _out.sk_FragColor = _globals.test2D.sample(_globals.test2DSmplr, float2(0.5));
22cb93a386Sopenharmony_ci    _out.sk_FragColor = _globals.test2DRect.sample(_globals.test2DRectSmplr, float2(0.5));
23cb93a386Sopenharmony_ci    _out.sk_FragColor = _globals.test2DRect.sample(_globals.test2DRectSmplr, (_skTemp0 = float3(0.5), _skTemp0.xy / _skTemp0.z));
24cb93a386Sopenharmony_ci    return _out;
25cb93a386Sopenharmony_ci}
26