summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2012-12-17 13:48:21 -0800
committerPaul Berry <stereotype441@gmail.com>2013-01-08 09:08:57 -0800
commit8706395f25228d0e622cc56346c7181ba102edf4 (patch)
treea864b8b39c8c691943762cef3b587e7c47ed1e63 /src/mesa/drivers
parent09df6bb96d5d7b987de6cd48d87d175e5cd2ccf3 (diff)
mesa: Add ALIGN() macro to main/macros.h.
Previously this macro existed in 3 separate places, some inside the intel driver and some outside of it. It makes more sense to have it in main/macros.h Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h1
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.h13
2 files changed, 1 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index eba9eb59016..c7fc5864d80 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -36,6 +36,7 @@
#include "intel_context.h"
#include "brw_structs.h"
#include "main/imports.h"
+#include "main/macros.h"
#ifdef __cplusplus
extern "C" {
diff --git a/src/mesa/drivers/dri/intel/intel_context.h b/src/mesa/drivers/dri/intel/intel_context.h
index 8d544dccaef..dbc5ea02bcf 100644
--- a/src/mesa/drivers/dri/intel/intel_context.h
+++ b/src/mesa/drivers/dri/intel/intel_context.h
@@ -350,19 +350,6 @@ extern char *__progname;
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
/**
- * 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()
- */
-#define ALIGN(value, alignment) (((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