-/**
- * Align a value up to an alignment value
- *
- * If \c value is not already aligned to the requested alignment value, it
- * will be rounded up.
- *
- * \param value Value to be rounded
- * \param alignment Alignment value to be used. This must be a power of two.
- *
- * \sa ROUND_DOWN_TO()
- */
-static inline uintptr_t
-ALIGN(uintptr_t value, int32_t alignment)
-{
- assert((alignment > 0) && _mesa_is_pow_two(alignment));
- return (((value) + (alignment) - 1) & ~((alignment) - 1));
-}
-
-/**
- * Align a value down to an alignment value
- *
- * If \c value is not already aligned to the requested alignment value, it
- * will be rounded down.
- *
- * \param value Value to be rounded
- * \param alignment Alignment value to be used. This must be a power of two.
- *
- * \sa ALIGN()
- */
-static inline uintptr_t
-ROUND_DOWN_TO(uintptr_t value, int32_t alignment)
-{
- assert((alignment > 0) && _mesa_is_pow_two(alignment));
- return ((value) & ~(alignment - 1));
-}
-