summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/p_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/p_util.h')
-rw-r--r--src/mesa/pipe/p_util.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/pipe/p_util.h b/src/mesa/pipe/p_util.h
index 7897bc90e4..3c5e98453c 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.
@@ -204,8 +205,8 @@ static INLINE unsigned char float_to_ubyte( float f )
static INLINE unsigned pack_ui32_float4( float a,
float b,
- float d,
- float c )
+ float c,
+ float d )
{
return pack_ub4( float_to_ubyte(a),
float_to_ubyte(b),
@@ -300,4 +301,8 @@ static INLINE float LOG2(float val)
#define CEILF(x) ((float) ceil(x))
#endif
+/* Convenient...
+ */
+extern void _mesa_printf(const char *str, ...);
+
#endif