summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkeithw <keithw@keithw-laptop.(none)>2007-11-21 11:04:20 +0000
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2007-12-09 14:03:33 +0000
commite87efe74073938e6dea5f30654f6afb931da1e2c (patch)
tree1559978bbce4e26c78c25da8f50ff7bba84cd242 /src
parent79ad82477adab2c234370623c48c35316e94ad02 (diff)
[pipe]: add Offset() util macro
Diffstat (limited to 'src')
-rw-r--r--src/mesa/pipe/p_util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/pipe/p_util.h b/src/mesa/pipe/p_util.h
index 7897bc90e4..4002e2659f 100644
--- 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.