aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-10-08 14:45:28 -0600
committerBrian Paul <[email protected]>2015-10-13 08:28:22 -0600
commitc73c481c4a8fbe454cfd6a0014d25beb175c0a7f (patch)
tree48d43508be86682bcf1c68248956f5d2331b5aa7 /src/mesa
parent6a506689db287ea41b3374bd3174a5da78b56d16 (diff)
mesa: pass caller name to create_textures()
Simpler than the dsa flag approach.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texobj.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 60c55aeb206..b571b1b2ff6 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -1205,17 +1205,16 @@ invalidate_tex_image_error_check(struct gl_context *ctx, GLuint texture,
*/
static void
create_textures(struct gl_context *ctx, GLenum target,
- GLsizei n, GLuint *textures, bool dsa)
+ GLsizei n, GLuint *textures, const char *caller)
{
GLuint first;
GLint i;
- const char *func = dsa ? "Create" : "Gen";
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
- _mesa_debug(ctx, "gl%sTextures %d\n", func, n);
+ _mesa_debug(ctx, "%s %d\n", caller, n);
if (n < 0) {
- _mesa_error( ctx, GL_INVALID_VALUE, "gl%sTextures(n < 0)", func );
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(n < 0)", caller);
return;
}
@@ -1236,7 +1235,7 @@ create_textures(struct gl_context *ctx, GLenum target,
texObj = ctx->Driver.NewTextureObject(ctx, name, target);
if (!texObj) {
mtx_unlock(&ctx->Shared->Mutex);
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "gl%sTextures", func);
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "gl%sTextures", caller);
return;
}
@@ -1273,7 +1272,7 @@ void GLAPIENTRY
_mesa_GenTextures(GLsizei n, GLuint *textures)
{
GET_CURRENT_CONTEXT(ctx);
- create_textures(ctx, 0, n, textures, false);
+ create_textures(ctx, 0, n, textures, "glGenTextures");
}
/**
@@ -1306,7 +1305,7 @@ _mesa_CreateTextures(GLenum target, GLsizei n, GLuint *textures)
return;
}
- create_textures(ctx, target, n, textures, true);
+ create_textures(ctx, target, n, textures, "glCreateTextures");
}
/**