xref: /aosp_15_r20/external/skia/tests/sksl/errors/OverloadedBuiltin.glsl (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1### Compilation failed:
2
3error: 4: duplicate definition of intrinsic function 'fma'
4half fma(half a, half b, half c) { return 0; /* error: overloads a builtin */ }
5^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6error: 7: duplicate definition of intrinsic function 'sin'
7half2 sin(half2 a) { return half2(0); /* error: overloads a builtin */ }
8^^^^^^^^^^^^^^^^^^
9error: 8: duplicate definition of intrinsic function 'sin'
10float3 sin(float3 a) { return float3(0); /* error: overloads a builtin */ }
11^^^^^^^^^^^^^^^^^^^^
12error: 9: modifiers on parameter 1 differ between declaration and definition
13float4 sin(inout float4 a) { return float4(0); /* error: overloads a builtin */ }
14           ^^^^^^^^^^^^^^
15error: 13: duplicate definition of intrinsic function 'cos'
16half cos(half2 a) { return 0; /* error: overloads a builtin (despite return type mismatch) */ }
17^^^^^^^^^^^^^^^^^
18error: 14: functions 'float2 cos(half2 a)' and '$pure $genHType cos($genHType angle)' differ only in return type
19float2 cos(half2 a) { return 0; /* error: overloads a builtin (despite return type mismatch) */ }
20^^^^^^
21error: 15: functions 'int cos(out half3 a)' and '$pure $genHType cos($genHType angle)' differ only in return type
22int cos(out half3 a) { return 0; /* error: overloads a builtin (despite return type mismatch) */ }
23^^^
24error: 17: duplicate definition of intrinsic function 'pow'
25float pow(float x, float y) { return 0; /* error: overloads a builtin */ }
26^^^^^^^^^^^^^^^^^^^^^^^^^^^
278 errors
28