[Mesa-dev] [RFC PATCH] mesa: Replace _mesa_round_to_even() with roundeven().

Ilia Mirkin imirkin at alum.mit.edu
Wed Mar 11 15:13:55 PDT 2015


On Wed, Mar 11, 2015 at 6:09 PM, Matt Turner <mattst88 at gmail.com> wrote:
> On Wed, Mar 11, 2015 at 3:04 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>> While I'm not opposed to this style of implementation, do note that
>> 99.9999738% of users will end up with distro-compiled packages
>> targeting generic x86_64 and thus won't use the SSE variant. If it's
>> really better, might make sense to do it "for real" (i.e. runtime
>> selection), otherwise just let it go and use rint/rintf everywhere so
>> that developers (who build their own libraries, probably with the
>> "right" -march) will get the same behaviour as users.
>
> glibc uses roundsd/roundss in rint/f guarded by a runtime check. The
> SSE code here just allows those instructions to be inlined.

OK, as long as glibc would end up using the same rounding mode settings,

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>


More information about the mesa-dev mailing list