Update rive-cpp to 2.0 version
[platform/core/uifw/rive-tizen.git] / submodule / skia / tests / sksl / shared / ScalarConversionConstructorsES3.metal
1 #include <metal_stdlib>
2 #include <simd/simd.h>
3 using namespace metal;
4 struct Uniforms {
5     half4 colorGreen;
6     half4 colorRed;
7 };
8 struct Inputs {
9 };
10 struct Outputs {
11     half4 sk_FragColor [[color(0)]];
12 };
13 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
14     Outputs _out;
15     (void)_out;
16     float f = float(_uniforms.colorGreen.y);
17     int i = int(_uniforms.colorGreen.y);
18     uint u = uint(_uniforms.colorGreen.y);
19     bool b = bool(_uniforms.colorGreen.y);
20     float f1 = f;
21     float f2 = float(i);
22     float f3 = float(u);
23     float f4 = float(b);
24     int i1 = int(f);
25     int i2 = i;
26     int i3 = int(u);
27     int i4 = int(b);
28     uint u1 = uint(f);
29     uint u2 = uint(i);
30     uint u3 = u;
31     uint u4 = uint(b);
32     bool b1 = bool(f);
33     bool b2 = bool(i);
34     bool b3 = bool(u);
35     bool b4 = b;
36     _out.sk_FragColor = ((((((((((((((half(f1) + half(f2)) + half(f3)) + half(f4)) + half(i1)) + half(i2)) + half(i3)) + half(i4)) + half(u1)) + half(u2)) + half(u3)) + half(u4)) + half(b1)) + half(b2)) + half(b3)) + half(b4) == 16.0h ? _uniforms.colorGreen : _uniforms.colorRed;
37     return _out;
38 }