aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/util/macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/util/macros.h')
-rw-r--r--mesalib/src/util/macros.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesalib/src/util/macros.h b/mesalib/src/util/macros.h
index 6c7bda7ae..3b708ed6a 100644
--- a/mesalib/src/util/macros.h
+++ b/mesalib/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 */