diff options
author | Brian Paul <[email protected]> | 2012-05-09 12:09:21 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-05-11 16:13:14 -0600 |
commit | 93bcf7825d023d3d7108bc47a7a0929338bba6b9 (patch) | |
tree | 3d9aee9b44907adcdf48dad0b8913032d1a06e35 /src/mesa/main/texobj.c | |
parent | 014306578be1f7aeb883e7b22eb255eda82fa011 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/mesa/main/texobj.c')
-rw-r--r-- | src/mesa/main/texobj.c | 17 |
1 files changed, 9 insertions, 8 deletions
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; |