From 3b18a36f210da9d66acd1228d24948cd77c2e81e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 26 Sep 2000 15:27:20 +0000 Subject: [PATCH] Replaced preprocessor symbol GL_MESA_TRACE with MESA_TRACE. Changed src/Makefile.X11 to compile Trace sources like other drivers. --- Make-config | 6 +++--- src/mesa/Makefile.X11 | 39 ++++++++++++++++++++++++++++++++++---- src/mesa/glapi/glapi.c | 27 +++++++++++++------------- src/mesa/glapi/glapi.h | 4 ++-- src/mesa/main/Makefile.X11 | 39 ++++++++++++++++++++++++++++++++++---- src/mesa/main/context.c | 6 +++--- 6 files changed, 92 insertions(+), 29 deletions(-) diff --git a/Make-config b/Make-config index 522405c0d70..7b40a565177 100644 --- a/Make-config +++ b/Make-config @@ -1,4 +1,4 @@ -# $Id: Make-config,v 1.28 2000/09/15 19:44:43 brianp Exp $ +# $Id: Make-config,v 1.29 2000/09/26 15:27:20 brianp Exp $ MESA_MAJOR=3 MESA_MINOR=5 @@ -463,7 +463,7 @@ linux-trace: "GLUT_LIB = libglut.so" \ "GLW_LIB = libGLw.so" \ "CC = gcc" \ - "CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -DGL_MESA_TRACE -I/usr/X11R6/include" \ + "CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -DUSE_XSHM -DPTHREADS -DMESA_TRACE -I/usr/X11R6/include" \ "MAKELIB = ../bin/mklib.linux" \ "GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread" \ "GLU_LIB_DEPS = -L../lib -lGL -lm" \ @@ -1306,7 +1306,7 @@ linux-elf-debug: "GLUT_LIB = libglut.so" \ "GLW_LIB = libGLw.so" \ "CC = gcc" \ - "CFLAGS = -g -ansi -pedantic -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG -DSVGA -I/usr/include/glide -DFX -DGL_MESA_TRACE" \ + "CFLAGS = -g -ansi -pedantic -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fPIC -ffast-math -D_SVID_SOURCE -D_BSD_SOURCE -I/usr/X11R6/include -DUSE_XSHM -DPTHREADS -DDEBUG -DMESA_DEBUG -DSVGA -I/usr/include/glide -DFX" \ "MAKELIB = ../bin/mklib.linux" \ "GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm -lpthread -lvga -L/usr/local/glide/lib -lglide2x" \ "GLU_LIB_DEPS = -L../lib -lGL -lm" \ diff --git a/src/mesa/Makefile.X11 b/src/mesa/Makefile.X11 index bb383f65540..d4b1b5ba929 100644 --- a/src/mesa/Makefile.X11 +++ b/src/mesa/Makefile.X11 @@ -1,4 +1,4 @@ -# $Id: Makefile.X11,v 1.22 2000/09/07 15:42:13 brianp Exp $ +# $Id: Makefile.X11,v 1.23 2000/09/26 15:27:23 brianp Exp $ # Mesa 3-D graphics library # Version: 3.5 @@ -132,7 +132,15 @@ DRIVER_SOURCES = \ FX/fxtexman.c \ FX/fxtrifuncs.c \ FX/fxvsetup.c \ - FX/fxglidew.c + FX/fxglidew.c \ + Trace/tr_2string.c \ + Trace/tr_attrib.c \ + Trace/tr_context.c \ + Trace/tr_control.c \ + Trace/tr_error.c \ + Trace/tr_print.c \ + Trace/tr_wrapper.c + ASM_SOURCES = @@ -170,6 +178,7 @@ X/xm_line.o: X/xm_line.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ X/xm_tri.o: X/xm_tri.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ + SVGA/svgamesa.o: SVGA/svgamesa.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ SVGA/svgamesa8.o: SVGA/svgamesa8.c @@ -182,8 +191,10 @@ SVGA/svgamesa24.o: SVGA/svgamesa24.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ SVGA/svgamesa32.o: SVGA/svgamesa32.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ + OSmesa/osmesa.o: OSmesa/osmesa.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ + FX/fxapi.o: FX/fxapi.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ FX/fxclip.o: FX/fxclip.c @@ -214,9 +225,9 @@ FX/fxvsetup.o: FX/fxvsetup.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ FX/fxglidew.o: FX/fxglidew.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ + FX/X86/fx_3dnow_fastpath.o: FX/X86/fx_3dnow_fastpath.S -GGI/ggimesa.o: GGI/ggimesa.c - $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ + X86/x86.o: X86/x86.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ X86/common_x86.o: X86/common_x86.c @@ -226,6 +237,26 @@ X86/3dnow.o: X86/3dnow.c X86/katmai.o: X86/katmai.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ +GGI/ggimesa.o: GGI/ggimesa.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ + +Trace/tr_2string.o: Trace/tr_2string.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ +Trace/tr_attrib.o: Trace/tr_attrib.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ +Trace/tr_context.o: Trace/tr_context.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ +Trace/tr_control.o: Trace/tr_control.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ +Trace/tr_error.o: Trace/tr_error.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ +Trace/tr_print.o: Trace/tr_print.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ +Trace/tr_wrapper.o: Trace/tr_wrapper.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ + + + ##### TARGETS ##### #default: diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c index bb7c20cdf9f..9b01046ea35 100644 --- a/src/mesa/glapi/glapi.c +++ b/src/mesa/glapi/glapi.c @@ -1,4 +1,4 @@ -/* $Id: glapi.c,v 1.44 2000/09/15 19:45:41 brianp Exp $ */ +/* $Id: glapi.c,v 1.45 2000/09/26 15:27:22 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -49,7 +49,7 @@ #include "glapitable.h" #include "glthread.h" -#if defined(GL_MESA_TRACE) +#if defined(MESA_TRACE) #include "types.h" #endif @@ -170,7 +170,7 @@ _glapi_get_context(void) void _glapi_set_dispatch(struct _glapi_table *dispatch) { -#if defined(GL_MESA_TRACE) +#if defined(MESA_TRACE) GLcontext * ctx; #endif @@ -185,35 +185,36 @@ _glapi_set_dispatch(struct _glapi_table *dispatch) #endif #if defined(THREADS) -#if defined(GL_MESA_TRACE) +#if defined(MESA_TRACE) ctx = (GLcontext *)_glthread_GetTSD(&ContextTSD); if (ctx->TraceCtx->traceEnabled == GL_TRUE) { - _glthread_SetTSD(&DispatchTSD, (void*) ctx->TraceDispatch); + _glthread_SetTSD(&DispatchTSD, (void *) ctx->TraceDispatch); if (ThreadSafe) _glapi_Dispatch = NULL; else _glapi_Dispatch = ctx->TraceDispatch; - } else { - _glthread_SetTSD(&DispatchTSD, (void*) dispatch); + } + else { + _glthread_SetTSD(&DispatchTSD, (void *) dispatch); if (ThreadSafe) _glapi_Dispatch = NULL; else _glapi_Dispatch = dispatch; } #else - _glthread_SetTSD(&DispatchTSD, (void*) dispatch); + _glthread_SetTSD(&DispatchTSD, (void *) dispatch); if (ThreadSafe) _glapi_Dispatch = NULL; else _glapi_Dispatch = dispatch; -#endif /*GL_MESA_TRACE*/ +#endif /*MESA_TRACE*/ #else /*THREADS*/ -#if defined(GL_MESA_TRACE) +#if defined(MESA_TRACE) ctx = (GLcontext *)_glthread_GetTSD(&ContextTSD); _glapi_Dispatch = ctx->TraceDispatch; #else _glapi_Dispatch = dispatch; -#endif /*GL_MESA_TRACE*/ +#endif /*MESA_TRACE*/ #endif /*THREADS*/ } @@ -239,7 +240,7 @@ _glapi_get_dispatch(void) } -#if defined(GL_MESA_TRACE) +#if defined(MESA_TRACE) struct _glapi_table * _glapi_get_true_dispatch(void) { @@ -263,7 +264,7 @@ _glapi_get_true_dispatch(void) return ((GLcontext *)_glapi_Context)->CurrentDispatch; #endif } -#endif /* GL_MESA_TRACE */ +#endif /* MESA_TRACE */ /* diff --git a/src/mesa/glapi/glapi.h b/src/mesa/glapi/glapi.h index e64562ad1ed..f55b0740530 100644 --- a/src/mesa/glapi/glapi.h +++ b/src/mesa/glapi/glapi.h @@ -1,4 +1,4 @@ -/* $Id: glapi.h,v 1.16 2000/09/15 19:45:41 brianp Exp $ */ +/* $Id: glapi.h,v 1.17 2000/09/26 15:27:23 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -59,7 +59,7 @@ extern struct _glapi_table * _glapi_get_dispatch(void); -#if defined(GL_MESA_TRACE) +#if defined(MESA_TRACE) extern struct _glapi_table * _glapi_get_true_dispatch(void); #endif diff --git a/src/mesa/main/Makefile.X11 b/src/mesa/main/Makefile.X11 index bb383f65540..d4b1b5ba929 100644 --- a/src/mesa/main/Makefile.X11 +++ b/src/mesa/main/Makefile.X11 @@ -1,4 +1,4 @@ -# $Id: Makefile.X11,v 1.22 2000/09/07 15:42:13 brianp Exp $ +# $Id: Makefile.X11,v 1.23 2000/09/26 15:27:23 brianp Exp $ # Mesa 3-D graphics library # Version: 3.5 @@ -132,7 +132,15 @@ DRIVER_SOURCES = \ FX/fxtexman.c \ FX/fxtrifuncs.c \ FX/fxvsetup.c \ - FX/fxglidew.c + FX/fxglidew.c \ + Trace/tr_2string.c \ + Trace/tr_attrib.c \ + Trace/tr_context.c \ + Trace/tr_control.c \ + Trace/tr_error.c \ + Trace/tr_print.c \ + Trace/tr_wrapper.c + ASM_SOURCES = @@ -170,6 +178,7 @@ X/xm_line.o: X/xm_line.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ X/xm_tri.o: X/xm_tri.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ + SVGA/svgamesa.o: SVGA/svgamesa.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ SVGA/svgamesa8.o: SVGA/svgamesa8.c @@ -182,8 +191,10 @@ SVGA/svgamesa24.o: SVGA/svgamesa24.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ SVGA/svgamesa32.o: SVGA/svgamesa32.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ + OSmesa/osmesa.o: OSmesa/osmesa.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ + FX/fxapi.o: FX/fxapi.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ FX/fxclip.o: FX/fxclip.c @@ -214,9 +225,9 @@ FX/fxvsetup.o: FX/fxvsetup.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ FX/fxglidew.o: FX/fxglidew.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ + FX/X86/fx_3dnow_fastpath.o: FX/X86/fx_3dnow_fastpath.S -GGI/ggimesa.o: GGI/ggimesa.c - $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ + X86/x86.o: X86/x86.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ X86/common_x86.o: X86/common_x86.c @@ -226,6 +237,26 @@ X86/3dnow.o: X86/3dnow.c X86/katmai.o: X86/katmai.c $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ +GGI/ggimesa.o: GGI/ggimesa.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ + +Trace/tr_2string.o: Trace/tr_2string.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ +Trace/tr_attrib.o: Trace/tr_attrib.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ +Trace/tr_context.o: Trace/tr_context.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ +Trace/tr_control.o: Trace/tr_control.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ +Trace/tr_error.o: Trace/tr_error.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ +Trace/tr_print.o: Trace/tr_print.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ +Trace/tr_wrapper.o: Trace/tr_wrapper.c + $(CC) -c -I. -I$(INCDIR) $(CFLAGS) $< -o $@ + + + ##### TARGETS ##### #default: diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 71cbc6addcf..551327254f3 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1,4 +1,4 @@ -/* $Id: context.c,v 1.88 2000/09/17 21:56:07 brianp Exp $ */ +/* $Id: context.c,v 1.89 2000/09/26 15:27:22 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -74,7 +74,7 @@ #endif -#if defined(GL_MESA_TRACE) +#if defined(MESA_TRACE) #include "Trace/tr_context.h" #include "Trace/tr_wrapper.h" #endif @@ -1491,7 +1491,7 @@ _mesa_initialize_context( GLcontext *ctx, _mesa_init_dlist_table(ctx->Save, dispatchSize); ctx->CurrentDispatch = ctx->Exec; -#if defined(GL_MESA_TRACE) +#if defined(MESA_TRACE) ctx->TraceCtx = CALLOC( sizeof(trace_context_t) ); #if 0 /* Brian: do you want to have CreateContext fail here, -- 2.30.2