[Mesa-dev] [PATCH] swr: [rasterizer] Include cmath for std::isnan and std::isinf.
Rowley, Timothy O
timothy.o.rowley at intel.com
Tue May 10 15:34:11 UTC 2016
Reviewed-by: Tim Rowley <timothy.o.rowley at intel.com>
> On May 9, 2016, at 11:52 PM, Jose Fonseca <jfonseca at vmware.com> wrote:
>
> On 09/05/16 16:46, Vinson Lee wrote:
>> This patch fixes this build error.
>>
>> CXX rasterizer/memory/libswrAVX_la-ClearTile.lo
>> In file included from rasterizer/memory/ClearTile.cpp:34:0:
>> ./rasterizer/memory/Convert.h: In function ‘uint16_t Convert32To16Float(float)’:
>> ./rasterizer/memory/Convert.h:170:9: error: ‘__builtin_isnan’ is not a member of ‘std’
>> if (std::isnan(val))
>> ^
>> ./rasterizer/memory/Convert.h:170:9: note: suggested alternative:
>> <built-in>: note: ‘__builtin_isnan’
>> ./rasterizer/memory/Convert.h:176:14: error: ‘__builtin_isinf_sign’ is not a member of ‘std’
>> else if (std::isinf(val))
>> ^
>> ./rasterizer/memory/Convert.h:176:14: note: suggested alternative:
>> <built-in>: note: ‘__builtin_isinf_sign’
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95180
>> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
>> ---
>> src/gallium/drivers/swr/rasterizer/memory/Convert.h | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/src/gallium/drivers/swr/rasterizer/memory/Convert.h b/src/gallium/drivers/swr/rasterizer/memory/Convert.h
>> index 4c4642f..42b973c 100644
>> --- a/src/gallium/drivers/swr/rasterizer/memory/Convert.h
>> +++ b/src/gallium/drivers/swr/rasterizer/memory/Convert.h
>> @@ -32,6 +32,8 @@
>> #pragma warning(disable: 4723)
>> #endif
>>
>> +#include <cmath>
>> +
>> //////////////////////////////////////////////////////////////////////////
>> /// @brief Convert an IEEE 754 16-bit float to an 32-bit single precision
>> /// float
>>
>
> Looks good to me.
>
> Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list