summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2013-02-25 13:56:20 -0800
committerJordan Justen <[email protected]>2013-02-27 23:02:12 -0800
commitc6ae10887e46ae59c6386118d88143728eb890cc (patch)
tree472773ed00f58d2fd3224100da15488d8de100ff /src/mesa/main
parentc8eb2d0e829d0d2aea6a982620da0d3cfb5982e2 (diff)
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 <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/texobj.c21
1 files changed, 21 insertions, 0 deletions
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");