diff options
Diffstat (limited to 'src/mesa/main/macros.h')
-rw-r--r-- | src/mesa/main/macros.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/mesa/main/macros.h b/src/mesa/main/macros.h index 02121e3e120..a77e2fc65b2 100644 --- a/src/mesa/main/macros.h +++ b/src/mesa/main/macros.h @@ -1,4 +1,4 @@ -/* $Id: macros.h,v 1.15 2000/11/24 10:25:05 keithw Exp $ */ +/* $Id: macros.h,v 1.16 2000/12/26 05:09:29 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -72,6 +72,7 @@ */ #define STRIDE_F(p, i) (p = (GLfloat *)((GLubyte *)p + i)) #define STRIDE_UI(p, i) (p = (GLuint *)((GLubyte *)p + i)) +#define STRIDE_4UB(p, i) (p = (GLubyte (*)[4])((GLubyte *)p + i)) #define STRIDE_T(p, t, i) (p = (t *)((GLubyte *)p + i)) @@ -80,6 +81,23 @@ #define ZERO_4V( DST ) (DST)[0] = (DST)[1] = (DST)[2] = (DST)[3] = 0 +#define TEST_EQ_4V(a,b) ((a)[0] == (b)[0] && \ + (a)[1] == (b)[1] && \ + (a)[2] == (b)[2] && \ + (a)[3] == (b)[3]) + +#define TEST_EQ_3V(a,b) ((a)[0] == (b)[0] && \ + (a)[1] == (b)[1] && \ + (a)[2] == (b)[2]) + +#if defined(__i386__) +#define TEST_EQ_4UBV(DST, SRC) *((GLuint*)(DST)) == *((GLuint*)(SRC)) +#else +#define TEST_EQ_4UBV(DST, SRC) TEST_EQ_4V(DST, SRC) +#endif + + + /* Copy short vectors: */ #define COPY_2V( DST, SRC ) \ do { \ |