On Wed, Mar 11, 2015 at 4:04 PM, Ilia Mirkin <imir...@alum.mit.edu> wrote: > On Wed, Mar 11, 2015 at 6:51 PM, Matt Turner <matts...@gmail.com> wrote: >> On Wed, Mar 11, 2015 at 3:13 PM, Ilia Mirkin <imir...@alum.mit.edu> wrote: >>> On Wed, Mar 11, 2015 at 6:09 PM, Matt Turner <matts...@gmail.com> wrote: >>>> 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 <imir...@alum.mit.edu> >> >> Okay, so slight difference. It doesn't use the same rounding mode >> settings, since rint() rounds in the current rounding direction it >> uses rounds* with imm8=0x4 (current rounding direction) whereas we're >> using rounds* with imm8=0x8 (round to nearest). We're assuming the >> current rounding mode is to nearest, since that's the default and if >> it weren't other things would go badly. >> >> I don't know if your R-b stands in that case? > > Is it possible to determine the current rounding format in a > moderately cheap manner? If so, it may be nice to stick that into an > assert.
The difficulty is that MSVC (surprise! surprise!) doesn't support fegetround()/fesetround(). Otherwise, yes. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev