diff options
-rw-r--r-- | src/gallium/drivers/svga/include/svga3d_surfacedefs.h | 2 | ||||
-rw-r--r-- | src/mesa/main/macros.h | 5 | ||||
-rw-r--r-- | src/util/macros.h | 2 |
3 files changed, 3 insertions, 6 deletions
diff --git a/src/gallium/drivers/svga/include/svga3d_surfacedefs.h b/src/gallium/drivers/svga/include/svga3d_surfacedefs.h index 8763cdf319e..e32d19458a6 100644 --- a/src/gallium/drivers/svga/include/svga3d_surfacedefs.h +++ b/src/gallium/drivers/svga/include/svga3d_surfacedefs.h @@ -35,8 +35,6 @@ #define ARRAY_SIZE(A) (sizeof(A) / sizeof(A[0])) #endif -#define DIV_ROUND_UP(x, y) (((x) + (y) - 1) / (y)) - #define max_t(type, x, y) ((x) > (y) ? (x) : (y)) /* diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h index 3344ec84169..0608650aeb4 100644 --- a/src/mesa/main/macros.h +++ b/src/mesa/main/macros.h @@ -31,6 +31,7 @@ #ifndef MACROS_H #define MACROS_H +#include "util/macros.h" #include "util/u_math.h" #include "imports.h" @@ -800,10 +801,6 @@ DIFFERENT_SIGNS(GLfloat x, GLfloat y) } -/** Compute ceiling of integer quotient of A divided by B. */ -#define DIV_ROUND_UP( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 ) - - /** casts to silence warnings with some compilers */ #define ENUM_TO_INT(E) ((GLint)(E)) #define ENUM_TO_FLOAT(E) ((GLfloat)(GLint)(E)) diff --git a/src/util/macros.h b/src/util/macros.h index 6c7bda7ae01..3b708ed6aa2 100644 --- a/src/util/macros.h +++ b/src/util/macros.h @@ -182,5 +182,7 @@ do { \ #define UNUSED #endif +/** Compute ceiling of integer quotient of A divided by B. */ +#define DIV_ROUND_UP( A, B ) ( (A) % (B) == 0 ? (A)/(B) : (A)/(B)+1 ) #endif /* UTIL_MACROS_H */ |