Mesa (master): mesa: print enum names rather than hexadecimal values in error messages
Brian Paul
brianp at kemper.freedesktop.org
Thu Dec 3 16:40:38 UTC 2015
Module: Mesa
Branch: master
Commit: a0f1bc18e51566e62a0a0a314650b7aa8eb192e5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a0f1bc18e51566e62a0a0a314650b7aa8eb192e5
Author: Brian Paul <brianp at vmware.com>
Date: Thu Dec 3 09:40:38 2015 -0700
mesa: print enum names rather than hexadecimal values in error messages
Trivial.
---
src/mesa/main/teximage.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index d5fe034..60fc7cc 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2492,8 +2492,8 @@ copytexsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
if (!_mesa_source_buffer_exists(ctx, texImage->_BaseFormat)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(missing readbuffer, format=0x%x)", caller,
- texImage->_BaseFormat);
+ "%s(missing readbuffer, format=%s)", caller,
+ _mesa_enum_to_string(texImage->_BaseFormat));
return GL_TRUE;
}
@@ -4310,8 +4310,8 @@ compressed_subtexture_error_check(struct gl_context *ctx, GLint dims,
if (compressedteximage_only_format(ctx, format)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
- "%s(format=0x%x cannot be updated)",
- callerName, format);
+ "%s(format=%s cannot be updated)",
+ callerName, _mesa_enum_to_string(format));
return GL_TRUE;
}
@@ -4901,8 +4901,8 @@ _mesa_texture_buffer_range(struct gl_context *ctx,
format = _mesa_validate_texbuffer_format(ctx, internalFormat);
if (format == MESA_FORMAT_NONE) {
- _mesa_error(ctx, GL_INVALID_ENUM,
- "%s(internalFormat 0x%x)", caller, internalFormat);
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(internalFormat %s)",
+ caller, _mesa_enum_to_string(internalFormat));
return;
}
More information about the mesa-commit
mailing list