diff options
author | Maciej Cencora <m.cencora@gmail.com> | 2009-09-19 18:47:36 +0200 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-09-21 14:56:11 -0600 |
commit | d100cbf721010f4eacc87507cc87c5314150d493 (patch) | |
tree | e2a29324156435ff830c9c356d1fa2f07c5529a1 | |
parent | b1c9c5a800a485e3e066312f5736c93ef2774c9b (diff) |
mesa: add some debug info to teximage.c
-rw-r--r-- | src/mesa/main/teximage.c | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index b0aa04e9aa..b555624d88 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -36,6 +36,7 @@ #if FEATURE_convolve #include "convolve.h" #endif +#include "enums.h" #include "fbobject.h" #include "framebuffer.h" #include "hash.h" @@ -2148,6 +2149,13 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexImage1D %s %d %s %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), width, border, + _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + internalFormat = override_internal_format(internalFormat, width, 1); #if FEATURE_convolve @@ -2247,6 +2255,13 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexImage2D %s %d %s %d %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), width, height, + border, _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + internalFormat = override_internal_format(internalFormat, width, height); #if FEATURE_convolve @@ -2363,6 +2378,13 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexImage3D %s %d %s %d %d %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), width, height, + depth, border, _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + internalFormat = override_internal_format(internalFormat, width, height); if (target == GL_TEXTURE_3D || @@ -2472,6 +2494,12 @@ _mesa_TexSubImage1D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexSubImage1D %s %d %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + xoffset, width, _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + if (ctx->NewState & _MESA_NEW_TRANSFER_STATE) _mesa_update_state(ctx); @@ -2533,6 +2561,13 @@ _mesa_TexSubImage2D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexSubImage2D %s %d %d %d %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + xoffset, yoffset, width, height, + _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + if (ctx->NewState & _MESA_NEW_TRANSFER_STATE) _mesa_update_state(ctx); @@ -2594,6 +2629,13 @@ _mesa_TexSubImage3D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glTexSubImage3D %s %d %d %d %d %d %d %d %s %s %p\n", + _mesa_lookup_enum_by_nr(target), level, + xoffset, yoffset, zoffset, width, height, depth, + _mesa_lookup_enum_by_nr(format), + _mesa_lookup_enum_by_nr(type), pixels); + if (ctx->NewState & _MESA_NEW_TRANSFER_STATE) _mesa_update_state(ctx); @@ -2652,6 +2694,12 @@ _mesa_CopyTexImage1D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCopyTexImage1D %s %d %s %d %d %d %d\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), + x, y, width, border); + if (ctx->NewState & NEW_COPY_TEX_STATE) _mesa_update_state(ctx); @@ -2718,6 +2766,12 @@ _mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCopyTexImage2D %s %d %s %d %d %d %d %d\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), + x, y, width, height, border); + if (ctx->NewState & NEW_COPY_TEX_STATE) _mesa_update_state(ctx); @@ -2787,6 +2841,11 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCopyTexSubImage1D %s %d %d %d %d %d\n", + _mesa_lookup_enum_by_nr(target), + level, xoffset, x, y, width); + if (ctx->NewState & NEW_COPY_TEX_STATE) _mesa_update_state(ctx); @@ -2844,6 +2903,11 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCopyTexSubImage2D %s %d %d %d %d %d %d %d\n", + _mesa_lookup_enum_by_nr(target), + level, xoffset, yoffset, x, y, width, height); + if (ctx->NewState & NEW_COPY_TEX_STATE) _mesa_update_state(ctx); @@ -2904,6 +2968,11 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCopyTexSubImage3D %s %d %d %d %d %d %d %d %d\n", + _mesa_lookup_enum_by_nr(target), + level, xoffset, yoffset, zoffset, x, y, width, height); + if (ctx->NewState & NEW_COPY_TEX_STATE) _mesa_update_state(ctx); @@ -3155,6 +3224,12 @@ _mesa_CompressedTexImage1DARB(GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCompressedTexImage1DARB %s %d %s %d %d %d %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), + width, border, imageSize, data); + if (target == GL_TEXTURE_1D) { /* non-proxy target */ struct gl_texture_unit *texUnit; @@ -3250,6 +3325,12 @@ _mesa_CompressedTexImage2DARB(GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCompressedTexImage2DARB %s %d %s %d %d %d %d %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), + width, height, border, imageSize, data); + if (target == GL_TEXTURE_2D || (ctx->Extensions.ARB_texture_cube_map && target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && @@ -3350,6 +3431,12 @@ _mesa_CompressedTexImage3DARB(GLenum target, GLint level, GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glCompressedTexImage3DARB %s %d %s %d %d %d %d %d %p\n", + _mesa_lookup_enum_by_nr(target), level, + _mesa_lookup_enum_by_nr(internalFormat), + width, height, depth, border, imageSize, data); + if (target == GL_TEXTURE_3D) { /* non-proxy target */ struct gl_texture_unit *texUnit; |