summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-04-21 12:38:14 +0100
committerKeith Whitwell <[email protected]>2008-04-21 13:14:30 +0100
commitf30f3206121c56e5c50ccafb1467a8301044d411 (patch)
tree0f166022b8fc1047dca2087c23b0bc31ce773009 /src/gallium/include
parentb6c9d2ef2cfadbbe3e7aa94f21fd0da36d089952 (diff)
util: add wrappers for float math functions on windows
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_util.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_util.h b/src/gallium/include/pipe/p_util.h
index dbca080a4b9..77783b11a88 100644
--- a/src/gallium/include/pipe/p_util.h
+++ b/src/gallium/include/pipe/p_util.h
@@ -402,6 +402,52 @@ extern void pipe_copy_rect(ubyte * dst, unsigned cpp, unsigned dst_pitch,
int src_pitch, unsigned src_x, int src_y);
+
+#ifdef WIN32
+
+static INLINE float cosf( float f )
+{
+ return (float) cos( (double) f );
+}
+
+static INLINE float sinf( float f )
+{
+ return (float) sin( (double) f );
+}
+
+static INLINE float ceilf( float f )
+{
+ return (float) ceil( (double) f );
+}
+
+static INLINE float floorf( float f )
+{
+ return (float) floor( (double) f );
+}
+
+static INLINE float powf( float f, float g )
+{
+ return (float) pow( (double) f, (double) g );
+}
+
+static INLINE float sqrtf( float f )
+{
+ return (float) sqrt( (double) f );
+}
+
+static INLINE float fabsf( float f )
+{
+ return (float) fabs( (double) f );
+}
+
+static INLINE float logf( float f )
+{
+ return (float) cos( (double) f );
+}
+
+#endif
+
+
#ifdef __cplusplus
}
#endif