diff options
author | Erik Faye-Lund <[email protected]> | 2020-03-16 12:57:48 +0100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-04 11:31:29 +0000 |
commit | aab1361d59555ffe084e9da15bb41452d8495f90 (patch) | |
tree | b19821a78d68478acb630a8d922ca6df0e511ceb /src/compiler/nir/nir_builtin_builder.h | |
parent | 58bb8172574cf9a911af03326903034daa30a481 (diff) |
compiler/nir: move tan-calculation to helper
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Reviewed-By: Karol Herbst <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4811>
Diffstat (limited to 'src/compiler/nir/nir_builtin_builder.h')
-rw-r--r-- | src/compiler/nir/nir_builtin_builder.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_builtin_builder.h b/src/compiler/nir/nir_builtin_builder.h index e4c836541b7..ef668d2f64a 100644 --- a/src/compiler/nir/nir_builtin_builder.h +++ b/src/compiler/nir/nir_builtin_builder.h @@ -256,6 +256,12 @@ nir_select(nir_builder *b, nir_ssa_def *x, nir_ssa_def *y, nir_ssa_def *s) } static inline nir_ssa_def * +nir_ftan(nir_builder *b, nir_ssa_def *x) +{ + return nir_fdiv(b, nir_fsin(b, x), nir_fcos(b, x)); +} + +static inline nir_ssa_def * nir_clz_u(nir_builder *b, nir_ssa_def *a) { nir_ssa_def *val; |