projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79ad824
)
[pipe]: add Offset() util macro
author
keithw
<keithw@keithw-laptop.(none)>
Wed, 21 Nov 2007 11:04:20 +0000
(11:04 +0000)
committer
José Fonseca
<jrfonseca@tungstengraphics.com>
Sun, 9 Dec 2007 14:03:33 +0000
(14:03 +0000)
src/mesa/pipe/p_util.h
patch
|
blob
|
history
diff --git
a/src/mesa/pipe/p_util.h
b/src/mesa/pipe/p_util.h
index 7897bc90e4432bc5cb646e85cce6c4bc31578008..4002e2659feb92c09ddec71b8d8b2fa25becefbe 100644
(file)
--- a/
src/mesa/pipe/p_util.h
+++ b/
src/mesa/pipe/p_util.h
@@
-114,6
+114,7
@@
REALLOC( void *old_ptr, unsigned old_size, unsigned new_size )
#define MAX2( A, B ) ( (A)>(B) ? (A) : (B) )
#define Elements(x) sizeof(x)/sizeof(*(x))
+#define Offset(TYPE, MEMBER) ((unsigned)&(((TYPE *)NULL)->MEMBER))
/**
* Return a pointer aligned to next multiple of 16 bytes.