From 8d639138c712c5bbe0b9ea8adbc810b23a2e8d1b Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 9 May 2016 16:02:12 -0700 Subject: swr: [rasterizer] Include cmath for std::isnan and std::isinf. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: : 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: : note: ‘__builtin_isinf_sign’ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95180 Signed-off-by: Vinson Lee Reviewed-by: Jose Fonseca Reviewed-by: Tim Rowley --- src/gallium/drivers/swr/rasterizer/memory/Convert.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium') diff --git a/src/gallium/drivers/swr/rasterizer/memory/Convert.h b/src/gallium/drivers/swr/rasterizer/memory/Convert.h index 4c4642f6c64..42b973c13fc 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 + ////////////////////////////////////////////////////////////////////////// /// @brief Convert an IEEE 754 16-bit float to an 32-bit single precision /// float -- cgit v1.2.3