as other drivers.
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 )
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);
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;
tdfxStats stats;
- GLboolean debugFallbacks;
-
/* Configuration cache
*/
driOptionCache optionCache;
}
}
-#define DO_DEBUG 0
+#define DO_DEBUG 1
#if DO_DEBUG
extern int TDFX_DEBUG;
#else
#define DEBUG_ALWAYS_SYNC 0x01
#define DEBUG_VERBOSE_API 0x02
-#define DEBUG_VERBOSE_MSG 0x04
-#define DEBUG_VERBOSE_LRU 0x08
-#define DEBUG_VERBOSE_DRI 0x10
-#define DEBUG_VERBOSE_IOCTL 0x20
-#define DEBUG_VERBOSE_2D 0x40
+#define DEBUG_VERBOSE_DRI 0x04
+#define DEBUG_VERBOSE_FALL 0x08
/* conf */
#define FX_COMPRESS_S3TC_AS_FXT1_HACK 1
#endif
#ifndef TDFX_DEBUG
-int TDFX_DEBUG = (0
-/* | DEBUG_ALWAYS_SYNC */
-/* | DEBUG_VERBOSE_API */
-/* | DEBUG_VERBOSE_MSG */
-/* | DEBUG_VERBOSE_LRU */
-/* | DEBUG_VERBOSE_DRI */
-/* | DEBUG_VERBOSE_IOCTL */
-/* | DEBUG_VERBOSE_2D */
- );
+int TDFX_DEBUG = 0;
#endif
PUBLIC const char __driConfigOptions[] =
"Texture border",
"glColorMask",
"blend mode",
- "line stipple"
+ "line stipple",
"Rasterization disable"
};
FLUSH_BATCH(fxMesa);
_swsetup_Wakeup( ctx );
fxMesa->RenderIndex = ~0;
- if (fxMesa->debugFallbacks) {
+ if (TDFX_DEBUG & DEBUG_VERBOSE_FALL) {
fprintf(stderr, "Tdfx begin software fallback: 0x%x %s\n",
bit, getFallbackString(bit));
}
tnl->Driver.Render.BuildVertices = tdfxBuildVertices;
fxMesa->new_gl_state |= (_TDFX_NEW_RENDERSTATE|
_TDFX_NEW_RASTERSETUP);
- if (fxMesa->debugFallbacks) {
+ if (TDFX_DEBUG & DEBUG_VERBOSE_FALL) {
fprintf(stderr, "Tdfx end software fallback: 0x%x %s\n",
bit, getFallbackString(bit));
}