From: Jordan Justen Date: Mon, 25 Feb 2013 21:56:20 +0000 (-0800) Subject: texobj: add verbose api trace messages to several routines X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c6ae10887e46ae59c6386118d88143728eb890cc;p=mesa.git texobj: add verbose api trace messages to several routines Motivated by wanting to see if GenTextures was called by an application while debugging another Steam overlay issue. Signed-off-by: Jordan Justen Reviewed-by: Matt Turner --- diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index e99b0dc388c..af5902f7366 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -960,6 +960,9 @@ _mesa_GenTextures( GLsizei n, GLuint *textures ) GLuint first; GLint i; + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glGenTextures %d\n", n); + if (n < 0) { _mesa_error( ctx, GL_INVALID_VALUE, "glGenTextures" ); return; @@ -1069,6 +1072,9 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures) GET_CURRENT_CONTEXT(ctx); GLint i; + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glDeleteTextures %d\n", n); + FLUSH_VERTICES(ctx, 0); /* too complex */ if (!textures) @@ -1290,6 +1296,9 @@ _mesa_PrioritizeTextures( GLsizei n, const GLuint *texName, GET_CURRENT_CONTEXT(ctx); GLint i; + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glPrioritizeTextures %d\n", n); + FLUSH_VERTICES(ctx, 0); if (n < 0) { @@ -1334,6 +1343,9 @@ _mesa_AreTexturesResident(GLsizei n, const GLuint *texName, GLint i; ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glAreTexturesResident %d\n", n); + if (n < 0) { _mesa_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident(n)"); return GL_FALSE; @@ -1379,6 +1391,9 @@ _mesa_IsTexture( GLuint texture ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glIsTexture %d\n", texture); + if (!texture) return GL_FALSE; @@ -1428,6 +1443,9 @@ _mesa_InvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, struct gl_texture_image *image; GET_CURRENT_CONTEXT(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glInvalidateTexSubImage %d\n", texture); + t = invalidate_tex_image_error_check(ctx, texture, level, "glInvalidateTexSubImage"); @@ -1566,6 +1584,9 @@ _mesa_InvalidateTexImage(GLuint texture, GLint level) { GET_CURRENT_CONTEXT(ctx); + if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) + _mesa_debug(ctx, "glInvalidateTexImage(%d, %d)\n", texture, level); + invalidate_tex_image_error_check(ctx, texture, level, "glInvalidateTexImage");