https://bugs.freedesktop.org/show_bug.cgi?id=59701
--- Comment #3 from Roland Scheidegger <srol...@vmware.com> --- I'm wondering if something like this (in horrible pseudo-code) would be a solution (for ifloor): xtruncint = fptoint(x) xtrunc = inttofp(xtruncint) mask = xtrunc > x maskone = mask & 1 xintfloor = xtruncint - maskone; I think this might work for all values as long as they don't exceed integer range, including negative zero as long as cmp(negzero, poszero) equals true which I think it should. It has also similar complexity as what we're doing now. For floor() if you'd also want it to work with huge exponents I think you'd need to additionally compare the original number (with masked out sign bit) with 2^24 and if it's larger just use the original value (which will already represent an exact integer in this case) using some select (given that you didn't have round in the first place meaning another and/andnot/or). For NaNs etc. the results will probably remain pretty unpredictable unless you check for those as well but that's probably getting silly. Honestly I don't know if it's worth fixing this. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev