summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/tdfx/tdfx_context.c
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2005-06-01 08:22:57 +0000
committerEric Anholt <anholt@FreeBSD.org>2005-06-01 08:22:57 +0000
commitf090fdc50b290566a5b6aaf57ddd31b340f58de5 (patch)
treea851b91c8e4eb39da9389366b7d628c605ada9ce /src/mesa/drivers/dri/tdfx/tdfx_context.c
parentd638f6a0bbc7df246700ed78c11837af6e6c6246 (diff)
Move fallback and other debugging under TDFX_DEBUG using the same mechanism
as other drivers.
Diffstat (limited to 'src/mesa/drivers/dri/tdfx/tdfx_context.c')
-rw-r--r--src/mesa/drivers/dri/tdfx/tdfx_context.c21
1 files changed, 13 insertions, 8 deletions
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;