xref: /aosp_15_r20/external/skia/tests/sksl/errors/BooleanArithmetic.glsl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1### Compilation failed:
2
3error: 1: type mismatch: '+' cannot operate on 'bool', 'bool'
4bool2 add_boolean()    { return false + true; }
5                                ^^^^^^^^^^^^
6error: 2: type mismatch: '-' cannot operate on 'bool', 'bool'
7bool2 sub_boolean()    { return false - true; }
8                                ^^^^^^^^^^^^
9error: 3: type mismatch: '*' cannot operate on 'bool', 'bool'
10bool2 mul_boolean()    { return false * true; }
11                                ^^^^^^^^^^^^
12error: 4: type mismatch: '/' cannot operate on 'bool', 'bool'
13bool2 div_boolean()    { return false / true; }
14                                ^^^^^^^^^^^^
15error: 5: type mismatch: '%' cannot operate on 'bool', 'bool'
16bool2 mod_boolean()    { return false % true; }
17                                ^^^^^^^^^^^^
18error: 6: type mismatch: '<<' cannot operate on 'bool', 'bool'
19bool2 shl_boolean()    { return false << true; }
20                                ^^^^^^^^^^^^^
21error: 7: type mismatch: '>>' cannot operate on 'bool', 'bool'
22bool2 shr_boolean()    { return false >> true; }
23                                ^^^^^^^^^^^^^
24error: 8: '-' cannot operate on 'bool'
25bool2 neg_boolean()    { return -false; }
26                                ^^^^^^
27error: 9: '~' cannot operate on 'bool'
28bool2 bitnot_boolean() { return ~false; }
29                                ^^^^^^
30error: 10: type mismatch: '&' cannot operate on 'bool', 'bool'
31bool2 bitand_boolean() { return false & true; }
32                                ^^^^^^^^^^^^
33error: 11: type mismatch: '|' cannot operate on 'bool', 'bool'
34bool2 bitor_boolean()  { return false | true; }
35                                ^^^^^^^^^^^^
36error: 12: type mismatch: '^' cannot operate on 'bool', 'bool'
37bool2 bitxor_boolean() { return false ^ true; }
38                                ^^^^^^^^^^^^
39error: 14: type mismatch: '+' cannot operate on 'bool2', 'bool2'
40bool2 add_boolean_vec()    { return bool2(false, false) + bool2(true, true); }
41                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42error: 15: type mismatch: '-' cannot operate on 'bool2', 'bool2'
43bool2 sub_boolean_vec()    { return bool2(false, false) - bool2(true, true); }
44                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45error: 16: type mismatch: '*' cannot operate on 'bool2', 'bool2'
46bool2 mul_boolean_vec()    { return bool2(false, false) * bool2(true, true); }
47                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48error: 17: type mismatch: '/' cannot operate on 'bool2', 'bool2'
49bool2 div_boolean_vec()    { return bool2(false, false) / bool2(true, true); }
50                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51error: 18: type mismatch: '%' cannot operate on 'bool2', 'bool2'
52bool2 mod_boolean_vec()    { return bool2(false, false) % bool2(true, true); }
53                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54error: 19: type mismatch: '<<' cannot operate on 'bool2', 'bool2'
55bool2 shl_boolean_vec()    { return bool2(false, false) << bool2(true, true); }
56                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
57error: 20: type mismatch: '>>' cannot operate on 'bool2', 'bool2'
58bool2 shr_boolean_vec()    { return bool2(false, false) >> bool2(true, true); }
59                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60error: 21: '!' cannot operate on 'bool2'
61bool2 not_boolean_vec()    { return !bool2(false, false); }
62                                    ^^^^^^^^^^^^^^^^^^^^
63error: 22: '-' cannot operate on 'bool2'
64bool2 neg_boolean_vec()    { return -bool2(false, false); }
65                                    ^^^^^^^^^^^^^^^^^^^^
66error: 23: '~' cannot operate on 'bool2'
67bool2 bitnot_boolean_vec() { return ~bool2(false, false); }
68                                    ^^^^^^^^^^^^^^^^^^^^
69error: 24: type mismatch: '&' cannot operate on 'bool2', 'bool2'
70bool2 bitand_boolean_vec() { return bool2(false, false) & bool2(true, true); }
71                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72error: 25: type mismatch: '|' cannot operate on 'bool2', 'bool2'
73bool2 bitor_boolean_vec()  { return bool2(false, false) | bool2(true, true); }
74                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
75error: 26: type mismatch: '^' cannot operate on 'bool2', 'bool2'
76bool2 bitxor_boolean_vec() { return bool2(false, false) ^ bool2(true, true); }
77                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7825 errors
79