John Stiles | f96cb71 | 2021-05-05 22:17:04 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2021 Google LLC |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #ifndef SKSL_INTRINSIC_LIST_DEFINED |
| 9 | #define SKSL_INTRINSIC_LIST_DEFINED |
| 10 | |
| 11 | // A list of every intrinsic supported by SkSL. |
| 12 | // Using an X-Macro (https://en.wikipedia.org/wiki/X_Macro) to manage the list. |
| 13 | #define SKSL_INTRINSIC_LIST \ |
| 14 | SKSL_INTRINSIC(abs) \ |
| 15 | SKSL_INTRINSIC(acosh) \ |
| 16 | SKSL_INTRINSIC(acos) \ |
| 17 | SKSL_INTRINSIC(all) \ |
| 18 | SKSL_INTRINSIC(any) \ |
| 19 | SKSL_INTRINSIC(asinh) \ |
| 20 | SKSL_INTRINSIC(asin) \ |
| 21 | SKSL_INTRINSIC(atanh) \ |
| 22 | SKSL_INTRINSIC(atan) \ |
| 23 | SKSL_INTRINSIC(bitCount) \ |
Brian Osman | f8a5504 | 2021-08-23 16:24:18 -0400 | [diff] [blame] | 24 | SKSL_INTRINSIC(blend) \ |
John Stiles | f96cb71 | 2021-05-05 22:17:04 -0400 | [diff] [blame] | 25 | SKSL_INTRINSIC(ceil) \ |
| 26 | SKSL_INTRINSIC(clamp) \ |
| 27 | SKSL_INTRINSIC(cosh) \ |
| 28 | SKSL_INTRINSIC(cos) \ |
| 29 | SKSL_INTRINSIC(cross) \ |
| 30 | SKSL_INTRINSIC(degrees) \ |
| 31 | SKSL_INTRINSIC(determinant) \ |
| 32 | SKSL_INTRINSIC(dFdx) \ |
| 33 | SKSL_INTRINSIC(dFdy) \ |
| 34 | SKSL_INTRINSIC(distance) \ |
| 35 | SKSL_INTRINSIC(dot) \ |
John Stiles | f96cb71 | 2021-05-05 22:17:04 -0400 | [diff] [blame] | 36 | SKSL_INTRINSIC(equal) \ |
| 37 | SKSL_INTRINSIC(exp2) \ |
| 38 | SKSL_INTRINSIC(exp) \ |
| 39 | SKSL_INTRINSIC(faceforward) \ |
Brian Osman | f8a5504 | 2021-08-23 16:24:18 -0400 | [diff] [blame] | 40 | SKSL_INTRINSIC(filter) \ |
John Stiles | f96cb71 | 2021-05-05 22:17:04 -0400 | [diff] [blame] | 41 | SKSL_INTRINSIC(findLSB) \ |
| 42 | SKSL_INTRINSIC(findMSB) \ |
| 43 | SKSL_INTRINSIC(floatBitsToInt) \ |
| 44 | SKSL_INTRINSIC(floatBitsToUint) \ |
| 45 | SKSL_INTRINSIC(floor) \ |
| 46 | SKSL_INTRINSIC(fma) \ |
| 47 | SKSL_INTRINSIC(fract) \ |
| 48 | SKSL_INTRINSIC(frexp) \ |
| 49 | SKSL_INTRINSIC(fwidth) \ |
| 50 | SKSL_INTRINSIC(greaterThanEqual) \ |
| 51 | SKSL_INTRINSIC(greaterThan) \ |
| 52 | SKSL_INTRINSIC(intBitsToFloat) \ |
| 53 | SKSL_INTRINSIC(inversesqrt) \ |
| 54 | SKSL_INTRINSIC(inverse) \ |
| 55 | SKSL_INTRINSIC(isinf) \ |
| 56 | SKSL_INTRINSIC(isnan) \ |
| 57 | SKSL_INTRINSIC(ldexp) \ |
| 58 | SKSL_INTRINSIC(length) \ |
| 59 | SKSL_INTRINSIC(lessThanEqual) \ |
| 60 | SKSL_INTRINSIC(lessThan) \ |
| 61 | SKSL_INTRINSIC(log2) \ |
| 62 | SKSL_INTRINSIC(log) \ |
| 63 | SKSL_INTRINSIC(makeSampler2D) \ |
| 64 | SKSL_INTRINSIC(matrixCompMult) \ |
| 65 | SKSL_INTRINSIC(matrixInverse) \ |
| 66 | SKSL_INTRINSIC(max) \ |
| 67 | SKSL_INTRINSIC(min) \ |
| 68 | SKSL_INTRINSIC(mix) \ |
| 69 | SKSL_INTRINSIC(modf) \ |
| 70 | SKSL_INTRINSIC(mod) \ |
| 71 | SKSL_INTRINSIC(normalize) \ |
| 72 | SKSL_INTRINSIC(notEqual) \ |
| 73 | SKSL_INTRINSIC(not ) \ |
| 74 | SKSL_INTRINSIC(outerProduct) \ |
| 75 | SKSL_INTRINSIC(packDouble2x32) \ |
| 76 | SKSL_INTRINSIC(packHalf2x16) \ |
| 77 | SKSL_INTRINSIC(packSnorm2x16) \ |
| 78 | SKSL_INTRINSIC(packSnorm4x8) \ |
| 79 | SKSL_INTRINSIC(packUnorm2x16) \ |
| 80 | SKSL_INTRINSIC(packUnorm4x8) \ |
| 81 | SKSL_INTRINSIC(pow) \ |
| 82 | SKSL_INTRINSIC(radians) \ |
| 83 | SKSL_INTRINSIC(reflect) \ |
| 84 | SKSL_INTRINSIC(refract) \ |
| 85 | SKSL_INTRINSIC(roundEven) \ |
| 86 | SKSL_INTRINSIC(round) \ |
| 87 | SKSL_INTRINSIC(sample) \ |
| 88 | SKSL_INTRINSIC(saturate) \ |
Brian Osman | f8a5504 | 2021-08-23 16:24:18 -0400 | [diff] [blame] | 89 | SKSL_INTRINSIC(shade) \ |
John Stiles | f96cb71 | 2021-05-05 22:17:04 -0400 | [diff] [blame] | 90 | SKSL_INTRINSIC(sign) \ |
| 91 | SKSL_INTRINSIC(sinh) \ |
| 92 | SKSL_INTRINSIC(sin) \ |
| 93 | SKSL_INTRINSIC(smoothstep) \ |
| 94 | SKSL_INTRINSIC(sqrt) \ |
| 95 | SKSL_INTRINSIC(step) \ |
| 96 | SKSL_INTRINSIC(subpassLoad) \ |
| 97 | SKSL_INTRINSIC(tanh) \ |
| 98 | SKSL_INTRINSIC(tan) \ |
| 99 | SKSL_INTRINSIC(transpose) \ |
| 100 | SKSL_INTRINSIC(trunc) \ |
John Stiles | 1d1e66e | 2021-05-06 10:26:23 -0400 | [diff] [blame] | 101 | SKSL_INTRINSIC(uintBitsToFloat) \ |
John Stiles | aaac4e4 | 2021-05-06 14:08:28 -0400 | [diff] [blame] | 102 | SKSL_INTRINSIC(unpackDouble2x32) \ |
| 103 | SKSL_INTRINSIC(unpackHalf2x16) \ |
| 104 | SKSL_INTRINSIC(unpackSnorm2x16) \ |
| 105 | SKSL_INTRINSIC(unpackSnorm4x8) \ |
| 106 | SKSL_INTRINSIC(unpackUnorm2x16) \ |
| 107 | SKSL_INTRINSIC(unpackUnorm4x8) \ |
John Stiles | 1d1e66e | 2021-05-06 10:26:23 -0400 | [diff] [blame] | 108 | SKSL_INTRINSIC(unpremul) |
John Stiles | f96cb71 | 2021-05-05 22:17:04 -0400 | [diff] [blame] | 109 | |
| 110 | #endif |