[Mesa-dev] [PATCH] glsl: Properly handle ldexp(0.0f, non-zero-exp).

Kenneth Graunke kenneth at whitecape.org
Sat Apr 30 18:44:36 UTC 2016


On Wednesday, April 13, 2016 3:46:29 PM PDT Matt Turner wrote:
> On Wed, Apr 13, 2016 at 12:07 PM, Matt Turner <mattst88 at gmail.com> wrote:
> > ---
> 
> i965 is going to stop using this code, but I thought it'd be nice to
> fix this and also to note what is the remaining failure on the dEQP
> ldexp tests.
> 
> The GLSL spec says "If this product is too large to be represented in
> the floating-point type, the result is undefined."
> 
> This implementation of ldexp doesn't return infinity for inputs of
> infinity. Arguably, that's okay depending on how you interpret that
> text.
> 
> It's probably simple to handle this in the current code, or
> alternatively someone could port Jason's ldexp lowering code from NIR
> to GLSL which is also fewer instructions.
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 

It makes sense to fix this up for posterity, if nothing else - we might
come back to this someday (no idea why), and it'd be nice to find the
improved version.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160430/14f37b31/attachment-0001.sig>


More information about the mesa-dev mailing list