xref: /aosp_15_r20/external/skia/resources/sksl/inliner/SwitchWithCastCanBeInlined.sksl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1uniform half4 color;
2
3inline half4 switchy(half4 c) {
4    half4 result;
5    switch (int(c.x)) {
6        case 1: result = c.yyyy; break;
7        default: result = c.zzzz; break;
8    }
9    return result;
10}
11
12void main() {
13    sk_FragColor = switchy(color);
14}
15