llvmpipe: Implement round() for MSVC.
authorJosé Fonseca <jfonseca@vmware.com>
Tue, 27 Oct 2009 20:09:53 +0000 (20:09 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Wed, 28 Oct 2009 11:26:26 +0000 (11:26 +0000)
src/gallium/drivers/llvmpipe/lp_test_main.c

index d4767ff52ba7e2084523c66b53bbddd9b59a976c..82fada5a359332352e11cd2f3cfc818c37295d18 100644 (file)
 #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)