xref: /third_party/skia/resources/sksl/intrinsics/Ceil.sksl
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/skia/resources/sksl/intrinsics/
1cb93a386Sopenharmony_ciuniform half4 testInputs;  // equals (-1.25, 0, 0.75, 2.25)
2cb93a386Sopenharmony_ciuniform half4 colorGreen, colorRed;
3cb93a386Sopenharmony_ci
4cb93a386Sopenharmony_cihalf4 main(float2 coords) {
5cb93a386Sopenharmony_ci    const half4 constVal = half4(-1.25, 0, 0.75, 2.25);
6cb93a386Sopenharmony_ci    half4 expected = half4(-1, 0, 1, 3);
7cb93a386Sopenharmony_ci    return (ceil(testInputs.x)    == expected.x     &&
8cb93a386Sopenharmony_ci            ceil(testInputs.xy)   == expected.xy    &&
9cb93a386Sopenharmony_ci            ceil(testInputs.xyz)  == expected.xyz   &&
10cb93a386Sopenharmony_ci            ceil(testInputs.xyzw) == expected.xyzw  &&
11cb93a386Sopenharmony_ci            ceil(constVal.x)      == expected.x     &&
12cb93a386Sopenharmony_ci            ceil(constVal.xy)     == expected.xy    &&
13cb93a386Sopenharmony_ci            ceil(constVal.xyz)    == expected.xyz   &&
14cb93a386Sopenharmony_ci            ceil(constVal.xyzw)   == expected.xyzw) ? colorGreen : colorRed;
15cb93a386Sopenharmony_ci}
16

Indexes created Thu Nov 07 10:32:03 CST 2024