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:
committed by
Marge Bot
parent
5318b8868b
commit
47e7cd268c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user