summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-03-16 17:00:05 +1300
committerChris Forbes <[email protected]>2013-03-31 22:19:34 +1300
commitb15c558c855d24b3a3340766486dd4e08cd42542 (patch)
treec6e53b82011f62d72fb4e11beea84587ba5e13b8 /src/mesa/main/teximage.c
parent9cbfe98bfc6095b0d9e13c33440c687983218a76 (diff)
mesa: improve reported function name in Tex*Multisample
Now that there are 4 variants, just pass the function name into teximagemultisample rather than reconstructing it. Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 68e42a71f66..ccdb95a67d8 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -4196,7 +4196,7 @@ static void
teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
GLint internalformat, GLsizei width, GLsizei height,
GLsizei depth, GLboolean fixedsamplelocations,
- GLboolean immutable)
+ GLboolean immutable, const char *func)
{
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
@@ -4208,12 +4208,12 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
if (!(ctx->Extensions.ARB_texture_multisample
&& _mesa_is_desktop_gl(ctx))) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glTexImage%uDMultisample", dims);
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(unsupported)", func);
return;
}
if (!check_multisample_target(dims, target)) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage%uDMultisample(target)", dims);
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", func);
return;
}
@@ -4230,16 +4230,15 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
if (!is_renderable_texture_format(ctx, internalformat)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "glTexImage%uDMultisample(internalformat=%s)",
- dims,
- _mesa_lookup_enum_by_nr(internalformat));
+ "%s(internalformat=%s)",
+ func, _mesa_lookup_enum_by_nr(internalformat));
return;
}
sample_count_error = _mesa_check_sample_count(ctx, target,
internalformat, samples);
if (sample_count_error != GL_NO_ERROR) {
- _mesa_error(ctx, sample_count_error, "glTexImage%uDMultisample(samples)", dims);
+ _mesa_error(ctx, sample_count_error, "%s(samples)", func);
return;
}
@@ -4255,7 +4254,7 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
texImage = _mesa_get_tex_image(ctx, texObj, 0, 0);
if (texImage == NULL) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage%uDMultisample()", dims);
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s()", func);
return;
}
@@ -4285,20 +4284,19 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
else {
if (!dimensionsOK) {
_mesa_error(ctx, GL_INVALID_VALUE,
- "glTexImage%uDMultisample(invalid width or height)", dims);
+ "%s(invalid width or height)", func);
return;
}
if (!sizeOK) {
_mesa_error(ctx, GL_OUT_OF_MEMORY,
- "glTexImage%uDMultisample(texture too large)", dims);
+ "%s(texture too large)", func);
return;
}
/* Check if texObj->Immutable is set */
if (texObj->Immutable) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glTexImage%uDMultisample(immutable)",
- dims);
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(immutable)", func);
return;
}
@@ -4334,7 +4332,7 @@ _mesa_TexImage2DMultisample(GLenum target, GLsizei samples,
GLsizei height, GLboolean fixedsamplelocations)
{
teximagemultisample(2, target, samples, internalformat,
- width, height, 1, fixedsamplelocations, GL_FALSE);
+ width, height, 1, fixedsamplelocations, GL_FALSE, "glTexImage2DMultisample");
}
void GLAPIENTRY
@@ -4344,7 +4342,7 @@ _mesa_TexImage3DMultisample(GLenum target, GLsizei samples,
GLboolean fixedsamplelocations)
{
teximagemultisample(3, target, samples, internalformat,
- width, height, depth, fixedsamplelocations, GL_FALSE);
+ width, height, depth, fixedsamplelocations, GL_FALSE, "glTexImage3DMultisample");
}
@@ -4354,7 +4352,7 @@ _mesa_TexStorage2DMultisample(GLenum target, GLsizei samples,
GLsizei height, GLboolean fixedsamplelocations)
{
teximagemultisample(2, target, samples, internalformat,
- width, height, 1, fixedsamplelocations, GL_TRUE);
+ width, height, 1, fixedsamplelocations, GL_TRUE, "glTexStorage2DMultisample");
}
void GLAPIENTRY
@@ -4364,5 +4362,5 @@ _mesa_TexStorage3DMultisample(GLenum target, GLsizei samples,
GLboolean fixedsamplelocations)
{
teximagemultisample(3, target, samples, internalformat,
- width, height, depth, fixedsamplelocations, GL_TRUE);
+ width, height, depth, fixedsamplelocations, GL_TRUE, "glTexStorage3DMultisample");
}