diff options
author | Brian Paul <[email protected]> | 2005-09-19 20:12:32 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-09-19 20:12:32 +0000 |
commit | b3aefd1cfb6aacd1695c52911dd39da50d893ece (patch) | |
tree | 247125551b41cc22dec6f1f03bb1d6709c804bba /src/mesa/tnl/t_vtx_x86.c | |
parent | a01cb26a90aaa8f631c94d741617715dff89168c (diff) |
additional wrapper updates, bug 4468
Diffstat (limited to 'src/mesa/tnl/t_vtx_x86.c')
-rw-r--r-- | src/mesa/tnl/t_vtx_x86.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/mesa/tnl/t_vtx_x86.c b/src/mesa/tnl/t_vtx_x86.c index 1812cfa4715..99a05509327 100644 --- a/src/mesa/tnl/t_vtx_x86.c +++ b/src/mesa/tnl/t_vtx_x86.c @@ -44,7 +44,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "t_vtx_api.h" #include "simple_list.h" - #if defined(USE_X86_ASM) && !defined(HAVE_NONSTANDARD_GLAPIENTRY) #define EXTERN( FUNC ) \ @@ -94,6 +93,18 @@ EXTERN( _tnl_x86_choose_fv ); +#undef DEBUG_VTX + +#ifdef DEBUG_VTX +#define FIXUP_PRINTF( offset, NEWVAL ) \ + fprintf(stderr, "%s/%d: offset %d, new value: 0x%x\n", __FILE__, __LINE__, offset, (int)(NEWVAL)) +#define FIXUPREL_PRINTF( offset, NEWVAL, CODE ) \ + fprintf(stderr, "%s/%d: offset %d, new value: 0x%x\n", __FILE__, __LINE__, offset, (int)(NEWVAL) - ((int)(CODE)+offset) - 4) +#else +#define FIXUP_PRINTF( offset, NEWVAL ) +#define FIXUPREL_PRINTF( offset, NEWVAL, CODE ) +#endif + #define FIXUP( CODE, KNOWN_OFFSET, CHECKVAL, NEWVAL ) \ do { \ GLint subst = 0x10101010 + CHECKVAL; \ @@ -101,7 +112,7 @@ do { \ if (DONT_KNOW_OFFSETS) { \ while (*(int *)(CODE+offset) != subst) offset++; \ *(int *)(CODE+offset) = (int)(NEWVAL); \ - if (0) fprintf(stderr, "%s/%d: offset %d, new value: 0x%x\n", __FILE__, __LINE__, offset, (int)(NEWVAL)); \ + FIXUP_PRINTF(offset, NEWVAL); \ offset += 4; \ } \ else { \ @@ -120,7 +131,7 @@ do { \ if (DONT_KNOW_OFFSETS) { \ while (*(int *)(CODE+offset) != subst) offset++; \ *(int *)(CODE+offset) = (int)(NEWVAL) - ((int)(CODE)+offset) - 4; \ - if (0) fprintf(stderr, "%s/%d: offset %d, new value: 0x%x\n", __FILE__, __LINE__, offset, (int)(NEWVAL) - ((int)(CODE)+offset) - 4); \ + FIXUPREL_PRINTF(offset, NEWVAL, CODE); \ offset += 4; \ } \ else { \ |