mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 09:00:10 +01:00
nir: negate an expression in atan
we're going to fix up the sign immediately anyway. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30934>
This commit is contained in:
parent
5318b8868b
commit
47e7cd268c
1 changed files with 1 additions and 1 deletions
|
|
@ -203,7 +203,7 @@ nir_atan(nir_builder *b, nir_def *y_over_x)
|
|||
|
||||
/* range-reduction fixup */
|
||||
tmp = nir_bcsel(b, nir_flt(b, one, abs_y_over_x),
|
||||
nir_fsub_imm(b, M_PI_2, tmp), tmp);
|
||||
nir_fadd_imm(b, tmp, -M_PI_2), tmp);
|
||||
|
||||
/* sign fixup */
|
||||
nir_def *result = nir_copysign(b, tmp, y_over_x);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue