[Mesa-dev] [PATCH 5/9] tgsi: implement micro_fma() in tgsi exec machine

Maxence Le Doré maxence.ledore at gmail.com
Tue Jan 7 12:03:21 PST 2014


Very nice. I originally thought about conditionnaly defining a fmaf
for MSVC < 1400 like Cygwin and opensource apple code, but I think
this is pushing the problem to later, with double fma(double), that
will be required with ARB_gpu_shader_fp64 : In that case, we'll have
to use long doubles (80 bits), which is x86 specific -> this may not
fit well this time when building mesa for ARM Android.

The implementation in gnulib seems to take a different approach. I
think you were talking about this one :
https://github.com/gagern/gnulib/blob/master/lib/fma.c

2014/1/7 Erik Faye-Lund <kusmabite at gmail.com>:
> On Tue, Jan 7, 2014 at 6:46 PM, Maxence Le Doré
> <maxence.ledore at gmail.com> wrote:
>> Indeed, this patch compiles on linux but may break complilation at
>> least on MSVC version < 1400.
>> I'm planing to install visual studio 2005 on a ms xp or seven virtual
>> machine to check the behavior when compiling in microsoft windows
>> environment.
>>
>
> I can save you the trouble: I have MSVC 2008 installed, and it does
> not support fmaf. There's an effort to implement it in Cygwin here:
> http://www.cygwin.com/ml/libc-alpha/2010-10/msg00007.html
>
> However, it depends on fetestexcept(), which is also not supported.
> Another implementation I found was this, which claims to be exact:
> http://opensource.apple.com/source/Libm/Libm-2026/Source/ARM/fmaf.c
>
> There's also an implementation in gnulib, but it looks quite complicated to me.


More information about the mesa-dev mailing list