[Mesa-dev] [Bug 59701] lp_test_arit fails on non-sse41 capable machines, breaking make check

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jan 22 07:05:38 PST 2013


--- Comment #2 from Roland Scheidegger <sroland at vmware.com> ---
Hmm fract() is such a mess. The usual definition of fract(x) is sub(x) -
floor(x), and it is expected this returns a number in [0,1[ except it doesn't
actually work due to the funky float math (floor(verysmallnegnumber) is -1.0f
(exact) and the subtraction will be 1.0f (exact) too).
But here it must be floor which is busted, returning 0.0f. In particular ifloor
without rounding available which already does a lot of work to fix results, but
maybe the math doesn't quite work out around 0.0f. In particular I'm not really
sure about that offset constant. Looks to me for denorms it would always be
broken but apparently it fails for values further away from zero too.
(The last two failures with very large numbers are quite expected too I guess
as we're using fp-to-int and back and these values exceed the representable int
range. I can't think of an easy workaround, probably doable with a couple
comparisons, masks etc.)

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130122/b37d1f48/attachment.html>

More information about the mesa-dev mailing list