diff options
author | Felix Kuehling <fxkuehl@gmx.de> | 2004-12-17 15:55:17 +0000 |
---|---|---|
committer | Felix Kuehling <fxkuehl@gmx.de> | 2004-12-17 15:55:17 +0000 |
commit | 3d0487980196d386e75235fe9be0513546083613 (patch) | |
tree | 2bdee3ce6a8092a86e42731b8a585e580c4d4273 /src/mesa/drivers/dri/savage/savage_xmesa.c | |
parent | 538541e3002e7271fad21c0e5c21b65c0db90e45 (diff) |
Made debugging output controllable via environment variable
SAVAGE_DEBUG. Added fallback debugs. Added no_rast option to disable
hardware rasterization (everything as software fallback).
Diffstat (limited to 'src/mesa/drivers/dri/savage/savage_xmesa.c')
-rw-r--r-- | src/mesa/drivers/dri/savage/savage_xmesa.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c index 70827ea559..bcbc9d69ed 100644 --- a/src/mesa/drivers/dri/savage/savage_xmesa.c +++ b/src/mesa/drivers/dri/savage/savage_xmesa.c @@ -70,27 +70,25 @@ DRI_CONF_BEGIN DRI_CONF_SECTION_PERFORMANCE DRI_CONF_MAX_TEXTURE_UNITS(2,1,2) DRI_CONF_SECTION_END + DRI_CONF_SECTION_DEBUG + DRI_CONF_NO_RAST(false) + DRI_CONF_SECTION_END DRI_CONF_END; -static const GLuint __driNConfigOptions = 3; +static const GLuint __driNConfigOptions = 4; #ifdef USE_NEW_INTERFACE static PFNGLXCREATECONTEXTMODES create_context_modes = NULL; #endif /* USE_NEW_INTERFACE */ +static const struct dri_debug_control debug_control[] = +{ + { "fall", DEBUG_FALLBACKS }, + { "api", DEBUG_VERBOSE_API }, + { "lru", DEBUG_VERBOSE_LRU }, + { NULL, 0 } +}; #ifndef SAVAGE_DEBUG -int SAVAGE_DEBUG = (0 -/* | DEBUG_ALWAYS_SYNC */ -/* | DEBUG_VERBOSE_RING */ -/* | DEBUG_VERBOSE_OUTREG */ -/* | DEBUG_VERBOSE_MSG */ -/* | DEBUG_NO_OUTRING */ -/* | DEBUG_NO_OUTREG */ -/* | DEBUG_VERBOSE_API */ -/* | DEBUG_VERBOSE_2D */ -/* | DEBUG_VERBOSE_DRI */ -/* | DEBUG_VALIDATE_RING */ -/* | DEBUG_VERBOSE_IOCTL */ - ); +int SAVAGE_DEBUG = 0; #endif @@ -487,7 +485,12 @@ savageCreateContext( const __GLcontextModes *mesaVis, imesa->glCtx = ctx; if (savageDMAInit(imesa) == GL_FALSE) return GL_FALSE; - + +#ifndef SAVAGE_DEBUG + SAVAGE_DEBUG = driParseDebugString( getenv( "SAVAGE_DEBUG" ), + debug_control ); +#endif + driInitExtensions( ctx, card_extensions, GL_TRUE ); savageDDInitStateFuncs( ctx ); @@ -498,6 +501,9 @@ savageCreateContext( const __GLcontextModes *mesaVis, savageDDInitState( imesa ); + if (driQueryOptionb(&imesa->optionCache, "no_rast")) + FALLBACK(ctx, SAVAGE_FALLBACK_NORAST, GL_TRUE); + driContextPriv->driverPrivate = (void *) imesa; return GL_TRUE; |