diff options
-rw-r--r-- | src/mesa/main/texstorage.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c index 817a7464d9f..070d62eb834 100644 --- a/src/mesa/main/texstorage.c +++ b/src/mesa/main/texstorage.c @@ -520,21 +520,21 @@ texstorage(GLuint dims, GLenum target, GLsizei levels, GLenum internalformat, static void texturestorage(GLuint dims, GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, - GLsizei depth) + GLsizei depth, const char *caller) { struct gl_texture_object *texObj; GET_CURRENT_CONTEXT(ctx); if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glTextureStorage%uD %d %d %s %d %d %d\n", - dims, texture, levels, + _mesa_debug(ctx, "%s %d %d %s %d %d %d\n", + caller, texture, levels, _mesa_enum_to_string(internalformat), width, height, depth); /* Check the format to make sure it is sized. */ if (!_mesa_is_legal_tex_storage_format(ctx, internalformat)) { _mesa_error(ctx, GL_INVALID_ENUM, - "glTextureStorage%uD(internalformat = %s)", dims, + "%s(internalformat = %s)", caller, _mesa_enum_to_string(internalformat)); return; } @@ -543,7 +543,7 @@ texturestorage(GLuint dims, GLuint texture, GLsizei levels, texObj = _mesa_lookup_texture(ctx, texture); if (!texObj) { _mesa_error(ctx, GL_INVALID_OPERATION, - "glTextureStorage%uD(texture = %d)", dims, texture); + "%s(texture = %d)", caller, texture); return; } @@ -552,8 +552,8 @@ texturestorage(GLuint dims, GLuint texture, GLsizei levels, */ if (!legal_texobj_target(ctx, dims, texObj->Target)) { _mesa_error(ctx, GL_INVALID_ENUM, - "glTextureStorage%uD(illegal target=%s)", - dims, _mesa_enum_to_string(texObj->Target)); + "%s(illegal target=%s)", caller, + _mesa_enum_to_string(texObj->Target)); return; } @@ -590,7 +590,8 @@ void GLAPIENTRY _mesa_TextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width) { - texturestorage(1, texture, levels, internalformat, width, 1, 1); + texturestorage(1, texture, levels, internalformat, width, 1, 1, + "glTextureStorage1D"); } @@ -599,7 +600,8 @@ _mesa_TextureStorage2D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { - texturestorage(2, texture, levels, internalformat, width, height, 1); + texturestorage(2, texture, levels, internalformat, width, height, 1, + "glTextureStorage2D"); } @@ -607,7 +609,8 @@ void GLAPIENTRY _mesa_TextureStorage3D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { - texturestorage(3, texture, levels, internalformat, width, height, depth); + texturestorage(3, texture, levels, internalformat, width, height, depth, + "glTextureStorage3D"); } |