summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-10-27 20:09:53 +0000
committerJosé Fonseca <jfonseca@vmware.com>2009-10-28 11:26:26 +0000
commit095e66f695ce1d869a824d9e22f63b54c95ca0ac (patch)
tree064ad505236773f983a97ae17692185259fdda2e /src/gallium
parent6bc1e9fd6989483fbc1c94730a8014b4c62b242c (diff)
llvmpipe: Implement round() for MSVC.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_test_main.c b/src/gallium/drivers/llvmpipe/lp_test_main.c
index d4767ff52b..82fada5a35 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)