xref: /aosp_15_r20/external/skia/resources/sksl/shared/SwizzleBoolConstants.sksl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1uniform half4 colorGreen, colorRed;
2
3half4 main(float2 coords) {
4    bool4 v = bool4(colorGreen.g);
5
6    bool4 result;
7    result = bool4(v.x, true, true, true);
8    result = bool4(v.xy, false, true);
9    result = bool4(v.x1, true, false);
10    result = bool4(v.0y, true, true);
11    result = bool4(v.xyz, true);
12    result = bool4(v.xy1, true);
13    result = bool4(v.x0z, true);
14    result = bool4(v.x10, false);
15    result = bool4(v.1yz, false);
16    result = bool4(v.0y1, false);
17    result = bool4(v.11z, false);
18    result = v.xyzw;
19    result = v.xyz1;
20    result = v.xy0w;
21    result = v.xy10;
22    result = v.x1zw;
23    result = v.x0z1;
24    result = v.x11w;
25    result = v.x101;
26    result = v.1yzw;
27    result = v.0yz1;
28    result = v.0y1w;
29    result = v.1y11;
30    result = v.00zw;
31    result = v.00z1;
32    result = v.011w;
33    return any(result) ? colorGreen : colorRed;
34}
35