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

Matt Turner mattst88 at gmail.com
Wed Apr 13 22:46:29 UTC 2016


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.


More information about the mesa-dev mailing list