From: Brian Paul Date: Tue, 26 Jun 2012 20:47:19 +0000 (-0600) Subject: mesa: look up enum name for glEnable/Disable errors X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dcf1dafa9ec93f9300ecffe5bddfd2b131bc218f;p=mesa.git mesa: look up enum name for glEnable/Disable errors --- diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c index d0b4625806f..c811f2a9c74 100644 --- a/src/mesa/main/enable.c +++ b/src/mesa/main/enable.c @@ -161,8 +161,8 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state) return; invalid_enum_error: - _mesa_error(ctx, GL_INVALID_ENUM, "gl%sClientState(0x%x)", - state ? "Enable" : "Disable", cap); + _mesa_error(ctx, GL_INVALID_ENUM, "gl%sClientState(%s)", + state ? "Enable" : "Disable", _mesa_lookup_enum_by_nr(cap)); } @@ -937,8 +937,8 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state) return; invalid_enum_error: - _mesa_error(ctx, GL_INVALID_ENUM, "gl%s(0x%x)", - state ? "Enable" : "Disable", cap); + _mesa_error(ctx, GL_INVALID_ENUM, "gl%s(%s)", + state ? "Enable" : "Disable", _mesa_lookup_enum_by_nr(cap)); } @@ -1441,6 +1441,7 @@ _mesa_IsEnabled( GLenum cap ) return GL_FALSE; invalid_enum_error: - _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(0x%x)", (int) cap); + _mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(%s)", + _mesa_lookup_enum_by_nr(cap)); return GL_FALSE; }