diff options
author | Michal Krol <michal@tungstengraphics.com> | 2008-02-20 22:04:32 +0100 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-02-23 00:50:59 +0900 |
commit | 8828dd1443c7d55697f78757b22be2733e059acf (patch) | |
tree | f0cc2cc20b0aaaf8490389add149ae89a95ab802 /src/gallium/include | |
parent | f44b30f1eb4896668c4fe91cd9b084ea63c9e915 (diff) |
gallium: Move align_pointer() to p_pointer.h.
Diffstat (limited to 'src/gallium/include')
-rw-r--r-- | src/gallium/include/pipe/p_util.h | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/src/gallium/include/pipe/p_util.h b/src/gallium/include/pipe/p_util.h index d7da2801c9..6f0dbdacd9 100644 --- a/src/gallium/include/pipe/p_util.h +++ b/src/gallium/include/pipe/p_util.h @@ -30,6 +30,7 @@ #include "p_compiler.h" #include "p_debug.h" +#include "p_pointer.h" #include <math.h> @@ -115,33 +116,6 @@ REALLOC( void *old_ptr, unsigned old_size, unsigned new_size ) /** - * Return a pointer aligned to next multiple of N bytes. - */ -static INLINE void * -align_pointer( void *unaligned, uint alignment ) -{ - if (sizeof(void *) == 64) { - union { - void *p; - uint64 u; - } pu; - pu.p = unaligned; - pu.u = (pu.u + alignment - 1) & ~(uint64) (alignment - 1); - return pu.p; - } - else { - /* 32-bit pointers */ - union { - void *p; - uint u; - } pu; - pu.p = unaligned; - pu.u = (pu.u + alignment - 1) & ~(alignment - 1); - return pu.p; - } -} - -/** * Return memory on given byte alignment */ static INLINE void * |