summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-08-22 15:51:38 -0600
committerBrian Paul <[email protected]>2008-08-22 15:51:38 -0600
commita22bdd42d77bc858814f37d657fa940a520dbe56 (patch)
tree7f0c4307322a02a436d0a17a108f0a8c20eb7146 /src/gallium/include/pipe
parent9935e3b7303da656e258d4bd5bc799ffbfbc737b (diff)
gallium: move math macros from p_util.h to u_math.h
More can be done...
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r--src/gallium/include/pipe/p_util.h51
1 files changed, 0 insertions, 51 deletions
diff --git a/src/gallium/include/pipe/p_util.h b/src/gallium/include/pipe/p_util.h
index 660192b28e7..8f5cb4ddc5b 100644
--- a/src/gallium/include/pipe/p_util.h
+++ b/src/gallium/include/pipe/p_util.h
@@ -399,57 +399,6 @@ do { \
} while (0)
-static INLINE int ifloor(float f)
-{
- int ai, bi;
- double af, bf;
- union fi u;
-
- af = (3 << 22) + 0.5 + (double)f;
- bf = (3 << 22) + 0.5 - (double)f;
- u.f = (float) af; ai = u.i;
- u.f = (float) bf; bi = u.i;
- return (ai - bi) >> 1;
-}
-
-
-#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)
-static INLINE int iround(float f)
-{
- int r;
- __asm__ ("fistpl %0" : "=m" (r) : "t" (f) : "st");
- return r;
-}
-#elif defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86)
-static INLINE int iround(float f)
-{
- int r;
- _asm {
- fld f
- fistp r
- }
- return r;
-}
-#else
-#define IROUND(f) ((int) (((f) >= 0.0F) ? ((f) + 0.5F) : ((f) - 0.5F)))
-#endif
-
-
-/* Could maybe have an inline version of this?
- */
-#if defined(__GNUC__)
-#define FABSF(x) fabsf(x)
-#else
-#define FABSF(x) ((float) fabs(x))
-#endif
-
-
-#if defined(__GNUC__)
-#define CEILF(x) ceilf(x)
-#else
-#define CEILF(x) ((float) ceil(x))
-#endif
-
static INLINE int align(int value, int alignment)
{
return (value + alignment - 1) & ~(alignment - 1);