diff options
author | Brian Paul <[email protected]> | 2017-09-05 12:56:19 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-09-08 13:58:40 -0600 |
commit | 33c55e8a9d47261b345b6d307b072027d4986665 (patch) | |
tree | dbd7af62efc2c924cf5f86021f035bb00e38dbe9 /src/mesa | |
parent | 57d9222ef29e080e944f28fdeeef9ed226461e08 (diff) |
mesa: provide more info in some texture image error messages
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/teximage.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index e5dc469437f..32ca172d47c 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1133,7 +1133,8 @@ error_check_subtexture_dimensions(struct gl_context *ctx, GLuint dims, } if (xoffset + subWidth > (GLint) destImage->Width) { - _mesa_error(ctx, GL_INVALID_VALUE, "%s(xoffset+width)", func); + _mesa_error(ctx, GL_INVALID_VALUE, "%s(xoffset %d + width %d > %u)", func, + xoffset, subWidth, destImage->Width); return GL_TRUE; } @@ -1145,7 +1146,8 @@ error_check_subtexture_dimensions(struct gl_context *ctx, GLuint dims, return GL_TRUE; } if (yoffset + subHeight > (GLint) destImage->Height) { - _mesa_error(ctx, GL_INVALID_VALUE, "%s(yoffset+height)", func); + _mesa_error(ctx, GL_INVALID_VALUE, "%s(yoffset %d + height %d > %u)", + func, yoffset, subHeight, destImage->Height); return GL_TRUE; } } @@ -1166,7 +1168,8 @@ error_check_subtexture_dimensions(struct gl_context *ctx, GLuint dims, if (target == GL_TEXTURE_CUBE_MAP) depth = 6; if (zoffset + subDepth > depth) { - _mesa_error(ctx, GL_INVALID_VALUE, "%s(zoffset+depth)", func); + _mesa_error(ctx, GL_INVALID_VALUE, "%s(zoffset %d + depth %d > %u)", + func, zoffset, subDepth, depth); return GL_TRUE; } } @@ -2151,8 +2154,8 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions, texImage = _mesa_select_tex_image(texObj, target, level); if (!texImage) { /* non-existant texture level */ - _mesa_error(ctx, GL_INVALID_OPERATION, "%s(invalid texture image)", - callerName); + _mesa_error(ctx, GL_INVALID_OPERATION, "%s(invalid texture level %d)", + callerName, level); return GL_TRUE; } @@ -2533,7 +2536,7 @@ copytexsubimage_error_check(struct gl_context *ctx, GLuint dimensions, if (!texImage) { /* destination image does not exist */ _mesa_error(ctx, GL_INVALID_OPERATION, - "%s(invalid texture image)", caller); + "%s(invalid texture level %d)", caller, level); return GL_TRUE; } @@ -4764,9 +4767,8 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dims, texImage = _mesa_select_tex_image(texObj, target, level); if (!texImage) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "%s(invalid texture image)", - callerName); + _mesa_error(ctx, GL_INVALID_OPERATION, "%s(invalid texture level %d)", + callerName, level); return GL_TRUE; } |