From 93bcf7825d023d3d7108bc47a7a0929338bba6b9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 9 May 2012 12:09:21 -0600 Subject: mesa: add DEBUG_INCOMPLETE_TEXTURE, DEBUG_INCOMPLETE_FBO flags Instead of having to hack the code to enable these debugging options, set them through the MESA_DEBUG env var. Reviewed-by: Eric Anholt --- src/mesa/main/texobj.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/mesa/main/texobj.c') diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 155b255a721..365169dddc6 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -410,16 +410,17 @@ static void incomplete(struct gl_texture_object *t, enum base_mipmap bm, const char *fmt, ...) { -#if 0 - va_list args; - char s[100]; + if (MESA_DEBUG_FLAGS & DEBUG_INCOMPLETE_TEXTURE) { + va_list args; + char s[100]; - va_start(args, fmt); - vsnprintf(s, sizeof(s), fmt, args); - va_end(args); + va_start(args, fmt); + vsnprintf(s, sizeof(s), fmt, args); + va_end(args); + + _mesa_debug(NULL, "Texture Obj %d incomplete because: %s\n", t->Name, s); + } - printf("Texture Obj %d incomplete because: %s\n", t->Name, s); -#endif if (bm == BASE) t->_BaseComplete = GL_FALSE; t->_MipmapComplete = GL_FALSE; -- cgit v1.2.3