[Mesa-dev] [PATCH 1/2] i965: Use ldexpf() in VF float test set up.

Iago Toral itoral at igalia.com
Fri Nov 20 00:31:57 PST 2015


Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>

On Thu, 2015-11-19 at 22:43 -0800, Matt Turner wrote:
> ---
>  src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp b/src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp
> index 6a8bcea..7f03425 100644
> --- a/src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp
> +++ b/src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp
> @@ -40,15 +40,10 @@ void vf_float_conversion_test::SetUp() {
>        int ebits = (vf >> 4) & 0x7;
>        int mbits = vf & 0xf;
>  
> -      int e = ebits - 3;
> +      float x = 1.0f + mbits / 16.0f;
> +      int exp = ebits - 3;
>  
> -      float value = 1.0f;
> -
> -      value += mbits / 16.0f;
> -
> -      value *= exp2f(e);
> -
> -      vf_to_float[vf] = value;
> +      vf_to_float[vf] = ldexpf(x, exp);
>     }
>  }
>  




More information about the mesa-dev mailing list