From f090fdc50b290566a5b6aaf57ddd31b340f58de5 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 1 Jun 2005 08:22:57 +0000 Subject: Move fallback and other debugging under TDFX_DEBUG using the same mechanism as other drivers. --- src/mesa/drivers/dri/tdfx/tdfx_context.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/mesa/drivers/dri/tdfx/tdfx_context.c') diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c index 12e35d7c2b..9b4a79b858 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_context.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c @@ -152,6 +152,15 @@ static const struct tnl_pipeline_stage *tdfx_pipeline[] = { 0, }; +static const struct dri_debug_control debug_control[] = +{ + { "dri", DEBUG_VERBOSE_DRI }, + { "sync", DEBUG_ALWAYS_SYNC }, + { "api", DEBUG_VERBOSE_API }, + { "fall", DEBUG_VERBOSE_FALL }, + { NULL, 0 } +}; + GLboolean tdfxCreateContext( const __GLcontextModes *mesaVis, __DRIcontextPrivate *driContextPriv, void *sharedContextPrivate ) @@ -320,6 +329,10 @@ GLboolean tdfxCreateContext( const __GLcontextModes *mesaVis, tdfxInitVB( ctx ); tdfxInitState( fxMesa ); +#if DO_DEBUG + TDFX_DEBUG = driParseDebugString( getenv( "TDFX_DEBUG" ), debug_control ); +#endif + if (driQueryOptionb(&fxMesa->optionCache, "no_rast")) { fprintf(stderr, "disabling 3D acceleration\n"); FALLBACK(fxMesa, TDFX_FALLBACK_DISABLE, 1); @@ -534,14 +547,6 @@ tdfxInitContext( __DRIdrawablePrivate *driDrawPriv, tdfxContextPtr fxMesa ) UNLOCK_HARDWARE( fxMesa ); - { - const char *debug = getenv("LIBGL_DEBUG"); - if (debug && strstr(debug, "fallbacks")) { - fxMesa->debugFallbacks = GL_TRUE; - } - } - - fxMesa->numClipRects = 0; fxMesa->pClipRects = NULL; fxMesa->scissoredClipRects = GL_FALSE; -- cgit v1.2.3