[Mesa-dev] [PATCH 4/4] MSVC2013: Namespace qualify fma to override ambiguity with fma from math.h

Ian Romanick idr at freedesktop.org
Thu Jan 9 09:42:31 PST 2014


On 01/07/2014 02:38 PM, Thomas Sondergaard wrote:
> MSVC 2013 version of math.h includes an fma() function.
> ---
>  src/glsl/builtin_functions.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp
> index 10127f3..b3e407a 100644
> --- a/src/glsl/builtin_functions.cpp
> +++ b/src/glsl/builtin_functions.cpp
> @@ -3936,7 +3936,7 @@ builtin_builder::_fma(const glsl_type *type)
>     ir_variable *c = in_var(type, "c");
>     MAKE_SIG(type, gpu_shader5, 3, a, b, c);
>  
> -   body.emit(ret(fma(a, b, c)));
> +   body.emit(ret(ir_builder::fma(a, b, c)));

Like Ken, I'm not very happy about this, and I'm hoping there's a better
way.  Since we don't use namespace qualifiers for any of the other
ir_builder code, issues like this will continue to creep in. :(

>  
>     return sig;
>  }
> 



More information about the mesa-dev mailing list