mesa: Remove CHECK macro.

There's some commentary about how it's defined by other "modules", and
maybe that was true in 2000 when the code was added.

Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Matt Turner 2015-02-20 20:12:14 -08:00
parent 6a587a4461
commit 52049f8fd8
3 changed files with 30 additions and 58 deletions

View File

@ -200,12 +200,6 @@ static inline GLuint CPU_TO_LE32(GLuint x)
#endif
/* Turn off macro checking systems used by other libraries */
#ifdef CHECK
#undef CHECK
#endif
/**
* ASSERT macro
*/

View File

@ -40,13 +40,11 @@ static void DEST_4F( GLfloat (*t)[4],
(void) first;
(void) start;
for (i = DST_START ; i < n ; i++, NEXT_F) {
CHECK {
NEXT_F2;
if (SZ >= 1) t[i][0] = TRX_4F(f, 0);
if (SZ >= 2) t[i][1] = TRX_4F(f, 1);
if (SZ >= 3) t[i][2] = TRX_4F(f, 2);
if (SZ == 4) t[i][3] = TRX_4F(f, 3); else t[i][3] = 1.0;
}
NEXT_F2;
if (SZ >= 1) t[i][0] = TRX_4F(f, 0);
if (SZ >= 2) t[i][1] = TRX_4F(f, 1);
if (SZ >= 3) t[i][2] = TRX_4F(f, 2);
if (SZ == 4) t[i][3] = TRX_4F(f, 3); else t[i][3] = 1.0;
}
}
#endif
@ -66,13 +64,11 @@ static void DEST_4FN( GLfloat (*t)[4],
(void) first;
(void) start;
for (i = DST_START ; i < n ; i++, NEXT_F) {
CHECK {
NEXT_F2;
if (SZ >= 1) t[i][0] = TRX_4FN(f, 0);
if (SZ >= 2) t[i][1] = TRX_4FN(f, 1);
if (SZ >= 3) t[i][2] = TRX_4FN(f, 2);
if (SZ == 4) t[i][3] = TRX_4FN(f, 3); else t[i][3] = 1.0;
}
NEXT_F2;
if (SZ >= 1) t[i][0] = TRX_4FN(f, 0);
if (SZ >= 2) t[i][1] = TRX_4FN(f, 1);
if (SZ >= 3) t[i][2] = TRX_4FN(f, 2);
if (SZ == 4) t[i][3] = TRX_4FN(f, 3); else t[i][3] = 1.0;
}
}
#endif
@ -90,12 +86,10 @@ static void DEST_3FN( GLfloat (*t)[3],
(void) first;
(void) start;
for (i = DST_START ; i < n ; i++, NEXT_F) {
CHECK {
NEXT_F2;
t[i][0] = TRX_3FN(f, 0);
t[i][1] = TRX_3FN(f, 1);
t[i][2] = TRX_3FN(f, 2);
}
NEXT_F2;
t[i][0] = TRX_3FN(f, 0);
t[i][1] = TRX_3FN(f, 1);
t[i][2] = TRX_3FN(f, 2);
}
}
#endif
@ -112,10 +106,8 @@ static void DEST_1F( GLfloat *t,
(void) first;
(void) start;
for (i = DST_START ; i < n ; i++, NEXT_F) {
CHECK {
NEXT_F2;
t[i] = TRX_1F(f, 0);
}
NEXT_F2;
t[i] = TRX_1F(f, 0);
}
}
#endif
@ -132,13 +124,11 @@ static void DEST_4UB( GLubyte (*t)[4],
(void) start;
(void) first;
for (i = DST_START ; i < n ; i++, NEXT_F) {
CHECK {
NEXT_F2;
if (SZ >= 1) TRX_UB(t[i][0], f, 0);
if (SZ >= 2) TRX_UB(t[i][1], f, 1);
if (SZ >= 3) TRX_UB(t[i][2], f, 2);
if (SZ == 4) TRX_UB(t[i][3], f, 3); else t[i][3] = 255;
}
NEXT_F2;
if (SZ >= 1) TRX_UB(t[i][0], f, 0);
if (SZ >= 2) TRX_UB(t[i][1], f, 1);
if (SZ >= 3) TRX_UB(t[i][2], f, 2);
if (SZ == 4) TRX_UB(t[i][3], f, 3); else t[i][3] = 255;
}
}
#endif
@ -156,13 +146,11 @@ static void DEST_4US( GLushort (*t)[4],
(void) start;
(void) first;
for (i = DST_START ; i < n ; i++, NEXT_F) {
CHECK {
NEXT_F2;
if (SZ >= 1) TRX_US(t[i][0], f, 0);
if (SZ >= 2) TRX_US(t[i][1], f, 1);
if (SZ >= 3) TRX_US(t[i][2], f, 2);
if (SZ == 4) TRX_US(t[i][3], f, 3); else t[i][3] = 65535;
}
NEXT_F2;
if (SZ >= 1) TRX_US(t[i][0], f, 0);
if (SZ >= 2) TRX_US(t[i][1], f, 1);
if (SZ >= 3) TRX_US(t[i][2], f, 2);
if (SZ == 4) TRX_US(t[i][3], f, 3); else t[i][3] = 65535;
}
}
#endif
@ -180,10 +168,8 @@ static void DEST_1UB( GLubyte *t,
(void) start;
(void) first;
for (i = DST_START ; i < n ; i++, NEXT_F) {
CHECK {
NEXT_F2;
TRX_UB(t[i], f, 0);
}
NEXT_F2;
TRX_UB(t[i], f, 0);
}
}
#endif
@ -202,10 +188,8 @@ static void DEST_1UI( GLuint *t,
(void) first;
for (i = DST_START ; i < n ; i++, NEXT_F) {
CHECK {
NEXT_F2;
t[i] = TRX_UI(f, 0);
}
NEXT_F2;
t[i] = TRX_UI(f, 0);
}
}
#endif

View File

@ -84,10 +84,6 @@ typedef void (*trans_3fn_func)(GLfloat (*to)[3],
#define MAX_TYPES TYPE_IDX(GL_DOUBLE)+1 /* 0xa + 1 */
/* This macro is used on other systems, so undefine it for this module */
#undef CHECK
static trans_1f_func _math_trans_1f_tab[MAX_TYPES];
static trans_1ui_func _math_trans_1ui_tab[MAX_TYPES];
static trans_1ub_func _math_trans_1ub_tab[MAX_TYPES];
@ -108,7 +104,6 @@ static trans_4f_func _math_trans_4fn_tab[5][MAX_TYPES];
#define STRIDE stride
#define NEXT_F f += stride
#define NEXT_F2
#define CHECK
@ -604,7 +599,6 @@ static void init_translate_raw(void)
#undef CLASS
#endif
#undef ARGS
#undef CHECK
#undef SRC_START
#undef DST_START
#undef NEXT_F