diff options
Diffstat (limited to 'src/mesa/pipe/p_util.h')
-rw-r--r-- | src/mesa/pipe/p_util.h | 5 |
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, ...); |