[Mesa-dev] [PATCH] nir: Use double-precision pow() when bit_size is 64, powf() otherwise

Iago Toral itoral at igalia.com
Thu May 19 09:00:23 UTC 2016


I have just noticed that this was never pushed, right? I noticed this
while working on providing double-precision implementation for the other
functions discussed in the thread.

Iago

On Wed, 2016-03-23 at 20:09 -0700, Jason Ekstrand wrote:
> Is there a 64-bit pow in GLSL?  If so, this is the right
> implementation.
> 
> Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
> 
> On Mar 23, 2016 7:42 PM, "Ian Romanick" <idr at freedesktop.org> wrote:
>         From: Ian Romanick <ian.d.romanick at intel.com>
>         
>         Found (randomly) by inspection.  Looking at the rest of the
>         changes in
>         this file in commit 9076c4e2, I'm certain this is what was
>         intended.
>         
>         Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
>         Cc: Connor Abbott <cwabbott0 at gmail.com>
>         Cc: mesa-stable at lists.freedesktop.org
>         ---
>          src/compiler/nir/nir_opcodes.py | 2 +-
>          1 file changed, 1 insertion(+), 1 deletion(-)
>         
>         diff --git a/src/compiler/nir/nir_opcodes.py
>         b/src/compiler/nir/nir_opcodes.py
>         index 553f924..ac59130 100644
>         --- a/src/compiler/nir/nir_opcodes.py
>         +++ b/src/compiler/nir/nir_opcodes.py
>         @@ -520,7 +520,7 @@ for (int i = 0; i < 32; i += 8) {
>          }
>          """)
>         
>         -binop("fpow", tfloat, "", "bit_size == 64 ? powf(src0,
>         src1) : pow(src0, src1)")
>         +binop("fpow", tfloat, "", "bit_size == 64 ? pow(src0, src1) :
>         powf(src0, src1)")
>         
>          binop_horiz("pack_half_2x16_split", 1, tuint32, 1, tfloat32,
>         1, tfloat32,
>                      "pack_half_1x16(src0.x) | (pack_half_1x16(src1.x)
>         << 16)")
>         --
>         2.5.5
>         
>         _______________________________________________
>         mesa-dev mailing list
>         mesa-dev at lists.freedesktop.org
>         https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev




More information about the mesa-dev mailing list