diff options
author | Matt Turner <[email protected]> | 2015-11-04 14:31:59 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-11-20 17:39:34 -0800 |
commit | f450030f66036e560be87067c0a0cef33cd7b5ed (patch) | |
tree | 5baeecf1d3db65d400183d5a1f57f9dd89c2a390 /src/mesa/drivers/dri | |
parent | 0684aed8abc51308945ead050d2452b522937c0a (diff) |
i965: Use ldexpf() in VF float test set up.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/test_vf_float_conversions.cpp | 11 |
1 files 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 6a8bceabf16..7f0342548f6 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); } } |