From 3a71d05e538c24b23fbe356295e2096f8bb692d1 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 5 Sep 2000 20:17:37 +0000 Subject: added tracing facility from Loki --- src/mesa/main/dispatch.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/dispatch.c b/src/mesa/main/dispatch.c index 048ad16169e..a2198cb15f0 100644 --- a/src/mesa/main/dispatch.c +++ b/src/mesa/main/dispatch.c @@ -1,8 +1,8 @@ -/* $Id: dispatch.c,v 1.15 2000/02/02 19:34:08 brianp Exp $ */ +/* $Id: dispatch.c,v 1.16 2000/09/05 20:17:37 brianp Exp $ */ /* * Mesa 3-D graphics library - * Version: 3.3 + * Version: 3.5 * * Copyright (C) 1999-2000 Brian Paul All Rights Reserved. * @@ -64,6 +64,7 @@ #ifdef DEBUG +#if 0 static int trace(void) { @@ -72,26 +73,27 @@ trace(void) trace = getenv("MESA_TRACE") ? 1 : 0; return trace > 0; } +#endif #define F stderr #define DISPATCH(FUNC, ARGS, MESSAGE) \ const struct _glapi_table *dispatch; \ dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\ - if (trace()) { \ - fprintf MESSAGE; \ - fprintf(F, "\n"); \ - } \ (dispatch->FUNC) ARGS #define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \ const struct _glapi_table *dispatch; \ dispatch = _glapi_Dispatch ? _glapi_Dispatch : _glapi_get_dispatch();\ + return (dispatch->FUNC) ARGS + +#if 0 + /* From both macros above... */ if (trace()) { \ fprintf MESSAGE; \ fprintf(F, "\n"); \ - } \ - return (dispatch->FUNC) ARGS + } +#endif #else -- cgit v1.2.3