1cb93a386Sopenharmony_ci
2cb93a386Sopenharmony_ciout vec4 sk_FragColor;
3cb93a386Sopenharmony_ciuniform vec4 colorGreen;
4cb93a386Sopenharmony_ciuniform vec4 colorRed;
5cb93a386Sopenharmony_cibool test_half_b() {
6cb93a386Sopenharmony_ci    bool ok = true;
7cb93a386Sopenharmony_ci    mat2x3 m23 = mat2x3(2.0);
8cb93a386Sopenharmony_ci    ok = ok && m23 == mat2x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0);
9cb93a386Sopenharmony_ci    mat2x4 m24 = mat2x4(3.0);
10cb93a386Sopenharmony_ci    ok = ok && m24 == mat2x4(3.0, 0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0);
11cb93a386Sopenharmony_ci    mat3x2 m32 = mat3x2(4.0);
12cb93a386Sopenharmony_ci    ok = ok && m32 == mat3x2(4.0, 0.0, 0.0, 4.0, 0.0, 0.0);
13cb93a386Sopenharmony_ci    mat3x4 m34 = mat3x4(5.0);
14cb93a386Sopenharmony_ci    ok = ok && m34 == mat3x4(5.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0);
15cb93a386Sopenharmony_ci    mat4x2 m42 = (mat4x2(1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0) * 6.0);
16cb93a386Sopenharmony_ci    ok = ok && m42 == mat4x2(6.0, 0.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0);
17cb93a386Sopenharmony_ci    mat4x3 m43 = mat4x3(7.0);
18cb93a386Sopenharmony_ci    ok = ok && m43 == mat4x3(7.0, 0.0, 0.0, 0.0, 7.0, 0.0, 0.0, 0.0, 7.0, 0.0, 0.0, 0.0);
19cb93a386Sopenharmony_ci    mat2 m22 = m32 * m23;
20cb93a386Sopenharmony_ci    ok = ok && m22 == mat2(8.0);
21cb93a386Sopenharmony_ci    mat3 m33 = m43 * m34;
22cb93a386Sopenharmony_ci    ok = ok && m33 == mat3(35.0);
23cb93a386Sopenharmony_ci    m23 += 1.0;
24cb93a386Sopenharmony_ci    ok = ok && m23 == mat2x3(3.0, 1.0, 1.0, 1.0, 3.0, 1.0);
25cb93a386Sopenharmony_ci    m32 -= 2.0;
26cb93a386Sopenharmony_ci    ok = ok && m32 == mat3x2(2.0, -2.0, -2.0, 2.0, -2.0, -2.0);
27cb93a386Sopenharmony_ci    m24 /= 4.0;
28cb93a386Sopenharmony_ci    ok = ok && m24 == mat2x4(0.75, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0);
29cb93a386Sopenharmony_ci    return ok;
30cb93a386Sopenharmony_ci}
31cb93a386Sopenharmony_civec4 main() {
32cb93a386Sopenharmony_ci    bool _0_ok = true;
33cb93a386Sopenharmony_ci    mat2x3 _1_m23 = mat2x3(2.0);
34cb93a386Sopenharmony_ci    _0_ok = _0_ok && _1_m23 == mat2x3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0);
35cb93a386Sopenharmony_ci    mat2x4 _2_m24 = mat2x4(3.0);
36cb93a386Sopenharmony_ci    _0_ok = _0_ok && _2_m24 == mat2x4(3.0, 0.0, 0.0, 0.0, 0.0, 3.0, 0.0, 0.0);
37cb93a386Sopenharmony_ci    mat3x2 _3_m32 = mat3x2(4.0);
38cb93a386Sopenharmony_ci    _0_ok = _0_ok && _3_m32 == mat3x2(4.0, 0.0, 0.0, 4.0, 0.0, 0.0);
39cb93a386Sopenharmony_ci    mat3x4 _4_m34 = mat3x4(5.0);
40cb93a386Sopenharmony_ci    _0_ok = _0_ok && _4_m34 == mat3x4(5.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0);
41cb93a386Sopenharmony_ci    mat4x2 _5_m42 = (mat4x2(1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0) * 6.0);
42cb93a386Sopenharmony_ci    _0_ok = _0_ok && _5_m42 == mat4x2(6.0, 0.0, 0.0, 6.0, 0.0, 0.0, 0.0, 0.0);
43cb93a386Sopenharmony_ci    mat4x3 _6_m43 = mat4x3(7.0);
44cb93a386Sopenharmony_ci    _0_ok = _0_ok && _6_m43 == mat4x3(7.0, 0.0, 0.0, 0.0, 7.0, 0.0, 0.0, 0.0, 7.0, 0.0, 0.0, 0.0);
45cb93a386Sopenharmony_ci    mat2 _7_m22 = _3_m32 * _1_m23;
46cb93a386Sopenharmony_ci    _0_ok = _0_ok && _7_m22 == mat2(8.0);
47cb93a386Sopenharmony_ci    mat3 _8_m33 = _6_m43 * _4_m34;
48cb93a386Sopenharmony_ci    _0_ok = _0_ok && _8_m33 == mat3(35.0);
49cb93a386Sopenharmony_ci    _1_m23 += 1.0;
50cb93a386Sopenharmony_ci    _0_ok = _0_ok && _1_m23 == mat2x3(3.0, 1.0, 1.0, 1.0, 3.0, 1.0);
51cb93a386Sopenharmony_ci    _3_m32 -= 2.0;
52cb93a386Sopenharmony_ci    _0_ok = _0_ok && _3_m32 == mat3x2(2.0, -2.0, -2.0, 2.0, -2.0, -2.0);
53cb93a386Sopenharmony_ci    _2_m24 /= 4.0;
54cb93a386Sopenharmony_ci    _0_ok = _0_ok && _2_m24 == mat2x4(0.75, 0.0, 0.0, 0.0, 0.0, 0.75, 0.0, 0.0);
55cb93a386Sopenharmony_ci    return _0_ok && test_half_b() ? colorGreen : colorRed;
56cb93a386Sopenharmony_ci}
57