summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/p_util.h
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2007-12-15 09:48:11 +1100
committerBen Skeggs <skeggsb@gmail.com>2007-12-15 09:48:11 +1100
commitb5b9ac62e6a9667de4bb2078d5cd3199fe25f619 (patch)
tree5c3f389d10132cd2c9733c5c0f3d81a657298f53 /src/mesa/pipe/p_util.h
parent7f89c776e19b400c0adf647fc9dfb392efe88dbd (diff)
parent017f862de1f857bca29f09794539aaf411014f13 (diff)
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Diffstat (limited to 'src/mesa/pipe/p_util.h')
-rw-r--r--src/mesa/pipe/p_util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/pipe/p_util.h b/src/mesa/pipe/p_util.h
index e6d284d932..46edcf3075 100644
--- a/src/mesa/pipe/p_util.h
+++ b/src/mesa/pipe/p_util.h
@@ -360,6 +360,11 @@ static INLINE float LOG2(float val)
#define CEILF(x) ((float) ceil(x))
#endif
+static INLINE int align(int value, int alignment)
+{
+ return (value + alignment - 1) & ~(alignment - 1);
+}
+
/* Convenient...
*/
extern void _mesa_printf(const char *str, ...);