1cb93a386Sopenharmony_ciuniform half4 colorGreen, colorRed, colorBlack, colorWhite, testInputs;
2cb93a386Sopenharmony_ci
3cb93a386Sopenharmony_cihalf4 main(float2 coords) {
4cb93a386Sopenharmony_ci    const half4 constBlack = half4(0, 0, 0, 1);
5cb93a386Sopenharmony_ci    const half4 constWhite = half4(1);
6cb93a386Sopenharmony_ci    const half4 constVal = half4(-1.25, 0, 0.75, 2.25);
7cb93a386Sopenharmony_ci    half4 expectedBW = half4(0.5, 0.5, 0.5, 1);
8cb93a386Sopenharmony_ci    half4 expectedWT = half4(1,   0.5, 1,   2.25);
9cb93a386Sopenharmony_ci
10cb93a386Sopenharmony_ci    return (mix(colorGreen,      colorRed,        0)                   == half4(0,    1,    0, 1) &&
11cb93a386Sopenharmony_ci            mix(colorGreen,      colorRed,        0.25)                == half4(0.25, 0.75, 0, 1) &&
12cb93a386Sopenharmony_ci            mix(colorGreen,      colorRed,        0.75)                == half4(0.75, 0.25, 0, 1) &&
13cb93a386Sopenharmony_ci            mix(colorGreen,      colorRed,        1)                   == half4(1,    0,    0, 1) &&
14cb93a386Sopenharmony_ci            mix(colorBlack.x,    colorWhite.x,    0.5)                 == expectedBW.x            &&
15cb93a386Sopenharmony_ci            mix(colorBlack.xy,   colorWhite.xy,   0.5)                 == expectedBW.xy           &&
16cb93a386Sopenharmony_ci            mix(colorBlack.xyz,  colorWhite.xyz,  0.5)                 == expectedBW.xyz          &&
17cb93a386Sopenharmony_ci            mix(colorBlack.xyzw, colorWhite.xyzw, 0.5)                 == expectedBW.xyzw         &&
18cb93a386Sopenharmony_ci            mix(constBlack.x,    constWhite.x,    0.5)                 == expectedBW.x            &&
19cb93a386Sopenharmony_ci            mix(constBlack.xy,   constWhite.xy,   0.5)                 == expectedBW.xy           &&
20cb93a386Sopenharmony_ci            mix(constBlack.xyz,  constWhite.xyz,  0.5)                 == expectedBW.xyz          &&
21cb93a386Sopenharmony_ci            mix(constBlack.xyzw, constWhite.xyzw, 0.5)                 == expectedBW.xyzw         &&
22cb93a386Sopenharmony_ci            mix(colorWhite.x,    testInputs.x,    0)                   == expectedWT.x            &&
23cb93a386Sopenharmony_ci            mix(colorWhite.xy,   testInputs.xy,   half2(0, 0.5))       == expectedWT.xy           &&
24cb93a386Sopenharmony_ci            mix(colorWhite.xyz,  testInputs.xyz,  half3(0, 0.5, 0))    == expectedWT.xyz          &&
25cb93a386Sopenharmony_ci            mix(colorWhite.xyzw, testInputs.xyzw, half4(0, 0.5, 0, 1)) == expectedWT.xyzw         &&
26cb93a386Sopenharmony_ci            mix(constWhite.x,    constVal.x,      0)                   == expectedWT.x            &&
27cb93a386Sopenharmony_ci            mix(constWhite.xy,   constVal.xy,     half2(0, 0.5))       == expectedWT.xy           &&
28cb93a386Sopenharmony_ci            mix(constWhite.xyz,  constVal.xyz,    half3(0, 0.5, 0))    == expectedWT.xyz          &&
29cb93a386Sopenharmony_ci            mix(constWhite.xyzw, constVal.xyzw,   half4(0, 0.5, 0, 1)) == expectedWT.xyzw)
30cb93a386Sopenharmony_ci                ? colorGreen : colorRed;
31cb93a386Sopenharmony_ci}
32