[Mesa-dev] [PATCH 1/2] nir: use generic float types for frexp_exp and frexp_sig

Jason Ekstrand jason at jlekstrand.net
Fri Mar 22 13:46:01 UTC 2019


Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

The second will require non-trivial review.

On Fri, Mar 22, 2019 at 8:41 AM Samuel Pitoiset <samuel.pitoiset at gmail.com>
wrote:

> Only the exponent needs to be 32-bit signed integer.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/compiler/nir/nir_opcodes.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/compiler/nir/nir_opcodes.py
> b/src/compiler/nir/nir_opcodes.py
> index 9bbfe66ccdc..90f7aed0c0d 100644
> --- a/src/compiler/nir/nir_opcodes.py
> +++ b/src/compiler/nir/nir_opcodes.py
> @@ -248,8 +248,8 @@ unop("fsin", tfloat, "bit_size == 64 ? sin(src0) :
> sinf(src0)")
>  unop("fcos", tfloat, "bit_size == 64 ? cos(src0) : cosf(src0)")
>
>  # dfrexp
> -unop_convert("frexp_exp", tint32, tfloat64, "frexp(src0, &dst);")
> -unop_convert("frexp_sig", tfloat64, tfloat64, "int n; dst = frexp(src0,
> &n);")
> +unop_convert("frexp_exp", tint32, tfloat, "frexp(src0, &dst);")
> +unop_convert("frexp_sig", tfloat, tfloat, "int n; dst = frexp(src0, &n);")
>
>  # Partial derivatives.
>
> --
> 2.21.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190322/502b987b/attachment.html>


More information about the mesa-dev mailing list