From: José Fonseca Date: Tue, 27 Oct 2009 20:09:53 +0000 (+0000) Subject: llvmpipe: Implement round() for MSVC. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=095e66f695ce1d869a824d9e22f63b54c95ca0ac;p=mesa.git llvmpipe: Implement round() for MSVC. --- diff --git a/src/gallium/drivers/llvmpipe/lp_test_main.c b/src/gallium/drivers/llvmpipe/lp_test_main.c index d4767ff52ba..82fada5a359 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_main.c +++ b/src/gallium/drivers/llvmpipe/lp_test_main.c @@ -40,6 +40,18 @@ #include "lp_test.h" +#ifdef PIPE_CC_MSVC +static INLINE double +round(double x) +{ + if (x >= 0.0) + return floor(x + 0.5); + else + return ceil(x - 0.5); +} +#endif + + void dump_type(FILE *fp, struct lp_type type)