summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>2017-06-21 09:54:49 +0200
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>2017-06-22 10:41:17 +0200
commit1f38363e687b154a43819034a95e5a6c4ff65707 (patch)
treeb6839c7661ecb3906f7c1a236419e7e6b6a985c8
parent8a7ab8d418fc0747612a0f2111c80445219b99ed (diff)
mesa: pass the 'caller' function to texturestorage() helper
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
-rw-r--r--src/mesa/main/texstorage.c23
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");
}