From: Samuel Pitoiset Date: Thu, 20 Jul 2017 09:52:56 +0000 (+0200) Subject: mesa: pass the 'caller' function to texstorage() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f95420d74effae98f02d56cb680556f96b82059f;p=mesa.git mesa: pass the 'caller' function to texstorage() To be consistent with texturestorage(). Signed-off-by: Samuel Pitoiset Reviewed-by: Timothy Arceri --- diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c index 7519ca2807a..99a169e5ff9 100644 --- a/src/mesa/main/texstorage.c +++ b/src/mesa/main/texstorage.c @@ -475,7 +475,7 @@ texture_storage(struct gl_context *ctx, GLuint dims, */ static void texstorage(GLuint dims, GLenum target, GLsizei levels, GLenum internalformat, - GLsizei width, GLsizei height, GLsizei depth) + GLsizei width, GLsizei height, GLsizei depth, const char *caller) { struct gl_texture_object *texObj; GET_CURRENT_CONTEXT(ctx); @@ -485,14 +485,13 @@ texstorage(GLuint dims, GLenum target, GLsizei levels, GLenum internalformat, */ if (!legal_texobj_target(ctx, dims, target)) { _mesa_error(ctx, GL_INVALID_ENUM, - "glTexStorage%uD(illegal target=%s)", - dims, _mesa_enum_to_string(target)); + "%s(illegal target=%s)", + caller, _mesa_enum_to_string(target)); return; } if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glTexStorage%uD %s %d %s %d %d %d\n", - dims, + _mesa_debug(ctx, "%s %s %d %s %d %d %d\n", caller, _mesa_enum_to_string(target), levels, _mesa_enum_to_string(internalformat), width, height, depth); @@ -500,7 +499,7 @@ texstorage(GLuint dims, GLenum target, GLsizei levels, GLenum internalformat, /* Check the format to make sure it is sized. */ if (!_mesa_is_legal_tex_storage_format(ctx, internalformat)) { _mesa_error(ctx, GL_INVALID_ENUM, - "glTexStorage%uD(internalformat = %s)", dims, + "%s(internalformat = %s)", caller, _mesa_enum_to_string(internalformat)); return; } @@ -562,7 +561,8 @@ void GLAPIENTRY _mesa_TexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) { - texstorage(1, target, levels, internalformat, width, 1, 1); + texstorage(1, target, levels, internalformat, width, 1, 1, + "glTexStorage1D"); } @@ -570,7 +570,8 @@ void GLAPIENTRY _mesa_TexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { - texstorage(2, target, levels, internalformat, width, height, 1); + texstorage(2, target, levels, internalformat, width, height, 1, + "glTexStorage2D"); } @@ -578,7 +579,8 @@ void GLAPIENTRY _mesa_TexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { - texstorage(3, target, levels, internalformat, width, height, depth); + texstorage(3, target, levels, internalformat, width, height, depth, + "glTexStorage3D"); }