xref: /aosp_15_r20/external/skia/DATA/skia_resources/sksl/inliner/InlinerCanBeDisabled.sksl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1/*#pragma settings NoInline*/
2
3uniform half4 color;
4
5half singleuse() {
6    return 1.25;
7}
8
9half add(half a, half b) {
10    half c = a + b;
11    return c;
12}
13
14half mul(half a, half b) {
15    return a * b;
16}
17
18half fused_multiply_add(half a, half b, half c) {
19    return add(mul(a, b), c);
20}
21
22void main() {
23    // Functions used multiple times:
24    sk_FragColor = fused_multiply_add(color.x, color.y, color.z).xxxx;
25    // Functions used only once:
26    sk_FragColor *= singleuse();
27    // Intrinsic functions:
28    sk_FragColor *= blend_src_in(color.xxyy, color.zzww);
29    sk_FragColor *= blend_dst_in(color.xxyy, color.zzww);
30    sk_FragColor *= blend_hue(color, color.wwww);
31    sk_FragColor *= blend_hue(color, color.wzyx);
32}
33