<div dir="ltr">Oh god damned, something messed up and I've sent the patch with the wrong subject. Just ignore this email...<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 5, 2013 at 11:21 PM, Arnas Milasevicius <span dir="ltr"><<a href="mailto:giant1gf@gmail.com" target="_blank">giant1gf@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> v3: improved commit message<br>
<br>
---<br>
src/mapi/glapi/gen/gl_enums.py | 6 +-<br>
src/mesa/drivers/common/meta.c | 2 +-<br>
src/mesa/drivers/dri/i915/i830_state.c | 20 +++----<br>
src/mesa/drivers/dri/i915/intel_render.c | 2 +-<br>
src/mesa/drivers/dri/i915/intel_tris.c | 4 +-<br>
src/mesa/drivers/dri/i965/brw_draw.c | 10 ++--<br>
src/mesa/drivers/dri/i965/brw_draw_upload.c | 2 +-<br>
src/mesa/drivers/dri/i965/gen6_cc.c | 4 +-<br>
src/mesa/drivers/dri/intel/intel_fbo.c | 2 +-<br>
src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 2 +-<br>
src/mesa/drivers/dri/intel/intel_tex_image.c | 2 +-<br>
src/mesa/drivers/dri/intel/intel_tex_subimage.c | 2 +-<br>
src/mesa/drivers/dri/r200/r200_state.c | 2 +-<br>
src/mesa/drivers/dri/r200/r200_tex.c | 20 +++----<br>
src/mesa/drivers/dri/radeon/radeon_common.c | 2 +-<br>
src/mesa/drivers/dri/radeon/radeon_fbo.c | 2 +-<br>
src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c | 2 +-<br>
src/mesa/drivers/dri/radeon/radeon_pixel_read.c | 2 +-<br>
src/mesa/drivers/dri/radeon/radeon_state.c | 2 +-<br>
src/mesa/drivers/dri/radeon/radeon_swtcl.c | 2 +-<br>
src/mesa/drivers/dri/radeon/radeon_tex.c | 6 +-<br>
src/mesa/drivers/dri/radeon/radeon_texture.c | 4 +-<br>
src/mesa/main/atifragshader.c | 30 +++++-----<br>
src/mesa/main/attrib.c | 2 +-<br>
src/mesa/main/blend.c | 34 ++++++------<br>
src/mesa/main/bufferobj.c | 10 ++--<br>
src/mesa/main/buffers.c | 6 +-<br>
src/mesa/main/clear.c | 8 +--<br>
src/mesa/main/condrender.c | 4 +-<br>
src/mesa/main/debug.c | 2 +-<br>
src/mesa/main/depth.c | 2 +-<br>
src/mesa/main/dlist.c | 14 ++---<br>
src/mesa/main/api_validate.c | 6 +-<br>
src/mesa/main/drawpix.c | 18 +++---<br>
src/mesa/main/enable.c | 12 ++--<br>
src/mesa/main/enums.h | 6 +-<br>
src/mesa/main/errors.c | 4 +-<br>
src/mesa/main/fbobject.c | 30 +++++-----<br>
src/mesa/main/formatquery.c | 8 +--<br>
src/mesa/main/framebuffer.c | 2 +-<br>
src/mesa/main/get.c | 8 +--<br>
src/mesa/main/getstring.c | 4 +-<br>
src/mesa/main/hint.c | 4 +-<br>
src/mesa/main/light.c | 6 +-<br>
src/mesa/main/matrix.c | 8 +--<br>
src/mesa/main/pack.c | 10 ++--<br>
src/mesa/main/pack_tmp.h | 2 +-<br>
src/mesa/main/polygon.c | 8 +--<br>
src/mesa/main/queryobj.c | 26 ++++-----<br>
src/mesa/main/readpix.c | 12 ++--<br>
src/mesa/main/samplerobj.c | 20 +++----<br>
src/mesa/main/shaderapi.c | 12 ++--<br>
src/mesa/main/tests/enum_strings.cpp | 8 +--<br>
src/mesa/main/texenv.c | 10 ++--<br>
src/mesa/main/texformat.c | 2 +-<br>
src/mesa/main/texgen.c | 6 +-<br>
src/mesa/main/teximage.c | 70 ++++++++++++------------<br>
src/mesa/main/texobj.c | 2 +-<br>
src/mesa/main/texparam.c | 14 ++---<br>
src/mesa/main/texstate.c | 36 ++++++------<br>
src/mesa/main/texstorage.c | 4 +-<br>
src/mesa/main/texstore.c | 4 +-<br>
src/mesa/main/uniforms.c | 2 +-<br>
src/mesa/main/varray.c | 2 +-<br>
src/mesa/tnl/t_draw.c | 2 +-<br>
src/mesa/tnl/t_vb_render.c | 2 +-<br>
src/mesa/tnl/t_vertex_sse.c | 2 +-<br>
src/mesa/tnl_dd/t_dd_dmatmp.h | 2 +-<br>
src/mesa/tnl_dd/t_dd_unfilled.h | 2 +-<br>
src/mesa/vbo/vbo_exec_array.c | 46 ++++++++--------<br>
src/mesa/vbo/vbo_exec_draw.c | 2 +-<br>
src/mesa/vbo/vbo_save_api.c | 2 +-<br>
src/mesa/vbo/vbo_save_loopback.c | 2 +-<br>
73 files changed, 321 insertions(+), 321 deletions(-)<br>
<br>
diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py<br>
index 806d384..6a9acc7 100644<br>
--- a/src/mapi/glapi/gen/gl_enums.py<br>
+++ b/src/mapi/glapi/gen/gl_enums.py<br>
@@ -91,7 +91,7 @@ static int compar_nr( const int *a, const unsigned *b )<br>
<br>
static char token_tmp[20];<br>
<br>
-const char *_mesa_lookup_enum_by_nr( int nr )<br>
+const char *_mesa_enum_string( int nr )<br>
{<br>
unsigned * i;<br>
<br>
@@ -138,7 +138,7 @@ static const char *prim_names[PRIM_MAX+3] = {<br>
* GL_FALSE/GL_POINTS ambiguity and others.<br>
*/<br>
const char *<br>
-_mesa_lookup_prim_by_nr(GLuint nr)<br>
+_mesa_prim_string(GLuint nr)<br>
{<br>
if (nr < Elements(prim_names))<br>
return prim_names[nr];<br>
@@ -147,7 +147,7 @@ _mesa_lookup_prim_by_nr(GLuint nr)<br>
}<br>
<br>
<br>
-int _mesa_lookup_enum_by_name( const char *symbol )<br>
+int _mesa_enum_value( const char *symbol )<br>
{<br>
enum_elt * f = NULL;<br>
<br>
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c<br>
index 373e8f5..c0d6194 100644<br>
--- a/src/mesa/drivers/common/meta.c<br>
+++ b/src/mesa/drivers/common/meta.c<br>
@@ -3059,7 +3059,7 @@ _mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target,<br>
target == GL_TEXTURE_2D_ARRAY) {<br>
_mesa_perf_debug(ctx, MESA_DEBUG_SEVERITY_HIGH,<br>
"glGenerateMipmap() to %s target\n",<br>
- _mesa_lookup_enum_by_nr(target));<br>
+ _mesa_enum_string(target));<br>
return GL_TRUE;<br>
}<br>
<br>
diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c<br>
index cedc58a..df19969 100644<br>
--- a/src/mesa/drivers/dri/i915/i830_state.c<br>
+++ b/src/mesa/drivers/dri/i915/i830_state.c<br>
@@ -57,7 +57,7 @@ i830StencilFuncSeparate(struct gl_context * ctx, GLenum face, GLenum func, GLint<br>
mask = mask & 0xff;<br>
<br>
DBG("%s : func: %s, ref : 0x%x, mask: 0x%x\n", __FUNCTION__,<br>
- _mesa_lookup_enum_by_nr(func), ref, mask);<br>
+ _mesa_enum_string(func), ref, mask);<br>
<br>
<br>
I830_STATECHANGE(i830, I830_UPLOAD_CTX);<br>
@@ -95,9 +95,9 @@ i830StencilOpSeparate(struct gl_context * ctx, GLenum face, GLenum fail, GLenum<br>
int fop, dfop, dpop;<br>
<br>
DBG("%s: fail : %s, zfail: %s, zpass : %s\n", __FUNCTION__,<br>
- _mesa_lookup_enum_by_nr(fail),<br>
- _mesa_lookup_enum_by_nr(zfail),<br>
- _mesa_lookup_enum_by_nr(zpass));<br>
+ _mesa_enum_string(fail),<br>
+ _mesa_enum_string(zfail),<br>
+ _mesa_enum_string(zpass));<br>
<br>
fop = 0;<br>
dfop = 0;<br>
@@ -389,8 +389,8 @@ static void<br>
i830BlendEquationSeparate(struct gl_context * ctx, GLenum modeRGB, GLenum modeA)<br>
{<br>
DBG("%s -> %s, %s\n", __FUNCTION__,<br>
- _mesa_lookup_enum_by_nr(modeRGB),<br>
- _mesa_lookup_enum_by_nr(modeA));<br>
+ _mesa_enum_string(modeRGB),<br>
+ _mesa_enum_string(modeA));<br>
<br>
(void) modeRGB;<br>
(void) modeA;<br>
@@ -403,10 +403,10 @@ i830BlendFuncSeparate(struct gl_context * ctx, GLenum sfactorRGB,<br>
GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA)<br>
{<br>
DBG("%s -> RGB(%s, %s) A(%s, %s)\n", __FUNCTION__,<br>
- _mesa_lookup_enum_by_nr(sfactorRGB),<br>
- _mesa_lookup_enum_by_nr(dfactorRGB),<br>
- _mesa_lookup_enum_by_nr(sfactorA),<br>
- _mesa_lookup_enum_by_nr(dfactorA));<br>
+ _mesa_enum_string(sfactorRGB),<br>
+ _mesa_enum_string(dfactorRGB),<br>
+ _mesa_enum_string(sfactorA),<br>
+ _mesa_enum_string(dfactorA));<br>
<br>
(void) sfactorRGB;<br>
(void) dfactorRGB;<br>
diff --git a/src/mesa/drivers/dri/i915/intel_render.c b/src/mesa/drivers/dri/i915/intel_render.c<br>
index 6afd738..6767076 100644<br>
--- a/src/mesa/drivers/dri/i915/intel_render.c<br>
+++ b/src/mesa/drivers/dri/i915/intel_render.c<br>
@@ -113,7 +113,7 @@ static void<br>
intelDmaPrimitive(struct intel_context *intel, GLenum prim)<br>
{<br>
if (0)<br>
- fprintf(stderr, "%s %s\n", __FUNCTION__, _mesa_lookup_enum_by_nr(prim));<br>
+ fprintf(stderr, "%s %s\n", __FUNCTION__, _mesa_enum_string(prim));<br>
INTEL_FIREVERTICES(intel);<br>
intel->vtbl.reduced_primitive_state(intel, reduced_prim[prim]);<br>
intel_set_prim(intel, hw_prim[prim]);<br>
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c<br>
index 7c60d84..41c7451 100644<br>
--- a/src/mesa/drivers/dri/i915/intel_tris.c<br>
+++ b/src/mesa/drivers/dri/i915/intel_tris.c<br>
@@ -1136,7 +1136,7 @@ intelRasterPrimitive(struct gl_context * ctx, GLenum rprim, GLuint hwprim)<br>
<br>
if (0)<br>
fprintf(stderr, "%s %s %x\n", __FUNCTION__,<br>
- _mesa_lookup_enum_by_nr(rprim), hwprim);<br>
+ _mesa_enum_string(rprim), hwprim);<br>
<br>
intel->vtbl.reduced_primitive_state(intel, rprim);<br>
<br>
@@ -1160,7 +1160,7 @@ intelRenderPrimitive(struct gl_context * ctx, GLenum prim)<br>
ctx->Polygon.BackMode != GL_FILL);<br>
<br>
if (0)<br>
- fprintf(stderr, "%s %s\n", __FUNCTION__, _mesa_lookup_enum_by_nr(prim));<br>
+ fprintf(stderr, "%s %s\n", __FUNCTION__, _mesa_enum_string(prim));<br>
<br>
/* Let some clipping routines know which primitive they're dealing<br>
* with.<br>
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c<br>
index 657d6ee..3295367 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_draw.c<br>
+++ b/src/mesa/drivers/dri/i965/brw_draw.c<br>
@@ -92,7 +92,7 @@ static void brw_set_prim(struct brw_context *brw,<br>
struct gl_context *ctx = &brw->intel.ctx;<br>
uint32_t hw_prim = prim_to_hw_prim[prim->mode];<br>
<br>
- DBG("PRIM: %s\n", _mesa_lookup_enum_by_nr(prim->mode));<br>
+ DBG("PRIM: %s\n", _mesa_enum_string(prim->mode));<br>
<br>
/* Slight optimization to avoid the GS program when not needed:<br>
*/<br>
@@ -125,7 +125,7 @@ static void gen6_set_prim(struct brw_context *brw,<br>
{<br>
uint32_t hw_prim;<br>
<br>
- DBG("PRIM: %s\n", _mesa_lookup_enum_by_nr(prim->mode));<br>
+ DBG("PRIM: %s\n", _mesa_enum_string(prim->mode));<br>
<br>
hw_prim = prim_to_hw_prim[prim->mode];<br>
<br>
@@ -165,7 +165,7 @@ static void brw_emit_prim(struct brw_context *brw,<br>
int start_vertex_location;<br>
int base_vertex_location;<br>
<br>
- DBG("PRIM: %s %d %d\n", _mesa_lookup_enum_by_nr(prim->mode),<br>
+ DBG("PRIM: %s %d %d\n", _mesa_enum_string(prim->mode),<br>
prim->start, prim->count);<br>
<br>
start_vertex_location = prim->start;<br>
@@ -226,7 +226,7 @@ static void gen7_emit_prim(struct brw_context *brw,<br>
int start_vertex_location;<br>
int base_vertex_location;<br>
<br>
- DBG("PRIM: %s %d %d\n", _mesa_lookup_enum_by_nr(prim->mode),<br>
+ DBG("PRIM: %s %d %d\n", _mesa_enum_string(prim->mode),<br>
prim->start, prim->count);<br>
<br>
start_vertex_location = prim->start;<br>
@@ -517,7 +517,7 @@ void brw_draw_prims( struct gl_context *ctx,<br>
*/<br>
if (ctx->RenderMode != GL_RENDER) {<br>
perf_debug("%s render mode not supported in hardware\n",<br>
- _mesa_lookup_enum_by_nr(ctx->RenderMode));<br>
+ _mesa_enum_string(ctx->RenderMode));<br>
_swsetup_Wakeup(ctx);<br>
_tnl_wakeup(ctx);<br>
_tnl_draw_prims(ctx, arrays, prim, nr_prims, ib, min_index, max_index);<br>
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c<br>
index 2ded14b..304cfd5 100644<br>
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c<br>
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c<br>
@@ -230,7 +230,7 @@ get_surface_type(struct intel_context *intel,<br>
<br>
if (unlikely(INTEL_DEBUG & DEBUG_VERTS))<br>
printf("type %s size %d normalized %d\n",<br>
- _mesa_lookup_enum_by_nr(glarray->Type),<br>
+ _mesa_enum_string(glarray->Type),<br>
glarray->Size, glarray->Normalized);<br>
<br>
if (glarray->Integer) {<br>
diff --git a/src/mesa/drivers/dri/i965/gen6_cc.c b/src/mesa/drivers/dri/i965/gen6_cc.c<br>
index e4ec170..245a3a3 100644<br>
--- a/src/mesa/drivers/dri/i965/gen6_cc.c<br>
+++ b/src/mesa/drivers/dri/i965/gen6_cc.c<br>
@@ -97,8 +97,8 @@ gen6_upload_blend_state(struct brw_context *brw)<br>
rb_type != GL_UNSIGNED_NORMALIZED &&<br>
rb_type != GL_FLOAT, "Ignoring %s logic op on %s "<br>
"renderbuffer\n",<br>
- _mesa_lookup_enum_by_nr(ctx->Color.LogicOp),<br>
- _mesa_lookup_enum_by_nr(rb_type));<br>
+ _mesa_enum_string(ctx->Color.LogicOp),<br>
+ _mesa_enum_string(rb_type));<br>
if (rb_type == GL_UNSIGNED_NORMALIZED) {<br>
blend[b].blend1.logic_op_enable = 1;<br>
blend[b].blend1.logic_op_func =<br>
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c<br>
index 9f892a9..b61a8df 100644<br>
--- a/src/mesa/drivers/dri/intel/intel_fbo.c<br>
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c<br>
@@ -248,7 +248,7 @@ intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer<br>
intel_miptree_release(&irb->mt);<br>
<br>
DBG("%s: %s: %s (%dx%d)\n", __FUNCTION__,<br>
- _mesa_lookup_enum_by_nr(internalFormat),<br>
+ _mesa_enum_string(internalFormat),<br>
_mesa_get_format_name(rb->Format), width, height);<br>
<br>
if (width == 0 || height == 0)<br>
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c<br>
index c336c46..0b5e831 100644<br>
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c<br>
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c<br>
@@ -143,7 +143,7 @@ intel_miptree_create_layout(struct intel_context *intel,<br>
struct intel_mipmap_tree *mt = calloc(sizeof(*mt), 1);<br>
<br>
DBG("%s target %s format %s level %d..%d <-- %p\n", __FUNCTION__,<br>
- _mesa_lookup_enum_by_nr(target),<br>
+ _mesa_enum_string(target),<br>
_mesa_get_format_name(format),<br>
first_level, last_level, mt);<br>
<br>
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c<br>
index fba02c2..e8b5935 100644<br>
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c<br>
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c<br>
@@ -196,7 +196,7 @@ intelTexImage(struct gl_context * ctx,<br>
bool ok;<br>
<br>
DBG("%s target %s level %d %dx%dx%d\n", __FUNCTION__,<br>
- _mesa_lookup_enum_by_nr(texImage->TexObject->Target),<br>
+ _mesa_enum_string(texImage->TexObject->Target),<br>
texImage->Level, texImage->Width, texImage->Height, texImage->Depth);<br>
<br>
ok = intel_texsubimage_tiled_memcpy(ctx, dims, texImage,<br>
diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/mesa/drivers/dri/intel/intel_tex_subimage.c<br>
index bd178bb..de2beeb 100644<br>
--- a/src/mesa/drivers/dri/intel/intel_tex_subimage.c<br>
+++ b/src/mesa/drivers/dri/intel/intel_tex_subimage.c<br>
@@ -78,7 +78,7 @@ intel_blit_texsubimage(struct gl_context * ctx,<br>
<br>
DBG("BLT subimage %s target %s level %d offset %d,%d %dx%d\n",<br>
__FUNCTION__,<br>
- _mesa_lookup_enum_by_nr(texImage->TexObject->Target),<br>
+ _mesa_enum_string(texImage->TexObject->Target),<br>
texImage->Level, xoffset, yoffset, width, height);<br>
<br>
pixels = _mesa_validate_pbo_teximage(ctx, 2, width, height, 1,<br>
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c<br>
index d3e8114..0674a13 100644<br>
--- a/src/mesa/drivers/dri/r200/r200_state.c<br>
+++ b/src/mesa/drivers/dri/r200/r200_state.c<br>
@@ -1722,7 +1722,7 @@ static void r200Enable( struct gl_context *ctx, GLenum cap, GLboolean state )<br>
<br>
if ( R200_DEBUG & RADEON_STATE )<br>
fprintf( stderr, "%s( %s = %s )\n", __FUNCTION__,<br>
- _mesa_lookup_enum_by_nr( cap ),<br>
+ _mesa_enum_string( cap ),<br>
state ? "GL_TRUE" : "GL_FALSE" );<br>
<br>
switch ( cap ) {<br>
diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c<br>
index 31a65c8..39314d6 100644<br>
--- a/src/mesa/drivers/dri/r200/r200_tex.c<br>
+++ b/src/mesa/drivers/dri/r200/r200_tex.c<br>
@@ -68,9 +68,9 @@ static void r200SetTexWrap( radeonTexObjPtr t, GLenum swrap, GLenum twrap, GLenu<br>
radeon_print(RADEON_TEXTURE, RADEON_TRACE,<br>
"%s(tex %p) sw %s, tw %s, rw %s\n",<br>
__func__, t,<br>
- _mesa_lookup_enum_by_nr(swrap),<br>
- _mesa_lookup_enum_by_nr(twrap),<br>
- _mesa_lookup_enum_by_nr(rwrap));<br>
+ _mesa_enum_string(swrap),<br>
+ _mesa_enum_string(twrap),<br>
+ _mesa_enum_string(rwrap));<br>
<br>
t->pp_txfilter &= ~(R200_CLAMP_S_MASK | R200_CLAMP_T_MASK | R200_BORDER_MODE_D3D);<br>
<br>
@@ -225,8 +225,8 @@ static void r200SetTexFilter( radeonTexObjPtr t, GLenum minf, GLenum magf )<br>
radeon_print(RADEON_TEXTURE, RADEON_TRACE,<br>
"%s(tex %p) minf %s, maxf %s, anisotropy %d.\n",<br>
__func__, t,<br>
- _mesa_lookup_enum_by_nr(minf),<br>
- _mesa_lookup_enum_by_nr(magf),<br>
+ _mesa_enum_string(minf),<br>
+ _mesa_enum_string(magf),<br>
anisotropy);<br>
<br>
if ( anisotropy == R200_MAX_ANISO_1_TO_1 ) {<br>
@@ -302,7 +302,7 @@ static void r200TexEnv( struct gl_context *ctx, GLenum target,<br>
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];<br>
<br>
radeon_print(RADEON_TEXTURE | RADEON_STATE, RADEON_VERBOSE, "%s( %s )\n",<br>
- __FUNCTION__, _mesa_lookup_enum_by_nr( pname ) );<br>
+ __FUNCTION__, _mesa_enum_string( pname ) );<br>
<br>
/* This is incorrect: Need to maintain this data for each of<br>
* GL_TEXTURE_{123}D, GL_TEXTURE_RECTANGLE_NV, etc, and switch<br>
@@ -384,8 +384,8 @@ static void r200TexParameter( struct gl_context *ctx, GLenum target,<br>
radeon_print(RADEON_TEXTURE | RADEON_STATE, RADEON_VERBOSE,<br>
"%s(%p, tex %p) target %s, pname %s\n",<br>
__FUNCTION__, ctx, texObj,<br>
- _mesa_lookup_enum_by_nr( target ),<br>
- _mesa_lookup_enum_by_nr( pname ) );<br>
+ _mesa_enum_string( target ),<br>
+ _mesa_enum_string( pname ) );<br>
<br>
switch ( pname ) {<br>
case GL_TEXTURE_MIN_FILTER:<br>
@@ -416,7 +416,7 @@ static void r200DeleteTexture(struct gl_context * ctx, struct gl_texture_object<br>
radeon_print(RADEON_TEXTURE | RADEON_STATE, RADEON_NORMAL,<br>
"%s( %p (target = %s) )\n", __FUNCTION__,<br>
(void *)texObj,<br>
- _mesa_lookup_enum_by_nr(texObj->Target));<br>
+ _mesa_enum_string(texObj->Target));<br>
<br>
if (rmesa) {<br>
int i;<br>
@@ -474,7 +474,7 @@ static struct gl_texture_object *r200NewTextureObject(struct gl_context * ctx,<br>
radeon_print(RADEON_STATE | RADEON_TEXTURE, RADEON_NORMAL,<br>
"%s(%p) target %s, new texture %p.\n",<br>
__FUNCTION__, ctx,<br>
- _mesa_lookup_enum_by_nr(target), t);<br>
+ _mesa_enum_string(target), t);<br>
<br>
_mesa_initialize_texture_object(&t->base, name, target);<br>
t->base.Sampler.MaxAnisotropy = rmesa->radeon.initialMaxAnisotropy;<br>
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c<br>
index 0cf656b..8d6d92b 100644<br>
--- a/src/mesa/drivers/dri/radeon/radeon_common.c<br>
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c<br>
@@ -356,7 +356,7 @@ void radeonDrawBuffer( struct gl_context *ctx, GLenum mode )<br>
{<br>
if (RADEON_DEBUG & RADEON_DRI)<br>
fprintf(stderr, "%s %s\n", __FUNCTION__,<br>
- _mesa_lookup_enum_by_nr( mode ));<br>
+ _mesa_enum_string( mode ));<br>
<br>
if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {<br>
radeonContextPtr radeon = RADEON_CONTEXT(ctx);<br>
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c<br>
index 63bc7e8..2e9449c 100644<br>
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c<br>
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c<br>
@@ -732,7 +732,7 @@ radeon_bind_framebuffer(struct gl_context * ctx, GLenum target,<br>
radeon_print(RADEON_TEXTURE, RADEON_TRACE,<br>
"%s(%p, fb %p, target %s) \n",<br>
__func__, ctx, fb,<br>
- _mesa_lookup_enum_by_nr(target));<br>
+ _mesa_enum_string(target));<br>
<br>
if (target == GL_FRAMEBUFFER_EXT || target == GL_DRAW_FRAMEBUFFER_EXT) {<br>
radeon_draw_buffer(ctx, fb);<br>
diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c<br>
index 4cb1838..ed0e788 100644<br>
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c<br>
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c<br>
@@ -276,7 +276,7 @@ static void calculate_min_max_lod(struct gl_sampler_object *samp, struct gl_text<br>
radeon_print(RADEON_TEXTURE, RADEON_TRACE,<br>
"%s(%p) target %s, min %d, max %d.\n",<br>
__func__, tObj,<br>
- _mesa_lookup_enum_by_nr(tObj->Target),<br>
+ _mesa_enum_string(tObj->Target),<br>
minLod, maxLod);<br>
<br>
/* save these values */<br>
diff --git a/src/mesa/drivers/dri/radeon/radeon_pixel_read.c b/src/mesa/drivers/dri/radeon/radeon_pixel_read.c<br>
index db5e01d..757a8ee 100644<br>
--- a/src/mesa/drivers/dri/radeon/radeon_pixel_read.c<br>
+++ b/src/mesa/drivers/dri/radeon/radeon_pixel_read.c<br>
@@ -212,7 +212,7 @@ radeonReadPixels(struct gl_context * ctx,<br>
*/<br>
radeon_print(RADEON_FALLBACKS, RADEON_NORMAL,<br>
"Falling back to sw for ReadPixels (format %s, type %s)\n",<br>
- _mesa_lookup_enum_by_nr(format), _mesa_lookup_enum_by_nr(type));<br>
+ _mesa_enum_string(format), _mesa_enum_string(type));<br>
<br>
if (ctx->NewState)<br>
_mesa_update_state(ctx);<br>
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c<br>
index 70542f6..c7982dc 100644<br>
--- a/src/mesa/drivers/dri/radeon/radeon_state.c<br>
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c<br>
@@ -1505,7 +1505,7 @@ static void radeonEnable( struct gl_context *ctx, GLenum cap, GLboolean state )<br>
<br>
if ( RADEON_DEBUG & RADEON_STATE )<br>
fprintf( stderr, "%s( %s = %s )\n", __FUNCTION__,<br>
- _mesa_lookup_enum_by_nr( cap ),<br>
+ _mesa_enum_string( cap ),<br>
state ? "GL_TRUE" : "GL_FALSE" );<br>
<br>
switch ( cap ) {<br>
diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c<br>
index 1e80162..3df90b3 100644<br>
--- a/src/mesa/drivers/dri/radeon/radeon_swtcl.c<br>
+++ b/src/mesa/drivers/dri/radeon/radeon_swtcl.c<br>
@@ -440,7 +440,7 @@ static GLboolean radeon_run_render( struct gl_context *ctx,<br>
<br>
radeon_print(RADEON_SWRENDER, RADEON_NORMAL,<br>
"radeon_render.c: prim %s %d..%d\n",<br>
- _mesa_lookup_enum_by_nr(prim & PRIM_MODE_MASK),<br>
+ _mesa_enum_string(prim & PRIM_MODE_MASK),<br>
start, start+length);<br>
<br>
if (length)<br>
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c<br>
index 301949d..aff67ef 100644<br>
--- a/src/mesa/drivers/dri/radeon/radeon_tex.c<br>
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.c<br>
@@ -263,7 +263,7 @@ static void radeonTexEnv( struct gl_context *ctx, GLenum target,<br>
<br>
if ( RADEON_DEBUG & RADEON_STATE ) {<br>
fprintf( stderr, "%s( %s )\n",<br>
- __FUNCTION__, _mesa_lookup_enum_by_nr( pname ) );<br>
+ __FUNCTION__, _mesa_enum_string( pname ) );<br>
}<br>
<br>
switch ( pname ) {<br>
@@ -335,7 +335,7 @@ static void radeonTexParameter( struct gl_context *ctx, GLenum target,<br>
radeonTexObj* t = radeon_tex_obj(texObj);<br>
<br>
radeon_print(RADEON_TEXTURE, RADEON_VERBOSE, "%s( %s )\n", __FUNCTION__,<br>
- _mesa_lookup_enum_by_nr( pname ) );<br>
+ _mesa_enum_string( pname ) );<br>
<br>
switch ( pname ) {<br>
case GL_TEXTURE_BASE_LEVEL:<br>
@@ -359,7 +359,7 @@ static void radeonDeleteTexture( struct gl_context *ctx,<br>
<br>
radeon_print(RADEON_TEXTURE, RADEON_NORMAL,<br>
"%s( %p (target = %s) )\n", __FUNCTION__, (void *)texObj,<br>
- _mesa_lookup_enum_by_nr( texObj->Target ) );<br>
+ _mesa_enum_string( texObj->Target ) );<br>
<br>
if ( rmesa ) {<br>
radeon_firevertices(&rmesa->radeon);<br>
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c<br>
index 52cf95d..f7dd238 100644<br>
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c<br>
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c<br>
@@ -267,8 +267,8 @@ gl_format radeonChooseTextureFormat(struct gl_context * ctx,<br>
radeon_print(RADEON_TEXTURE, RADEON_TRACE,<br>
"%s InternalFormat=%s(%d) type=%s format=%s\n",<br>
__func__,<br>
- _mesa_lookup_enum_by_nr(internalFormat), internalFormat,<br>
- _mesa_lookup_enum_by_nr(type), _mesa_lookup_enum_by_nr(format));<br>
+ _mesa_enum_string(internalFormat), internalFormat,<br>
+ _mesa_enum_string(type), _mesa_enum_string(format));<br>
radeon_print(RADEON_TEXTURE, RADEON_TRACE,<br>
"%s do32bpt=%d force16bpt=%d\n",<br>
__func__, do32bpt, force16bpt);<br>
diff --git a/src/mesa/main/atifragshader.c b/src/mesa/main/atifragshader.c<br>
index 7077c96..e6d551f 100644<br>
--- a/src/mesa/main/atifragshader.c<br>
+++ b/src/mesa/main/atifragshader.c<br>
@@ -132,21 +132,21 @@ static void debug_op(GLint optype, GLuint arg_count, GLenum op, GLuint dst,<br>
<br>
op_name = atifs_ops[(arg_count-1)+(optype?3:0)];<br>
<br>
- fprintf(stderr, "%s(%s, %s", op_name, _mesa_lookup_enum_by_nr(op),<br>
- _mesa_lookup_enum_by_nr(dst));<br>
+ fprintf(stderr, "%s(%s, %s", op_name, _mesa_enum_string(op),<br>
+ _mesa_enum_string(dst));<br>
if (!optype)<br>
fprintf(stderr, ", %d", dstMask);<br>
<br>
fprintf(stderr, ", %s", create_dst_mod_str(dstMod));<br>
<br>
- fprintf(stderr, ", %s, %s, %d", _mesa_lookup_enum_by_nr(arg1),<br>
- _mesa_lookup_enum_by_nr(arg1Rep), arg1Mod);<br>
+ fprintf(stderr, ", %s, %s, %d", _mesa_enum_string(arg1),<br>
+ _mesa_enum_string(arg1Rep), arg1Mod);<br>
if (arg_count>1)<br>
- fprintf(stderr, ", %s, %s, %d", _mesa_lookup_enum_by_nr(arg2),<br>
- _mesa_lookup_enum_by_nr(arg2Rep), arg2Mod);<br>
+ fprintf(stderr, ", %s, %s, %d", _mesa_enum_string(arg2),<br>
+ _mesa_enum_string(arg2Rep), arg2Mod);<br>
if (arg_count>2)<br>
- fprintf(stderr, ", %s, %s, %d", _mesa_lookup_enum_by_nr(arg3),<br>
- _mesa_lookup_enum_by_nr(arg3Rep), arg3Mod);<br>
+ fprintf(stderr, ", %s, %s, %d", _mesa_enum_string(arg3),<br>
+ _mesa_enum_string(arg3Rep), arg3Mod);<br>
<br>
fprintf(stderr,")\n");<br>
<br>
@@ -383,7 +383,7 @@ _mesa_EndFragmentShaderATI(void)<br>
for (j = 0; j < MAX_NUM_PASSES_ATI; j++) {<br>
for (i = 0; i < MAX_NUM_FRAGMENT_REGISTERS_ATI; i++) {<br>
GLuint op = curProg->SetupInst[j][i].Opcode;<br>
- const char *op_enum = op > 5 ? _mesa_lookup_enum_by_nr(op) : "0";<br>
+ const char *op_enum = op > 5 ? _mesa_enum_string(op) : "0";<br>
GLuint src = curProg->SetupInst[j][i].src;<br>
GLuint swizzle = curProg->SetupInst[j][i].swizzle;<br>
fprintf(stderr, "%2d %04X %s %d %04X\n", i, op, op_enum, src,<br>
@@ -392,8 +392,8 @@ _mesa_EndFragmentShaderATI(void)<br>
for (i = 0; i < curProg->numArithInstr[j]; i++) {<br>
GLuint op0 = curProg->Instructions[j][i].Opcode[0];<br>
GLuint op1 = curProg->Instructions[j][i].Opcode[1];<br>
- const char *op0_enum = op0 > 5 ? _mesa_lookup_enum_by_nr(op0) : "0";<br>
- const char *op1_enum = op1 > 5 ? _mesa_lookup_enum_by_nr(op1) : "0";<br>
+ const char *op0_enum = op0 > 5 ? _mesa_enum_string(op0) : "0";<br>
+ const char *op1_enum = op1 > 5 ? _mesa_enum_string(op1) : "0";<br>
GLuint count0 = curProg->Instructions[j][i].ArgCount[0];<br>
GLuint count1 = curProg->Instructions[j][i].ArgCount[1];<br>
fprintf(stderr, "%2d %04X %s %d %04X %s %d\n", i, op0, op0_enum, count0,<br>
@@ -477,8 +477,8 @@ _mesa_PassTexCoordATI(GLuint dst, GLuint coord, GLenum swizzle)<br>
<br>
#if MESA_DEBUG_ATI_FS<br>
_mesa_debug(ctx, "%s(%s, %s, %s)\n", __FUNCTION__,<br>
- _mesa_lookup_enum_by_nr(dst), _mesa_lookup_enum_by_nr(coord),<br>
- _mesa_lookup_enum_by_nr(swizzle));<br>
+ _mesa_enum_string(dst), _mesa_enum_string(coord),<br>
+ _mesa_enum_string(swizzle));<br>
#endif<br>
}<br>
<br>
@@ -550,8 +550,8 @@ _mesa_SampleMapATI(GLuint dst, GLuint interp, GLenum swizzle)<br>
<br>
#if MESA_DEBUG_ATI_FS<br>
_mesa_debug(ctx, "%s(%s, %s, %s)\n", __FUNCTION__,<br>
- _mesa_lookup_enum_by_nr(dst), _mesa_lookup_enum_by_nr(interp),<br>
- _mesa_lookup_enum_by_nr(swizzle));<br>
+ _mesa_enum_string(dst), _mesa_enum_string(interp),<br>
+ _mesa_enum_string(swizzle));<br>
#endif<br>
}<br>
<br>
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c<br>
index 9358e69..a2467d9 100644<br>
--- a/src/mesa/main/attrib.c<br>
+++ b/src/mesa/main/attrib.c<br>
@@ -858,7 +858,7 @@ _mesa_PopAttrib(void)<br>
<br>
if (MESA_VERBOSE & VERBOSE_API) {<br>
_mesa_debug(ctx, "glPopAttrib %s\n",<br>
- _mesa_lookup_enum_by_nr(attr->kind));<br>
+ _mesa_enum_string(attr->kind));<br>
}<br>
<br>
switch (attr->kind) {<br>
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c<br>
index c97c207..717b6d3 100644<br>
--- a/src/mesa/main/blend.c<br>
+++ b/src/mesa/main/blend.c<br>
@@ -130,28 +130,28 @@ validate_blend_factors(struct gl_context *ctx, const char *func,<br>
if (!legal_src_factor(ctx, sfactorRGB)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"%s(sfactorRGB = %s)", func,<br>
- _mesa_lookup_enum_by_nr(sfactorRGB));<br>
+ _mesa_enum_string(sfactorRGB));<br>
return GL_FALSE;<br>
}<br>
<br>
if (!legal_dst_factor(ctx, dfactorRGB)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"%s(dfactorRGB = %s)", func,<br>
- _mesa_lookup_enum_by_nr(dfactorRGB));<br>
+ _mesa_enum_string(dfactorRGB));<br>
return GL_FALSE;<br>
}<br>
<br>
if (sfactorA != sfactorRGB && !legal_src_factor(ctx, sfactorA)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"%s(sfactorA = %s)", func,<br>
- _mesa_lookup_enum_by_nr(sfactorA));<br>
+ _mesa_enum_string(sfactorA));<br>
return GL_FALSE;<br>
}<br>
<br>
if (dfactorA != dfactorRGB && !legal_dst_factor(ctx, dfactorA)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"%s(dfactorA = %s)", func,<br>
- _mesa_lookup_enum_by_nr(dfactorA));<br>
+ _mesa_enum_string(dfactorA));<br>
return GL_FALSE;<br>
}<br>
<br>
@@ -210,10 +210,10 @@ _mesa_BlendFuncSeparate( GLenum sfactorRGB, GLenum dfactorRGB,<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glBlendFuncSeparate %s %s %s %s\n",<br>
- _mesa_lookup_enum_by_nr(sfactorRGB),<br>
- _mesa_lookup_enum_by_nr(dfactorRGB),<br>
- _mesa_lookup_enum_by_nr(sfactorA),<br>
- _mesa_lookup_enum_by_nr(dfactorA));<br>
+ _mesa_enum_string(sfactorRGB),<br>
+ _mesa_enum_string(dfactorRGB),<br>
+ _mesa_enum_string(sfactorA),<br>
+ _mesa_enum_string(dfactorA));<br>
<br>
if (!validate_blend_factors(ctx, "glBlendFuncSeparate",<br>
sfactorRGB, dfactorRGB,<br>
@@ -344,7 +344,7 @@ _mesa_BlendEquation( GLenum mode )<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glBlendEquation(%s)\n",<br>
- _mesa_lookup_enum_by_nr(mode));<br>
+ _mesa_enum_string(mode));<br>
<br>
if (!legal_blend_equation(ctx, mode)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquation");<br>
@@ -387,7 +387,7 @@ _mesa_BlendEquationiARB(GLuint buf, GLenum mode)<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glBlendEquationi(%u, %s)\n",<br>
- buf, _mesa_lookup_enum_by_nr(mode));<br>
+ buf, _mesa_enum_string(mode));<br>
<br>
if (buf >= ctx->Const.MaxDrawBuffers) {<br>
_mesa_error(ctx, GL_INVALID_VALUE, "glBlendFuncSeparatei(buffer=%u)",<br>
@@ -423,8 +423,8 @@ _mesa_BlendEquationSeparate( GLenum modeRGB, GLenum modeA )<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glBlendEquationSeparateEXT(%s %s)\n",<br>
- _mesa_lookup_enum_by_nr(modeRGB),<br>
- _mesa_lookup_enum_by_nr(modeA));<br>
+ _mesa_enum_string(modeRGB),<br>
+ _mesa_enum_string(modeA));<br>
<br>
if ( (modeRGB != modeA) && !ctx->Extensions.EXT_blend_equation_separate ) {<br>
_mesa_error(ctx, GL_INVALID_OPERATION,<br>
@@ -478,8 +478,8 @@ _mesa_BlendEquationSeparateiARB(GLuint buf, GLenum modeRGB, GLenum modeA)<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glBlendEquationSeparatei(%u, %s %s)\n", buf,<br>
- _mesa_lookup_enum_by_nr(modeRGB),<br>
- _mesa_lookup_enum_by_nr(modeA));<br>
+ _mesa_enum_string(modeRGB),<br>
+ _mesa_enum_string(modeA));<br>
<br>
if (buf >= ctx->Const.MaxDrawBuffers) {<br>
_mesa_error(ctx, GL_INVALID_VALUE, "glBlendEquationSeparatei(buffer=%u)",<br>
@@ -569,7 +569,7 @@ _mesa_AlphaFunc( GLenum func, GLclampf ref )<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glAlphaFunc(%s, %f)\n",<br>
- _mesa_lookup_enum_by_nr(func), ref);<br>
+ _mesa_enum_string(func), ref);<br>
<br>
switch (func) {<br>
case GL_NEVER:<br>
@@ -615,7 +615,7 @@ _mesa_LogicOp( GLenum opcode )<br>
GET_CURRENT_CONTEXT(ctx);<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
- _mesa_debug(ctx, "glLogicOp(%s)\n", _mesa_lookup_enum_by_nr(opcode));<br>
+ _mesa_debug(ctx, "glLogicOp(%s)\n", _mesa_enum_string(opcode));<br>
<br>
switch (opcode) {<br>
case GL_CLEAR:<br>
@@ -792,7 +792,7 @@ _mesa_ClampColor(GLenum target, GLenum clamp)<br>
<br>
invalid_enum:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glClampColor(%s)",<br>
- _mesa_lookup_enum_by_nr(target));<br>
+ _mesa_enum_string(target));<br>
}<br>
<br>
static GLboolean<br>
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c<br>
index bd71688..444c2d4 100644<br>
--- a/src/mesa/main/bufferobj.c<br>
+++ b/src/mesa/main/bufferobj.c<br>
@@ -815,7 +815,7 @@ _mesa_BindBuffer(GLenum target, GLuint buffer)<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glBindBuffer(%s, %u)\n",<br>
- _mesa_lookup_enum_by_nr(target), buffer);<br>
+ _mesa_enum_string(target), buffer);<br>
<br>
bind_buffer_object(ctx, target, buffer);<br>
}<br>
@@ -1005,9 +1005,9 @@ _mesa_BufferData(GLenum target, GLsizeiptrARB size,<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glBufferData(%s, %ld, %p, %s)\n",<br>
- _mesa_lookup_enum_by_nr(target),<br>
+ _mesa_enum_string(target),<br>
(long int) size, data,<br>
- _mesa_lookup_enum_by_nr(usage));<br>
+ _mesa_enum_string(usage));<br>
<br>
if (size < 0) {<br>
_mesa_error(ctx, GL_INVALID_VALUE, "glBufferDataARB(size < 0)");<br>
@@ -1319,7 +1319,7 @@ _mesa_GetBufferParameteriv(GLenum target, GLenum pname, GLint *params)<br>
<br>
invalid_pname:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameterivARB(pname=%s)",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
}<br>
<br>
<br>
@@ -1372,7 +1372,7 @@ _mesa_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)<br>
<br>
invalid_pname:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameteri64v(pname=%s)",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
}<br>
<br>
<br>
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c<br>
index e80f040..8db46c2 100644<br>
--- a/src/mesa/main/buffers.c<br>
+++ b/src/mesa/main/buffers.c<br>
@@ -248,7 +248,7 @@ _mesa_DrawBuffer(GLenum buffer)<br>
FLUSH_VERTICES(ctx, 0);<br>
<br>
if (MESA_VERBOSE & VERBOSE_API) {<br>
- _mesa_debug(ctx, "glDrawBuffer %s\n", _mesa_lookup_enum_by_nr(buffer));<br>
+ _mesa_debug(ctx, "glDrawBuffer %s\n", _mesa_enum_string(buffer));<br>
}<br>
<br>
if (buffer == GL_NONE) {<br>
@@ -615,12 +615,12 @@ _mesa_ReadBuffer(GLenum buffer)<br>
FLUSH_VERTICES(ctx, 0);<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
- _mesa_debug(ctx, "glReadBuffer %s\n", _mesa_lookup_enum_by_nr(buffer));<br>
+ _mesa_debug(ctx, "glReadBuffer %s\n", _mesa_enum_string(buffer));<br>
<br>
fb = ctx->ReadBuffer;<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
- _mesa_debug(ctx, "glReadBuffer %s\n", _mesa_lookup_enum_by_nr(buffer));<br>
+ _mesa_debug(ctx, "glReadBuffer %s\n", _mesa_enum_string(buffer));<br>
<br>
if (buffer == GL_NONE) {<br>
/* This is legal--it means that no buffer should be bound for reading. */<br>
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c<br>
index 304d135..574bbb3 100644<br>
--- a/src/mesa/main/clear.c<br>
+++ b/src/mesa/main/clear.c<br>
@@ -353,7 +353,7 @@ _mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)<br>
return;<br>
default:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferiv(buffer=%s)",<br>
- _mesa_lookup_enum_by_nr(buffer));<br>
+ _mesa_enum_string(buffer));<br>
return;<br>
}<br>
}<br>
@@ -425,7 +425,7 @@ _mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)<br>
return;<br>
default:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferuiv(buffer=%s)",<br>
- _mesa_lookup_enum_by_nr(buffer));<br>
+ _mesa_enum_string(buffer));<br>
return;<br>
}<br>
}<br>
@@ -517,7 +517,7 @@ _mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)<br>
return;<br>
default:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferfv(buffer=%s)",<br>
- _mesa_lookup_enum_by_nr(buffer));<br>
+ _mesa_enum_string(buffer));<br>
return;<br>
}<br>
}<br>
@@ -539,7 +539,7 @@ _mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer,<br>
<br>
if (buffer != GL_DEPTH_STENCIL) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferfi(buffer=%s)",<br>
- _mesa_lookup_enum_by_nr(buffer));<br>
+ _mesa_enum_string(buffer));<br>
return;<br>
}<br>
<br>
diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c<br>
index 3d9b0ec..187f780 100644<br>
--- a/src/mesa/main/condrender.c<br>
+++ b/src/mesa/main/condrender.c<br>
@@ -60,7 +60,7 @@ _mesa_BeginConditionalRender(GLuint queryId, GLenum mode)<br>
break;<br>
default:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glBeginConditionalRender(mode=%s)",<br>
- _mesa_lookup_enum_by_nr(mode));<br>
+ _mesa_enum_string(mode));<br>
return;<br>
}<br>
<br>
@@ -144,7 +144,7 @@ _mesa_check_conditional_render(struct gl_context *ctx)<br>
default:<br>
_mesa_problem(ctx, "Bad cond render mode %s in "<br>
" _mesa_check_conditional_render()",<br>
- _mesa_lookup_enum_by_nr(ctx->Query.CondRenderMode));<br>
+ _mesa_enum_string(ctx->Query.CondRenderMode));<br>
return GL_TRUE;<br>
}<br>
}<br>
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c<br>
index 8c3f783..60bced4 100644<br>
--- a/src/mesa/main/debug.c<br>
+++ b/src/mesa/main/debug.c<br>
@@ -406,7 +406,7 @@ dump_renderbuffer(const struct gl_renderbuffer *rb, GLboolean writeImage)<br>
{<br>
printf("Renderbuffer %u: %u x %u IntFormat = %s\n",<br>
rb->Name, rb->Width, rb->Height,<br>
- _mesa_lookup_enum_by_nr(rb->InternalFormat));<br>
+ _mesa_enum_string(rb->InternalFormat));<br>
if (writeImage) {<br>
_mesa_write_renderbuffer_image(rb);<br>
}<br>
diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c<br>
index 29851ec..9187342 100644<br>
--- a/src/mesa/main/depth.c<br>
+++ b/src/mesa/main/depth.c<br>
@@ -63,7 +63,7 @@ _mesa_DepthFunc( GLenum func )<br>
GET_CURRENT_CONTEXT(ctx);<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
- _mesa_debug(ctx, "glDepthFunc %s\n", _mesa_lookup_enum_by_nr(func));<br>
+ _mesa_debug(ctx, "glDepthFunc %s\n", _mesa_enum_string(func));<br>
<br>
switch (func) {<br>
case GL_LESS: /* (default) pass if incoming z < stored z */<br>
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c<br>
index abc8665..f49f101 100644<br>
--- a/src/mesa/main/dlist.c<br>
+++ b/src/mesa/main/dlist.c<br>
@@ -8613,7 +8613,7 @@ _mesa_NewList(GLuint name, GLenum mode)<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glNewList %u %s\n", name,<br>
- _mesa_lookup_enum_by_nr(mode));<br>
+ _mesa_enum_string(mode));<br>
<br>
if (name == 0) {<br>
_mesa_error(ctx, GL_INVALID_VALUE, "glNewList");<br>
@@ -9286,7 +9286,7 @@ _mesa_initialize_save_table(const struct gl_context *ctx)<br>
static const char *<br>
enum_string(GLenum k)<br>
{<br>
- return _mesa_lookup_enum_by_nr(k);<br>
+ return _mesa_enum_string(k);<br>
}<br>
<br>
<br>
@@ -9423,19 +9423,19 @@ print_list(struct gl_context *ctx, GLuint list)<br>
break;<br>
case OPCODE_BIND_TEXTURE:<br>
printf("BindTexture %s %d\n",<br>
- _mesa_lookup_enum_by_nr(n[1].ui), n[2].ui);<br>
+ _mesa_enum_string(n[1].ui), n[2].ui);<br>
break;<br>
case OPCODE_SHADE_MODEL:<br>
- printf("ShadeModel %s\n", _mesa_lookup_enum_by_nr(n[1].ui));<br>
+ printf("ShadeModel %s\n", _mesa_enum_string(n[1].ui));<br>
break;<br>
case OPCODE_MAP1:<br>
printf("Map1 %s %.3f %.3f %d %d\n",<br>
- _mesa_lookup_enum_by_nr(n[1].ui),<br>
+ _mesa_enum_string(n[1].ui),<br>
n[2].f, n[3].f, n[4].i, n[5].i);<br>
break;<br>
case OPCODE_MAP2:<br>
printf("Map2 %s %.3f %.3f %.3f %.3f %d %d %d %d\n",<br>
- _mesa_lookup_enum_by_nr(n[1].ui),<br>
+ _mesa_enum_string(n[1].ui),<br>
n[2].f, n[3].f, n[4].f, n[5].f,<br>
n[6].i, n[7].i, n[8].i, n[9].i);<br>
break;<br>
@@ -9514,7 +9514,7 @@ print_list(struct gl_context *ctx, GLuint list)<br>
<br>
case OPCODE_PROVOKING_VERTEX:<br>
printf("ProvokingVertex %s\n",<br>
- _mesa_lookup_enum_by_nr(n[1].ui));<br>
+ _mesa_enum_string(n[1].ui));<br>
break;<br>
<br>
/*<br>
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c<br>
index 7ab8e30..ea7e5a9 100644<br>
--- a/src/mesa/main/api_validate.c<br>
+++ b/src/mesa/main/api_validate.c<br>
@@ -279,8 +279,8 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name)<br>
_mesa_error(ctx, GL_INVALID_OPERATION,<br>
"%s(mode=%s vs transform feedback %s)",<br>
name,<br>
- _mesa_lookup_prim_by_nr(mode),<br>
- _mesa_lookup_prim_by_nr(ctx->TransformFeedback.Mode));<br>
+ _mesa_prim_string(mode),<br>
+ _mesa_prim_string(ctx->TransformFeedback.Mode));<br>
return GL_FALSE;<br>
}<br>
}<br>
@@ -304,7 +304,7 @@ valid_elements_type(struct gl_context *ctx, GLenum type, const char *name)<br>
<br>
default:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "%s(type = %s)", name,<br>
- _mesa_lookup_enum_by_nr(type));<br>
+ _mesa_enum_string(type));<br>
return false;<br>
}<br>
}<br>
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c<br>
index 096615c..b3804fa 100644<br>
--- a/src/mesa/main/drawpix.c<br>
+++ b/src/mesa/main/drawpix.c<br>
@@ -53,10 +53,10 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glDrawPixels(%d, %d, %s, %s, %p) // to %s at %d, %d\n",<br>
width, height,<br>
- _mesa_lookup_enum_by_nr(format),<br>
- _mesa_lookup_enum_by_nr(type),<br>
+ _mesa_enum_string(format),<br>
+ _mesa_enum_string(type),<br>
pixels,<br>
- _mesa_lookup_enum_by_nr(ctx->DrawBuffer->ColorDrawBuffer[0]),<br>
+ _mesa_enum_string(ctx->DrawBuffer->ColorDrawBuffer[0]),<br>
IROUND(ctx->Current.RasterPos[0]),<br>
IROUND(ctx->Current.RasterPos[1]));<br>
<br>
@@ -96,8 +96,8 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,<br>
err = _mesa_error_check_format_and_type(ctx, format, type);<br>
if (err != GL_NO_ERROR) {<br>
_mesa_error(ctx, err, "glDrawPixels(invalid format %s and/or type %s)",<br>
- _mesa_lookup_enum_by_nr(format),<br>
- _mesa_lookup_enum_by_nr(type));<br>
+ _mesa_enum_string(format),<br>
+ _mesa_enum_string(type));<br>
goto end;<br>
}<br>
<br>
@@ -198,9 +198,9 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,<br>
_mesa_debug(ctx,<br>
"glCopyPixels(%d, %d, %d, %d, %s) // from %s to %s at %d, %d\n",<br>
srcx, srcy, width, height,<br>
- _mesa_lookup_enum_by_nr(type),<br>
- _mesa_lookup_enum_by_nr(ctx->ReadBuffer->ColorReadBuffer),<br>
- _mesa_lookup_enum_by_nr(ctx->DrawBuffer->ColorDrawBuffer[0]),<br>
+ _mesa_enum_string(type),<br>
+ _mesa_enum_string(ctx->ReadBuffer->ColorReadBuffer),<br>
+ _mesa_enum_string(ctx->DrawBuffer->ColorDrawBuffer[0]),<br>
IROUND(ctx->Current.RasterPos[0]),<br>
IROUND(ctx->Current.RasterPos[1]));<br>
<br>
@@ -218,7 +218,7 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,<br>
type != GL_STENCIL &&<br>
type != GL_DEPTH_STENCIL) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glCopyPixels(type=%s)",<br>
- _mesa_lookup_enum_by_nr(type));<br>
+ _mesa_enum_string(type));<br>
return;<br>
}<br>
<br>
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c<br>
index fdde24e..a4dc190 100644<br>
--- a/src/mesa/main/enable.c<br>
+++ b/src/mesa/main/enable.c<br>
@@ -143,7 +143,7 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state)<br>
<br>
invalid_enum_error:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "gl%sClientState(%s)",<br>
- state ? "Enable" : "Disable", _mesa_lookup_enum_by_nr(cap));<br>
+ state ? "Enable" : "Disable", _mesa_enum_string(cap));<br>
}<br>
<br>
<br>
@@ -280,7 +280,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "%s %s (newstate is %x)\n",<br>
state ? "glEnable" : "glDisable",<br>
- _mesa_lookup_enum_by_nr(cap),<br>
+ _mesa_enum_string(cap),<br>
ctx->NewState);<br>
<br>
switch (cap) {<br>
@@ -1021,7 +1021,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)<br>
<br>
invalid_enum_error:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "gl%s(%s)",<br>
- state ? "Enable" : "Disable", _mesa_lookup_enum_by_nr(cap));<br>
+ state ? "Enable" : "Disable", _mesa_enum_string(cap));<br>
}<br>
<br>
<br>
@@ -1086,7 +1086,7 @@ _mesa_set_enablei(struct gl_context *ctx, GLenum cap,<br>
invalid_enum_error:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "%s(cap=%s)",<br>
state ? "glEnablei" : "glDisablei",<br>
- _mesa_lookup_enum_by_nr(cap));<br>
+ _mesa_enum_string(cap));<br>
}<br>
<br>
<br>
@@ -1121,7 +1121,7 @@ _mesa_IsEnabledi( GLenum cap, GLuint index )<br>
return (ctx->Color.BlendEnabled >> index) & 1;<br>
default:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabledIndexed(cap=%s)",<br>
- _mesa_lookup_enum_by_nr(cap));<br>
+ _mesa_enum_string(cap));<br>
return GL_FALSE;<br>
}<br>
}<br>
@@ -1594,6 +1594,6 @@ _mesa_IsEnabled( GLenum cap )<br>
<br>
invalid_enum_error:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(%s)",<br>
- _mesa_lookup_enum_by_nr(cap));<br>
+ _mesa_enum_string(cap));<br>
return GL_FALSE;<br>
}<br>
diff --git a/src/mesa/main/enums.h b/src/mesa/main/enums.h<br>
index 556c1db..513e1f0 100644<br>
--- a/src/mesa/main/enums.h<br>
+++ b/src/mesa/main/enums.h<br>
@@ -37,13 +37,13 @@<br>
#define _ENUMS_H_<br>
<br>
<br>
-extern const char *_mesa_lookup_enum_by_nr( int nr );<br>
+extern const char *_mesa_enum_string( int nr );<br>
<br>
/* Get the name of an enum given that it is a primitive type. Avoids<br>
* GL_FALSE/GL_POINTS ambiguity and others.<br>
*/<br>
-const char *_mesa_lookup_prim_by_nr( unsigned nr );<br>
+const char *_mesa_prim_string( unsigned nr );<br>
<br>
-extern int _mesa_lookup_enum_by_name( const char *symbol );<br>
+extern int _mesa_enum_value( const char *symbol );<br>
<br>
#endif<br>
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c<br>
index cc652ba..6aed377 100644<br>
--- a/src/mesa/main/errors.c<br>
+++ b/src/mesa/main/errors.c<br>
@@ -793,7 +793,7 @@ flush_delayed_errors( struct gl_context *ctx )<br>
if (ctx->ErrorDebugCount) {<br>
_mesa_snprintf(s, MAX_DEBUG_MESSAGE_LENGTH, "%d similar %s errors",<br>
ctx->ErrorDebugCount,<br>
- _mesa_lookup_enum_by_nr(ctx->ErrorValue));<br>
+ _mesa_enum_string(ctx->ErrorValue));<br>
<br>
output_if_debug("Mesa", s, GL_TRUE);<br>
<br>
@@ -958,7 +958,7 @@ _mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... )<br>
}<br>
<br>
len = _mesa_snprintf(s2, MAX_DEBUG_MESSAGE_LENGTH, "%s in %s",<br>
- _mesa_lookup_enum_by_nr(error), s);<br>
+ _mesa_enum_string(error), s);<br>
if (len >= MAX_DEBUG_MESSAGE_LENGTH) {<br>
/* Same as above. */<br>
ASSERT(0);<br>
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c<br>
index aa0f125..f305437 100644<br>
--- a/src/mesa/main/fbobject.c<br>
+++ b/src/mesa/main/fbobject.c<br>
@@ -1586,14 +1586,14 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,<br>
if (samples == NO_SAMPLES)<br>
_mesa_debug(ctx, "%s(%s, %s, %d, %d)\n",<br>
func,<br>
- _mesa_lookup_enum_by_nr(target),<br>
- _mesa_lookup_enum_by_nr(internalFormat),<br>
+ _mesa_enum_string(target),<br>
+ _mesa_enum_string(internalFormat),<br>
width, height);<br>
else<br>
_mesa_debug(ctx, "%s(%s, %s, %d, %d, %d)\n",<br>
func,<br>
- _mesa_lookup_enum_by_nr(target),<br>
- _mesa_lookup_enum_by_nr(internalFormat),<br>
+ _mesa_enum_string(target),<br>
+ _mesa_enum_string(internalFormat),<br>
width, height, samples);<br>
}<br>
<br>
@@ -1605,7 +1605,7 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,<br>
baseFormat = _mesa_base_fbo_format(ctx, internalFormat);<br>
if (baseFormat == 0) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "%s(internalFormat=%s)",<br>
- func, _mesa_lookup_enum_by_nr(internalFormat));<br>
+ func, _mesa_enum_string(internalFormat));<br>
return;<br>
}<br>
<br>
@@ -2118,7 +2118,7 @@ _mesa_CheckFramebufferStatus(GLenum target)<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glCheckFramebufferStatus(%s)\n",<br>
- _mesa_lookup_enum_by_nr(target));<br>
+ _mesa_enum_string(target));<br>
<br>
buffer = get_framebuffer_target(ctx, target);<br>
if (!buffer) {<br>
@@ -2362,7 +2362,7 @@ _mesa_FramebufferTexture1D(GLenum target, GLenum attachment,<br>
if (error) {<br>
_mesa_error(ctx, GL_INVALID_OPERATION,<br>
"glFramebufferTexture1DEXT(textarget=%s)",<br>
- _mesa_lookup_enum_by_nr(textarget));<br>
+ _mesa_enum_string(textarget));<br>
return;<br>
}<br>
}<br>
@@ -2413,7 +2413,7 @@ _mesa_FramebufferTexture2D(GLenum target, GLenum attachment,<br>
if (error) {<br>
_mesa_error(ctx, GL_INVALID_OPERATION,<br>
"glFramebufferTexture2DEXT(textarget=%s)",<br>
- _mesa_lookup_enum_by_nr(textarget));<br>
+ _mesa_enum_string(textarget));<br>
return;<br>
}<br>
}<br>
@@ -2500,7 +2500,7 @@ _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,<br>
if (att == NULL) {<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"glFramebufferRenderbufferEXT(invalid attachment %s)",<br>
- _mesa_lookup_enum_by_nr(attachment));<br>
+ _mesa_enum_string(attachment));<br>
return;<br>
}<br>
<br>
@@ -2841,7 +2841,7 @@ _mesa_GenerateMipmap(GLenum target)<br>
<br>
if (error) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glGenerateMipmapEXT(target=%s)",<br>
- _mesa_lookup_enum_by_nr(target));<br>
+ _mesa_enum_string(target));<br>
return;<br>
}<br>
<br>
@@ -3018,7 +3018,7 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
"glBlitFramebuffer(%d, %d, %d, %d, %d, %d, %d, %d, 0x%x, %s)\n",<br>
srcX0, srcY0, srcX1, srcY1,<br>
dstX0, dstY0, dstX1, dstY1,<br>
- mask, _mesa_lookup_enum_by_nr(filter));<br>
+ mask, _mesa_enum_string(filter));<br>
<br>
if (ctx->NewState) {<br>
_mesa_update_state(ctx);<br>
@@ -3044,7 +3044,7 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
<br>
if (!is_valid_blit_filter(ctx, filter)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glBlitFramebufferEXT(%s)",<br>
- _mesa_lookup_enum_by_nr(filter));<br>
+ _mesa_enum_string(filter));<br>
return;<br>
}<br>
<br>
@@ -3052,7 +3052,7 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,<br>
filter == GL_SCALED_RESOLVE_NICEST_EXT) &&<br>
(readFb->Visual.samples == 0 || drawFb->Visual.samples > 0)) {<br>
_mesa_error(ctx, GL_INVALID_OPERATION, "glBlitFramebufferEXT(%s)",<br>
- _mesa_lookup_enum_by_nr(filter));<br>
+ _mesa_enum_string(filter));<br>
return;<br>
}<br>
<br>
@@ -3517,7 +3517,7 @@ _mesa_DiscardFramebufferEXT(GLenum target, GLsizei numAttachments,<br>
if (!fb) {<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"glDiscardFramebufferEXT(target %s)",<br>
- _mesa_lookup_enum_by_nr(target));<br>
+ _mesa_enum_string(target));<br>
return;<br>
}<br>
<br>
@@ -3554,5 +3554,5 @@ _mesa_DiscardFramebufferEXT(GLenum target, GLsizei numAttachments,<br>
invalid_enum:<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"glDiscardFramebufferEXT(attachment %s)",<br>
- _mesa_lookup_enum_by_nr(attachments[i]));<br>
+ _mesa_enum_string(attachments[i]));<br>
}<br>
diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c<br>
index 40eca87..269e1b2 100644<br>
--- a/src/mesa/main/formatquery.c<br>
+++ b/src/mesa/main/formatquery.c<br>
@@ -80,7 +80,7 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,<br>
default:<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"glGetInternalformativ(target=%s)",<br>
- _mesa_lookup_enum_by_nr(target));<br>
+ _mesa_enum_string(target));<br>
return;<br>
}<br>
<br>
@@ -93,7 +93,7 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,<br>
if (_mesa_base_fbo_format(ctx, internalformat) == 0) {<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"glGetInternalformativ(internalformat=%s)",<br>
- _mesa_lookup_enum_by_nr(internalformat));<br>
+ _mesa_enum_string(internalformat));<br>
return;<br>
}<br>
<br>
@@ -105,7 +105,7 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,<br>
if (bufSize < 0) {<br>
_mesa_error(ctx, GL_INVALID_VALUE,<br>
"glGetInternalformativ(target=%s)",<br>
- _mesa_lookup_enum_by_nr(target));<br>
+ _mesa_enum_string(target));<br>
return;<br>
}<br>
<br>
@@ -143,7 +143,7 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,<br>
default:<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"glGetInternalformativ(pname=%s)",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
return;<br>
}<br>
<br>
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c<br>
index 1906a8a..ef829a8 100644<br>
--- a/src/mesa/main/framebuffer.c<br>
+++ b/src/mesa/main/framebuffer.c<br>
@@ -973,7 +973,7 @@ _mesa_print_framebuffer(const struct gl_framebuffer *fb)<br>
<br>
fprintf(stderr, "Mesa Framebuffer %u at %p\n", fb->Name, (void *) fb);<br>
fprintf(stderr, " Size: %u x %u Status: %s\n", fb->Width, fb->Height,<br>
- _mesa_lookup_enum_by_nr(fb->_Status));<br>
+ _mesa_enum_string(fb->_Status));<br>
fprintf(stderr, " Attachments:\n");<br>
<br>
for (i = 0; i < BUFFER_COUNT; i++) {<br>
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c<br>
index 593c75b..4e0fac7 100644<br>
--- a/src/mesa/main/get.c<br>
+++ b/src/mesa/main/get.c<br>
@@ -1006,7 +1006,7 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d<br>
<br>
if (api_check && !api_found) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,<br>
- _mesa_lookup_enum_by_nr(d->pname));<br>
+ _mesa_enum_string(d->pname));<br>
return GL_FALSE;<br>
}<br>
<br>
@@ -1067,7 +1067,7 @@ find_value(const char *func, GLenum pname, void **p, union value *v)<br>
* any valid enum. */<br>
if (unlikely(idx == 0)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
return &error_value;<br>
}<br>
<br>
@@ -1691,11 +1691,11 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v)<br>
<br>
invalid_enum:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
return TYPE_INVALID;<br>
invalid_value:<br>
_mesa_error(ctx, GL_INVALID_VALUE, "%s(pname=%s)", func,<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
return TYPE_INVALID;<br>
}<br>
<br>
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c<br>
index 1145d0f..d2d31d2 100644<br>
--- a/src/mesa/main/getstring.c<br>
+++ b/src/mesa/main/getstring.c<br>
@@ -201,7 +201,7 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params )<br>
return;<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
- _mesa_debug(ctx, "glGetPointerv %s\n", _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_debug(ctx, "glGetPointerv %s\n", _mesa_enum_string(pname));<br>
<br>
switch (pname) {<br>
case GL_VERTEX_ARRAY_POINTER:<br>
@@ -295,7 +295,7 @@ _mesa_GetError( void )<br>
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
- _mesa_debug(ctx, "glGetError <-- %s\n", _mesa_lookup_enum_by_nr(e));<br>
+ _mesa_debug(ctx, "glGetError <-- %s\n", _mesa_enum_string(e));<br>
<br>
ctx->ErrorValue = (GLenum) GL_NO_ERROR;<br>
ctx->ErrorDebugCount = 0;<br>
diff --git a/src/mesa/main/hint.c b/src/mesa/main/hint.c<br>
index 6d3e58d..efc82d7 100644<br>
--- a/src/mesa/main/hint.c<br>
+++ b/src/mesa/main/hint.c<br>
@@ -40,8 +40,8 @@ _mesa_Hint( GLenum target, GLenum mode )<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glHint %s %s\n",<br>
- _mesa_lookup_enum_by_nr(target),<br>
- _mesa_lookup_enum_by_nr(mode));<br>
+ _mesa_enum_string(target),<br>
+ _mesa_enum_string(mode));<br>
<br>
if (mode != GL_NICEST && mode != GL_FASTEST && mode != GL_DONT_CARE) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glHint(mode)");<br>
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c<br>
index d8ef8f2..8339973 100644<br>
--- a/src/mesa/main/light.c<br>
+++ b/src/mesa/main/light.c<br>
@@ -41,7 +41,7 @@ _mesa_ShadeModel( GLenum mode )<br>
GET_CURRENT_CONTEXT(ctx);<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
- _mesa_debug(ctx, "glShadeModel %s\n", _mesa_lookup_enum_by_nr(mode));<br>
+ _mesa_debug(ctx, "glShadeModel %s\n", _mesa_enum_string(mode));<br>
<br>
if (mode != GL_FLAT && mode != GL_SMOOTH) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glShadeModel");<br>
@@ -722,8 +722,8 @@ _mesa_ColorMaterial( GLenum face, GLenum mode )<br>
<br>
if (MESA_VERBOSE&VERBOSE_API)<br>
_mesa_debug(ctx, "glColorMaterial %s %s\n",<br>
- _mesa_lookup_enum_by_nr(face),<br>
- _mesa_lookup_enum_by_nr(mode));<br>
+ _mesa_enum_string(face),<br>
+ _mesa_enum_string(mode));<br>
<br>
bitmask = _mesa_material_bitmask(ctx, face, mode, legal, "glColorMaterial");<br>
if (bitmask == 0)<br>
diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c<br>
index b213022..3d28d15 100644<br>
--- a/src/mesa/main/matrix.c<br>
+++ b/src/mesa/main/matrix.c<br>
@@ -229,7 +229,7 @@ _mesa_PushMatrix( void )<br>
<br>
if (MESA_VERBOSE&VERBOSE_API)<br>
_mesa_debug(ctx, "glPushMatrix %s\n",<br>
- _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode));<br>
+ _mesa_enum_string(ctx->Transform.MatrixMode));<br>
<br>
if (stack->Depth + 1 >= stack->MaxDepth) {<br>
if (ctx->Transform.MatrixMode == GL_TEXTURE) {<br>
@@ -239,7 +239,7 @@ _mesa_PushMatrix( void )<br>
}<br>
else {<br>
_mesa_error(ctx, GL_STACK_OVERFLOW, "glPushMatrix(mode=%s)",<br>
- _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode));<br>
+ _mesa_enum_string(ctx->Transform.MatrixMode));<br>
}<br>
return;<br>
}<br>
@@ -270,7 +270,7 @@ _mesa_PopMatrix( void )<br>
<br>
if (MESA_VERBOSE&VERBOSE_API)<br>
_mesa_debug(ctx, "glPopMatrix %s\n",<br>
- _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode));<br>
+ _mesa_enum_string(ctx->Transform.MatrixMode));<br>
<br>
if (stack->Depth == 0) {<br>
if (ctx->Transform.MatrixMode == GL_TEXTURE) {<br>
@@ -280,7 +280,7 @@ _mesa_PopMatrix( void )<br>
}<br>
else {<br>
_mesa_error(ctx, GL_STACK_UNDERFLOW, "glPopMatrix(mode=%s)",<br>
- _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode));<br>
+ _mesa_enum_string(ctx->Transform.MatrixMode));<br>
}<br>
return;<br>
}<br>
diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c<br>
index d976e5a..736dfd0 100644<br>
--- a/src/mesa/main/pack.c<br>
+++ b/src/mesa/main/pack.c<br>
@@ -523,8 +523,8 @@ _pack_rgba_span_from_uints_problem(struct gl_context *ctx,<br>
_mesa_problem(ctx,<br>
"Unsupported type (%s) / format (%s) "<br>
"in _mesa_pack_rgba_span_from_uints",<br>
- _mesa_lookup_enum_by_nr(dstType),<br>
- _mesa_lookup_enum_by_nr(dstFormat));<br>
+ _mesa_enum_string(dstType),<br>
+ _mesa_enum_string(dstFormat));<br>
}<br>
<br>
void<br>
@@ -909,8 +909,8 @@ _pack_rgba_span_from_ints_problem(struct gl_context *ctx,<br>
_mesa_problem(ctx,<br>
"Unsupported type (%s) / format (%s) "<br>
"in _mesa_pack_rgba_span_from_ints",<br>
- _mesa_lookup_enum_by_nr(dstType),<br>
- _mesa_lookup_enum_by_nr(dstFormat));<br>
+ _mesa_enum_string(dstType),<br>
+ _mesa_enum_string(dstFormat));<br>
}<br>
<br>
void<br>
@@ -3104,7 +3104,7 @@ get_component_mapping(GLenum format,<br>
break;<br>
default:<br>
_mesa_problem(NULL, "bad srcFormat %s in get_component_mapping",<br>
- _mesa_lookup_enum_by_nr(format));<br>
+ _mesa_enum_string(format));<br>
return;<br>
}<br>
}<br>
diff --git a/src/mesa/main/pack_tmp.h b/src/mesa/main/pack_tmp.h<br>
index 0d4eb38..377dac6 100644<br>
--- a/src/mesa/main/pack_tmp.h<br>
+++ b/src/mesa/main/pack_tmp.h<br>
@@ -116,7 +116,7 @@ FN_NAME(struct gl_context *ctx,<br>
default:<br>
_mesa_problem(ctx,<br>
"Unsupported format (%s)",<br>
- _mesa_lookup_enum_by_nr(dstFormat));<br>
+ _mesa_enum_string(dstFormat));<br>
break;<br>
}<br>
}<br>
diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c<br>
index 611cef6..d86f21c 100644<br>
--- a/src/mesa/main/polygon.c<br>
+++ b/src/mesa/main/polygon.c<br>
@@ -56,7 +56,7 @@ _mesa_CullFace( GLenum mode )<br>
GET_CURRENT_CONTEXT(ctx);<br>
<br>
if (MESA_VERBOSE&VERBOSE_API)<br>
- _mesa_debug(ctx, "glCullFace %s\n", _mesa_lookup_enum_by_nr(mode));<br>
+ _mesa_debug(ctx, "glCullFace %s\n", _mesa_enum_string(mode));<br>
<br>
if (mode!=GL_FRONT && mode!=GL_BACK && mode!=GL_FRONT_AND_BACK) {<br>
_mesa_error( ctx, GL_INVALID_ENUM, "glCullFace" );<br>
@@ -91,7 +91,7 @@ _mesa_FrontFace( GLenum mode )<br>
GET_CURRENT_CONTEXT(ctx);<br>
<br>
if (MESA_VERBOSE&VERBOSE_API)<br>
- _mesa_debug(ctx, "glFrontFace %s\n", _mesa_lookup_enum_by_nr(mode));<br>
+ _mesa_debug(ctx, "glFrontFace %s\n", _mesa_enum_string(mode));<br>
<br>
if (mode!=GL_CW && mode!=GL_CCW) {<br>
_mesa_error( ctx, GL_INVALID_ENUM, "glFrontFace" );<br>
@@ -130,8 +130,8 @@ _mesa_PolygonMode( GLenum face, GLenum mode )<br>
<br>
if (MESA_VERBOSE&VERBOSE_API)<br>
_mesa_debug(ctx, "glPolygonMode %s %s\n",<br>
- _mesa_lookup_enum_by_nr(face),<br>
- _mesa_lookup_enum_by_nr(mode));<br>
+ _mesa_enum_string(face),<br>
+ _mesa_enum_string(mode));<br>
<br>
if (mode!=GL_POINT && mode!=GL_LINE && mode!=GL_FILL) {<br>
_mesa_error( ctx, GL_INVALID_ENUM, "glPolygonMode(mode)" );<br>
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c<br>
index b74898c..084fe80 100644<br>
--- a/src/mesa/main/queryobj.c<br>
+++ b/src/mesa/main/queryobj.c<br>
@@ -310,7 +310,7 @@ _mesa_BeginQueryIndexed(GLenum target, GLuint index, GLuint id)<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glBeginQueryIndexed(%s, %u, %u)\n",<br>
- _mesa_lookup_enum_by_nr(target), index, id);<br>
+ _mesa_enum_string(target), index, id);<br>
<br>
if (!query_error_check_index(ctx, target, index))<br>
return;<br>
@@ -332,7 +332,7 @@ _mesa_BeginQueryIndexed(GLenum target, GLuint index, GLuint id)<br>
if (*bindpt) {<br>
_mesa_error(ctx, GL_INVALID_OPERATION,<br>
"glBeginQuery{Indexed}(target=%s is active)",<br>
- _mesa_lookup_enum_by_nr(target));<br>
+ _mesa_enum_string(target));<br>
return;<br>
}<br>
<br>
@@ -387,7 +387,7 @@ _mesa_EndQueryIndexed(GLenum target, GLuint index)<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glEndQueryIndexed(%s, %u)\n",<br>
- _mesa_lookup_enum_by_nr(target), index);<br>
+ _mesa_enum_string(target), index);<br>
<br>
if (!query_error_check_index(ctx, target, index))<br>
return;<br>
@@ -407,8 +407,8 @@ _mesa_EndQueryIndexed(GLenum target, GLuint index)<br>
if (q && q->Target != target) {<br>
_mesa_error(ctx, GL_INVALID_OPERATION,<br>
"glEndQuery(target=%s with active query of target %s)",<br>
- _mesa_lookup_enum_by_nr(target),<br>
- _mesa_lookup_enum_by_nr(q->Target));<br>
+ _mesa_enum_string(target),<br>
+ _mesa_enum_string(q->Target));<br>
return;<br>
}<br>
<br>
@@ -444,7 +444,7 @@ _mesa_QueryCounter(GLuint id, GLenum target)<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glQueryCounter(%u, %s)\n", id,<br>
- _mesa_lookup_enum_by_nr(target));<br>
+ _mesa_enum_string(target));<br>
<br>
/* error checking */<br>
if (target != GL_TIMESTAMP) {<br>
@@ -506,9 +506,9 @@ _mesa_GetQueryIndexediv(GLenum target, GLuint index, GLenum pname,<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glGetQueryIndexediv(%s, %u, %s)\n",<br>
- _mesa_lookup_enum_by_nr(target),<br>
+ _mesa_enum_string(target),<br>
index,<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
<br>
if (!query_error_check_index(ctx, target, index))<br>
return;<br>
@@ -557,7 +557,7 @@ _mesa_GetQueryIndexediv(GLenum target, GLuint index, GLenum pname,<br>
default:<br>
_mesa_problem(ctx,<br>
"Unknown target in glGetQueryIndexediv(target = %s)",<br>
- _mesa_lookup_enum_by_nr(target));<br>
+ _mesa_enum_string(target));<br>
*params = 0;<br>
break;<br>
}<br>
@@ -585,7 +585,7 @@ _mesa_GetQueryObjectiv(GLuint id, GLenum pname, GLint *params)<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glGetQueryObjectiv(%u, %s)\n", id,<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
<br>
if (id)<br>
q = _mesa_lookup_query_object(ctx, id);<br>
@@ -636,7 +636,7 @@ _mesa_GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glGetQueryObjectuiv(%u, %s)\n", id,<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
<br>
if (id)<br>
q = _mesa_lookup_query_object(ctx, id);<br>
@@ -690,7 +690,7 @@ _mesa_GetQueryObjecti64v(GLuint id, GLenum pname, GLint64EXT *params)<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glGetQueryObjecti64v(%u, %s)\n", id,<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
<br>
if (id)<br>
q = _mesa_lookup_query_object(ctx, id);<br>
@@ -730,7 +730,7 @@ _mesa_GetQueryObjectui64v(GLuint id, GLenum pname, GLuint64EXT *params)<br>
<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glGetQueryObjectui64v(%u, %s)\n", id,<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
<br>
if (id)<br>
q = _mesa_lookup_query_object(ctx, id);<br>
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c<br>
index 51a0b15..d6af4b2 100644<br>
--- a/src/mesa/main/readpix.c<br>
+++ b/src/mesa/main/readpix.c<br>
@@ -919,8 +919,8 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height,<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
_mesa_debug(ctx, "glReadPixels(%d, %d, %s, %s, %p)\n",<br>
width, height,<br>
- _mesa_lookup_enum_by_nr(format),<br>
- _mesa_lookup_enum_by_nr(type),<br>
+ _mesa_enum_string(format),<br>
+ _mesa_enum_string(type),<br>
pixels);<br>
<br>
if (width < 0 || height < 0) {<br>
@@ -977,8 +977,8 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height,<br>
<br>
if (err != GL_NO_ERROR) {<br>
_mesa_error(ctx, err, "glReadPixels(invalid format %s and/or type %s)",<br>
- _mesa_lookup_enum_by_nr(format),<br>
- _mesa_lookup_enum_by_nr(type));<br>
+ _mesa_enum_string(format),<br>
+ _mesa_enum_string(type));<br>
return;<br>
}<br>
}<br>
@@ -986,8 +986,8 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height,<br>
err = _mesa_error_check_format_and_type(ctx, format, type);<br>
if (err != GL_NO_ERROR) {<br>
_mesa_error(ctx, err, "glReadPixels(invalid format %s and/or type %s)",<br>
- _mesa_lookup_enum_by_nr(format),<br>
- _mesa_lookup_enum_by_nr(type));<br>
+ _mesa_enum_string(format),<br>
+ _mesa_enum_string(type));<br>
return;<br>
}<br>
<br>
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c<br>
index 91b17ab..0b1f957 100644<br>
--- a/src/mesa/main/samplerobj.c<br>
+++ b/src/mesa/main/samplerobj.c<br>
@@ -675,7 +675,7 @@ _mesa_SamplerParameteri(GLuint sampler, GLenum pname, GLint param)<br>
break;<br>
case INVALID_PNAME:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameteri(pname=%s)\n",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
break;<br>
case INVALID_PARAM:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameteri(param=%d)\n",<br>
@@ -760,7 +760,7 @@ _mesa_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)<br>
break;<br>
case INVALID_PNAME:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterf(pname=%s)\n",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
break;<br>
case INVALID_PARAM:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterf(param=%f)\n",<br>
@@ -852,7 +852,7 @@ _mesa_SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *params)<br>
break;<br>
case INVALID_PNAME:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameteriv(pname=%s)\n",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
break;<br>
case INVALID_PARAM:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameteriv(param=%d)\n",<br>
@@ -937,7 +937,7 @@ _mesa_SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *params)<br>
break;<br>
case INVALID_PNAME:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterfv(pname=%s)\n",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
break;<br>
case INVALID_PARAM:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterfv(param=%f)\n",<br>
@@ -1022,7 +1022,7 @@ _mesa_SamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *params)<br>
break;<br>
case INVALID_PNAME:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterIiv(pname=%s)\n",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
break;<br>
case INVALID_PARAM:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterIiv(param=%d)\n",<br>
@@ -1108,7 +1108,7 @@ _mesa_SamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *params)<br>
break;<br>
case INVALID_PNAME:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterIuiv(pname=%s)\n",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
break;<br>
case INVALID_PARAM:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterIuiv(param=%u)\n",<br>
@@ -1198,7 +1198,7 @@ _mesa_GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)<br>
<br>
invalid_pname:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glGetSamplerParameteriv(pname=%s)",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
}<br>
<br>
<br>
@@ -1276,7 +1276,7 @@ _mesa_GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)<br>
<br>
invalid_pname:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glGetSamplerParameterfv(pname=%s)",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
}<br>
<br>
<br>
@@ -1355,7 +1355,7 @@ _mesa_GetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params)<br>
<br>
invalid_pname:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glGetSamplerParameterIiv(pname=%s)",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
}<br>
<br>
<br>
@@ -1434,7 +1434,7 @@ _mesa_GetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params)<br>
<br>
invalid_pname:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glGetSamplerParameterIuiv(pname=%s)",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
}<br>
<br>
<br>
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c<br>
index 8cb0276..d9604c9 100644<br>
--- a/src/mesa/main/shaderapi.c<br>
+++ b/src/mesa/main/shaderapi.c<br>
@@ -619,7 +619,7 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param<br>
}<br>
<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramiv(pname=%s)",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
}<br>
<br>
<br>
@@ -1041,7 +1041,7 @@ _mesa_CreateShader(GLenum type)<br>
{<br>
GET_CURRENT_CONTEXT(ctx);<br>
if (MESA_VERBOSE & VERBOSE_API)<br>
- _mesa_debug(ctx, "glCreateShader %s\n", _mesa_lookup_enum_by_nr(type));<br>
+ _mesa_debug(ctx, "glCreateShader %s\n", _mesa_enum_string(type));<br>
return create_shader(ctx, type);<br>
}<br>
<br>
@@ -1628,7 +1628,7 @@ _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value)<br>
default:<br>
_mesa_error(ctx, GL_INVALID_VALUE,<br>
"glProgramParameteri(geometry input type = %s",<br>
- _mesa_lookup_enum_by_nr(value));<br>
+ _mesa_enum_string(value));<br>
return;<br>
}<br>
return;<br>
@@ -1645,7 +1645,7 @@ _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value)<br>
default:<br>
_mesa_error(ctx, GL_INVALID_VALUE,<br>
"glProgramParameteri(geometry output type = %s",<br>
- _mesa_lookup_enum_by_nr(value));<br>
+ _mesa_enum_string(value));<br>
return;<br>
}<br>
return;<br>
@@ -1667,7 +1667,7 @@ _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value)<br>
_mesa_error(ctx, GL_INVALID_VALUE,<br>
"glProgramParameteri(pname=%s, value=%d): "<br>
"value must be 0 or 1.",<br>
- _mesa_lookup_enum_by_nr(pname),<br>
+ _mesa_enum_string(pname),<br>
value);<br>
return;<br>
}<br>
@@ -1699,7 +1699,7 @@ _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value)<br>
}<br>
<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramParameteri(pname=%s)",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
}<br>
<br>
void<br>
diff --git a/src/mesa/main/tests/enum_strings.cpp b/src/mesa/main/tests/enum_strings.cpp<br>
index 1dae60f..dbe74dd 100644<br>
--- a/src/mesa/main/tests/enum_strings.cpp<br>
+++ b/src/mesa/main/tests/enum_strings.cpp<br>
@@ -40,7 +40,7 @@ TEST(EnumStrings, LookUpByNumber)<br>
{<br>
for (unsigned i = 0; everything[i].name != NULL; i++) {<br>
EXPECT_STREQ(everything[i].name,<br>
- _mesa_lookup_enum_by_nr(everything[i].value));<br>
+ _mesa_enum_string(everything[i].value));<br>
}<br>
}<br>
<br>
@@ -48,7 +48,7 @@ TEST(EnumStrings, LookUpByName)<br>
{<br>
for (unsigned i = 0; everything[i].name != NULL; i++) {<br>
EXPECT_EQ(everything[i].value,<br>
- _mesa_lookup_enum_by_name(everything[i].name));<br>
+ _mesa_enum_value(everything[i].name));<br>
}<br>
}<br>
<br>
@@ -59,13 +59,13 @@ TEST(EnumStrings, LookUpByDuplicateName)<br>
*/<br>
for (unsigned i = 0; alternate_names[i].name != NULL; i++) {<br>
EXPECT_EQ(alternate_names[i].value,<br>
- _mesa_lookup_enum_by_name(alternate_names[i].name));<br>
+ _mesa_enum_value(alternate_names[i].name));<br>
}<br>
}<br>
<br>
TEST(EnumStrings, LookUpUnknownNumber)<br>
{<br>
- EXPECT_STRCASEEQ("0xEEEE", _mesa_lookup_enum_by_nr(0xEEEE));<br>
+ EXPECT_STRCASEEQ("0xEEEE", _mesa_enum_string(0xEEEE));<br>
}<br>
<br>
/* Please type the name and the value. This makes it easier to detect<br>
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c<br>
index 1aadd7f..77b874b 100644<br>
--- a/src/mesa/main/texenv.c<br>
+++ b/src/mesa/main/texenv.c<br>
@@ -42,7 +42,7 @@<br>
<br>
<br>
#define TE_ERROR(errCode, msg, value) \<br>
- _mesa_error(ctx, errCode, msg, _mesa_lookup_enum_by_nr(value));<br>
+ _mesa_error(ctx, errCode, msg, _mesa_enum_string(value));<br>
<br>
<br>
/** Set texture env mode */<br>
@@ -507,16 +507,16 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )<br>
}<br>
else {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(target=%s)",<br>
- _mesa_lookup_enum_by_nr(target));<br>
+ _mesa_enum_string(target));<br>
return;<br>
}<br>
<br>
if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE))<br>
_mesa_debug(ctx, "glTexEnv %s %s %.1f(%s) ...\n",<br>
- _mesa_lookup_enum_by_nr(target),<br>
- _mesa_lookup_enum_by_nr(pname),<br>
+ _mesa_enum_string(target),<br>
+ _mesa_enum_string(pname),<br>
*param,<br>
- _mesa_lookup_enum_by_nr((GLenum) iparam0));<br>
+ _mesa_enum_string((GLenum) iparam0));<br>
<br>
/* Tell device driver about the new texture environment */<br>
if (ctx->Driver.TexEnv) {<br>
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c<br>
index c2f9257..e1aac9a 100644<br>
--- a/src/mesa/main/texformat.c<br>
+++ b/src/mesa/main/texformat.c<br>
@@ -816,7 +816,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,<br>
}<br>
<br>
_mesa_problem(ctx, "unexpected format %s in _mesa_choose_tex_format()",<br>
- _mesa_lookup_enum_by_nr(internalFormat));<br>
+ _mesa_enum_string(internalFormat));<br>
return MESA_FORMAT_NONE;<br>
}<br>
<br>
diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c<br>
index 41e428b..c93c761 100644<br>
--- a/src/mesa/main/texgen.c<br>
+++ b/src/mesa/main/texgen.c<br>
@@ -76,10 +76,10 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )<br>
<br>
if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE))<br>
_mesa_debug(ctx, "glTexGen %s %s %.1f(%s)...\n",<br>
- _mesa_lookup_enum_by_nr(coord),<br>
- _mesa_lookup_enum_by_nr(pname),<br>
+ _mesa_enum_string(coord),<br>
+ _mesa_enum_string(pname),<br>
*params,<br>
- _mesa_lookup_enum_by_nr((GLenum) (GLint) *params));<br>
+ _mesa_enum_string((GLenum) (GLint) *params));<br>
<br>
if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) {<br>
_mesa_error(ctx, GL_INVALID_OPERATION, "glTexGen(current unit)");<br>
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c<br>
index 9aaa63f..81368af 100644<br>
--- a/src/mesa/main/teximage.c<br>
+++ b/src/mesa/main/teximage.c<br>
@@ -1960,8 +1960,8 @@ texture_error_check( struct gl_context *ctx,<br>
_mesa_error(ctx, GL_INVALID_OPERATION,<br>
"glTexImage%dD(format = %s, internalFormat = %s)",<br>
dimensions,<br>
- _mesa_lookup_enum_by_nr(format),<br>
- _mesa_lookup_enum_by_nr(internalFormat));<br>
+ _mesa_enum_string(format),<br>
+ _mesa_enum_string(internalFormat));<br>
return GL_TRUE;<br>
}<br>
<br>
@@ -1971,9 +1971,9 @@ texture_error_check( struct gl_context *ctx,<br>
_mesa_error(ctx, err,<br>
"glTexImage%dD(format = %s, type = %s, internalFormat = %s)",<br>
dimensions,<br>
- _mesa_lookup_enum_by_nr(format),<br>
- _mesa_lookup_enum_by_nr(type),<br>
- _mesa_lookup_enum_by_nr(internalFormat));<br>
+ _mesa_enum_string(format),<br>
+ _mesa_enum_string(type),<br>
+ _mesa_enum_string(internalFormat));<br>
return GL_TRUE;<br>
}<br>
}<br>
@@ -2003,7 +2003,7 @@ texture_error_check( struct gl_context *ctx,<br>
if (_mesa_base_tex_format(ctx, internalFormat) < 0) {<br>
_mesa_error(ctx, GL_INVALID_VALUE,<br>
"glTexImage%dD(internalFormat=%s)",<br>
- dimensions, _mesa_lookup_enum_by_nr(internalFormat));<br>
+ dimensions, _mesa_enum_string(internalFormat));<br>
return GL_TRUE;<br>
}<br>
<br>
@@ -2012,8 +2012,8 @@ texture_error_check( struct gl_context *ctx,<br>
if (err != GL_NO_ERROR) {<br>
_mesa_error(ctx, err,<br>
"glTexImage%dD(incompatible format = %s, type = %s)",<br>
- dimensions, _mesa_lookup_enum_by_nr(format),<br>
- _mesa_lookup_enum_by_nr(type));<br>
+ dimensions, _mesa_enum_string(format),<br>
+ _mesa_enum_string(type));<br>
return GL_TRUE;<br>
}<br>
<br>
@@ -2026,8 +2026,8 @@ texture_error_check( struct gl_context *ctx,<br>
(_mesa_is_dudv_format(internalFormat) != _mesa_is_dudv_format(format))) {<br>
_mesa_error(ctx, GL_INVALID_OPERATION,<br>
"glTexImage%dD(incompatible internalFormat = %s, format = %s)",<br>
- dimensions, _mesa_lookup_enum_by_nr(internalFormat),<br>
- _mesa_lookup_enum_by_nr(format));<br>
+ dimensions, _mesa_enum_string(internalFormat),<br>
+ _mesa_enum_string(format));<br>
return GL_TRUE;<br>
}<br>
<br>
@@ -2300,7 +2300,7 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,<br>
/* check target (proxies not allowed) */<br>
if (!legal_texsubimage_target(ctx, dimensions, target)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glTexSubImage%uD(target=%s)",<br>
- dimensions, _mesa_lookup_enum_by_nr(target));<br>
+ dimensions, _mesa_enum_string(target));<br>
return GL_TRUE;<br>
}<br>
<br>
@@ -2322,8 +2322,8 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,<br>
_mesa_error(ctx, err,<br>
"glTexSubImage%dD(format = %s, type = %s)",<br>
dimensions,<br>
- _mesa_lookup_enum_by_nr(format),<br>
- _mesa_lookup_enum_by_nr(type));<br>
+ _mesa_enum_string(format),<br>
+ _mesa_enum_string(type));<br>
return GL_TRUE;<br>
}<br>
}<br>
@@ -2332,8 +2332,8 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,<br>
if (err != GL_NO_ERROR) {<br>
_mesa_error(ctx, err,<br>
"glTexSubImage%dD(incompatible format = %s, type = %s)",<br>
- dimensions, _mesa_lookup_enum_by_nr(format),<br>
- _mesa_lookup_enum_by_nr(type));<br>
+ dimensions, _mesa_enum_string(format),<br>
+ _mesa_enum_string(type));<br>
return GL_TRUE;<br>
}<br>
<br>
@@ -2413,7 +2413,7 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,<br>
/* check target */<br>
if (!legal_texsubimage_target(ctx, dimensions, target)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glCopyTexImage%uD(target=%s)",<br>
- dimensions, _mesa_lookup_enum_by_nr(target));<br>
+ dimensions, _mesa_enum_string(target));<br>
return GL_TRUE;<br>
}<br>
<br>
@@ -2654,7 +2654,7 @@ copytexsubimage_error_check(struct gl_context *ctx, GLuint dimensions,<br>
/* check target (proxies not allowed) */<br>
if (!legal_texsubimage_target(ctx, dimensions, target)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glCopyTexSubImage%uD(target=%s)",<br>
- dimensions, _mesa_lookup_enum_by_nr(target));<br>
+ dimensions, _mesa_enum_string(target));<br>
return GL_TRUE;<br>
}<br>
<br>
@@ -2915,8 +2915,8 @@ _mesa_choose_texture_format(struct gl_context *ctx,<br>
"DXT compression requested (%s), "<br>
"but libtxc_dxtn library not installed. Using %s "<br>
"instead.",<br>
- _mesa_lookup_enum_by_nr(before),<br>
- _mesa_lookup_enum_by_nr(internalFormat));<br>
+ _mesa_enum_string(before),<br>
+ _mesa_enum_string(internalFormat));<br>
}<br>
}<br>
<br>
@@ -3003,18 +3003,18 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims,<br>
_mesa_debug(ctx,<br>
"glCompressedTexImage%uD %s %d %s %d %d %d %d %p\n",<br>
dims,<br>
- _mesa_lookup_enum_by_nr(target), level,<br>
- _mesa_lookup_enum_by_nr(internalFormat),<br>
+ _mesa_enum_string(target), level,<br>
+ _mesa_enum_string(internalFormat),<br>
width, height, depth, border, pixels);<br>
else<br>
_mesa_debug(ctx,<br>
"glTexImage%uD %s %d %s %d %d %d %d %s %s %p\n",<br>
dims,<br>
- _mesa_lookup_enum_by_nr(target), level,<br>
- _mesa_lookup_enum_by_nr(internalFormat),<br>
+ _mesa_enum_string(target), level,<br>
+ _mesa_enum_string(internalFormat),<br>
width, height, depth, border,<br>
- _mesa_lookup_enum_by_nr(format),<br>
- _mesa_lookup_enum_by_nr(type), pixels);<br>
+ _mesa_enum_string(format),<br>
+ _mesa_enum_string(type), pixels);<br>
}<br>
<br>
internalFormat = override_internal_format(internalFormat, width, height);<br>
@@ -3022,7 +3022,7 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims,<br>
/* target error checking */<br>
if (!legal_teximage_target(ctx, dims, target)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "%s%uD(target=%s)",<br>
- func, dims, _mesa_lookup_enum_by_nr(target));<br>
+ func, dims, _mesa_enum_string(target));<br>
return;<br>
}<br>
<br>
@@ -3309,15 +3309,15 @@ texsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,<br>
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))<br>
_mesa_debug(ctx, "glTexSubImage%uD %s %d %d %d %d %d %d %d %s %s %p\n",<br>
dims,<br>
- _mesa_lookup_enum_by_nr(target), level,<br>
+ _mesa_enum_string(target), level,<br>
xoffset, yoffset, zoffset, width, height, depth,<br>
- _mesa_lookup_enum_by_nr(format),<br>
- _mesa_lookup_enum_by_nr(type), pixels);<br>
+ _mesa_enum_string(format),<br>
+ _mesa_enum_string(type), pixels);<br>
<br>
/* check target (proxies not allowed) */<br>
if (!legal_texsubimage_target(ctx, dims, target)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glTexSubImage%uD(target=%s)",<br>
- dims, _mesa_lookup_enum_by_nr(target));<br>
+ dims, _mesa_enum_string(target));<br>
return;<br>
}<br>
<br>
@@ -3448,8 +3448,8 @@ copyteximage(struct gl_context *ctx, GLuint dims,<br>
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))<br>
_mesa_debug(ctx, "glCopyTexImage%uD %s %d %s %d %d %d %d %d\n",<br>
dims,<br>
- _mesa_lookup_enum_by_nr(target), level,<br>
- _mesa_lookup_enum_by_nr(internalFormat),<br>
+ _mesa_enum_string(target), level,<br>
+ _mesa_enum_string(internalFormat),<br>
x, y, width, height, border);<br>
<br>
if (ctx->NewState & NEW_COPY_TEX_STATE)<br>
@@ -3573,7 +3573,7 @@ copytexsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,<br>
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))<br>
_mesa_debug(ctx, "glCopyTexSubImage%uD %s %d %d %d %d %d %d %d %d\n",<br>
dims,<br>
- _mesa_lookup_enum_by_nr(target),<br>
+ _mesa_enum_string(target),<br>
level, xoffset, yoffset, zoffset, x, y, width, height);<br>
<br>
if (ctx->NewState & NEW_COPY_TEX_STATE)<br>
@@ -4240,14 +4240,14 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples,<br>
if (immutable && !_mesa_is_legal_tex_storage_format(ctx, internalformat)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"%s(internalformat=%s not legal for immutable-format)",<br>
- func, _mesa_lookup_enum_by_nr(internalformat));<br>
+ func, _mesa_enum_string(internalformat));<br>
return;<br>
}<br>
<br>
if (!is_renderable_texture_format(ctx, internalformat)) {<br>
_mesa_error(ctx, GL_INVALID_OPERATION,<br>
"%s(internalformat=%s)",<br>
- func, _mesa_lookup_enum_by_nr(internalformat));<br>
+ func, _mesa_enum_string(internalformat));<br>
return;<br>
}<br>
<br>
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c<br>
index 2168bff..22190f7 100644<br>
--- a/src/mesa/main/texobj.c<br>
+++ b/src/mesa/main/texobj.c<br>
@@ -1230,7 +1230,7 @@ _mesa_BindTexture( GLenum target, GLuint texName )<br>
<br>
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))<br>
_mesa_debug(ctx, "glBindTexture %s %d\n",<br>
- _mesa_lookup_enum_by_nr(target), (GLint) texName);<br>
+ _mesa_enum_string(target), (GLint) texName);<br>
<br>
targetIndex = target_enum_to_index(ctx, target);<br>
if (targetIndex < 0) {<br>
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c<br>
index 9507bc3..1d00c2f 100644<br>
--- a/src/mesa/main/texparam.c<br>
+++ b/src/mesa/main/texparam.c<br>
@@ -582,17 +582,17 @@ set_tex_parameteri(struct gl_context *ctx,<br>
<br>
invalid_pname:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=%s)",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
return GL_FALSE;<br>
<br>
invalid_param:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(param=%s)",<br>
- _mesa_lookup_enum_by_nr(params[0]));<br>
+ _mesa_enum_string(params[0]));<br>
return GL_FALSE;<br>
<br>
invalid_operation:<br>
_mesa_error(ctx, GL_INVALID_OPERATION, "glTexParameter(pname=%s)",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
return GL_FALSE;<br>
}<br>
<br>
@@ -712,12 +712,12 @@ set_tex_parameterf(struct gl_context *ctx,<br>
<br>
invalid_pname:<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=%s)",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
return GL_FALSE;<br>
<br>
invalid_operation:<br>
_mesa_error(ctx, GL_INVALID_OPERATION, "glTexParameter(pname=%s)",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
return GL_FALSE;<br>
}<br>
<br>
@@ -1217,7 +1217,7 @@ get_tex_level_parameter_image(struct gl_context *ctx,<br>
invalid_pname:<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"glGetTexLevelParameter[if]v(pname=%s)",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
}<br>
<br>
<br>
@@ -1328,7 +1328,7 @@ get_tex_level_parameter_buffer(struct gl_context *ctx,<br>
invalid_pname:<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"glGetTexLevelParameter[if]v(pname=%s)",<br>
- _mesa_lookup_enum_by_nr(pname));<br>
+ _mesa_enum_string(pname));<br>
}<br>
<br>
<br>
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c<br>
index 741985c..7fa7638 100644<br>
--- a/src/mesa/main/texstate.c<br>
+++ b/src/mesa/main/texstate.c<br>
@@ -122,21 +122,21 @@ _mesa_print_texunit_state( struct gl_context *ctx, GLuint unit )<br>
{<br>
const struct gl_texture_unit *texUnit = ctx->Texture.Unit + unit;<br>
printf("Texture Unit %d\n", unit);<br>
- printf(" GL_TEXTURE_ENV_MODE = %s\n", _mesa_lookup_enum_by_nr(texUnit->EnvMode));<br>
- printf(" GL_COMBINE_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeRGB));<br>
- printf(" GL_COMBINE_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeA));<br>
- printf(" GL_SOURCE0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[0]));<br>
- printf(" GL_SOURCE1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[1]));<br>
- printf(" GL_SOURCE2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[2]));<br>
- printf(" GL_SOURCE0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[0]));<br>
- printf(" GL_SOURCE1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[1]));<br>
- printf(" GL_SOURCE2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[2]));<br>
- printf(" GL_OPERAND0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[0]));<br>
- printf(" GL_OPERAND1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[1]));<br>
- printf(" GL_OPERAND2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[2]));<br>
- printf(" GL_OPERAND0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[0]));<br>
- printf(" GL_OPERAND1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[1]));<br>
- printf(" GL_OPERAND2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[2]));<br>
+ printf(" GL_TEXTURE_ENV_MODE = %s\n", _mesa_enum_string(texUnit->EnvMode));<br>
+ printf(" GL_COMBINE_RGB = %s\n", _mesa_enum_string(texUnit->Combine.ModeRGB));<br>
+ printf(" GL_COMBINE_ALPHA = %s\n", _mesa_enum_string(texUnit->Combine.ModeA));<br>
+ printf(" GL_SOURCE0_RGB = %s\n", _mesa_enum_string(texUnit->Combine.SourceRGB[0]));<br>
+ printf(" GL_SOURCE1_RGB = %s\n", _mesa_enum_string(texUnit->Combine.SourceRGB[1]));<br>
+ printf(" GL_SOURCE2_RGB = %s\n", _mesa_enum_string(texUnit->Combine.SourceRGB[2]));<br>
+ printf(" GL_SOURCE0_ALPHA = %s\n", _mesa_enum_string(texUnit->Combine.SourceA[0]));<br>
+ printf(" GL_SOURCE1_ALPHA = %s\n", _mesa_enum_string(texUnit->Combine.SourceA[1]));<br>
+ printf(" GL_SOURCE2_ALPHA = %s\n", _mesa_enum_string(texUnit->Combine.SourceA[2]));<br>
+ printf(" GL_OPERAND0_RGB = %s\n", _mesa_enum_string(texUnit->Combine.OperandRGB[0]));<br>
+ printf(" GL_OPERAND1_RGB = %s\n", _mesa_enum_string(texUnit->Combine.OperandRGB[1]));<br>
+ printf(" GL_OPERAND2_RGB = %s\n", _mesa_enum_string(texUnit->Combine.OperandRGB[2]));<br>
+ printf(" GL_OPERAND0_ALPHA = %s\n", _mesa_enum_string(texUnit->Combine.OperandA[0]));<br>
+ printf(" GL_OPERAND1_ALPHA = %s\n", _mesa_enum_string(texUnit->Combine.OperandA[1]));<br>
+ printf(" GL_OPERAND2_ALPHA = %s\n", _mesa_enum_string(texUnit->Combine.OperandA[2]));<br>
printf(" GL_RGB_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftRGB);<br>
printf(" GL_ALPHA_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftA);<br>
printf(" GL_TEXTURE_ENV_COLOR = (%f, %f, %f, %f)\n", texUnit->EnvColor[0], texUnit->EnvColor[1], texUnit->EnvColor[2], texUnit->EnvColor[3]);<br>
@@ -299,11 +299,11 @@ _mesa_ActiveTexture(GLenum texture)<br>
<br>
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))<br>
_mesa_debug(ctx, "glActiveTexture %s\n",<br>
- _mesa_lookup_enum_by_nr(texture));<br>
+ _mesa_enum_string(texture));<br>
<br>
if (texUnit >= k) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glActiveTexture(texture=%s)",<br>
- _mesa_lookup_enum_by_nr(texture));<br>
+ _mesa_enum_string(texture));<br>
return;<br>
}<br>
<br>
@@ -329,7 +329,7 @@ _mesa_ClientActiveTexture(GLenum texture)<br>
<br>
if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE))<br>
_mesa_debug(ctx, "glClientActiveTexture %s\n",<br>
- _mesa_lookup_enum_by_nr(texture));<br>
+ _mesa_enum_string(texture));<br>
<br>
if (texUnit >= ctx->Const.MaxTextureCoordUnits) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "glClientActiveTexture(texture)");<br>
diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c<br>
index 0a53726..f6977f6 100644<br>
--- a/src/mesa/main/texstorage.c<br>
+++ b/src/mesa/main/texstorage.c<br>
@@ -292,7 +292,7 @@ tex_storage_error_check(struct gl_context *ctx, GLuint dims, GLenum target,<br>
if (!_mesa_is_legal_tex_storage_format(ctx, internalformat)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"glTexStorage%uD(internalformat = %s)", dims,<br>
- _mesa_lookup_enum_by_nr(internalformat));<br>
+ _mesa_enum_string(internalformat));<br>
return GL_TRUE;<br>
}<br>
<br>
@@ -307,7 +307,7 @@ tex_storage_error_check(struct gl_context *ctx, GLuint dims, GLenum target,<br>
if (!legal_texobj_target(ctx, dims, target)) {<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"glTexStorage%uD(illegal target=%s)",<br>
- dims, _mesa_lookup_enum_by_nr(target));<br>
+ dims, _mesa_enum_string(target));<br>
return GL_TRUE;<br>
}<br>
<br>
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c<br>
index 9b66ad5..f47f140 100644<br>
--- a/src/mesa/main/texstore.c<br>
+++ b/src/mesa/main/texstore.c<br>
@@ -279,8 +279,8 @@ compute_component_mapping(GLenum inFormat, GLenum outFormat,<br>
<br>
#if 0<br>
printf("from %x/%s to %x/%s map %d %d %d %d %d %d\n",<br>
- inFormat, _mesa_lookup_enum_by_nr(inFormat),<br>
- outFormat, _mesa_lookup_enum_by_nr(outFormat),<br>
+ inFormat, _mesa_enum_string(inFormat),<br>
+ outFormat, _mesa_enum_string(outFormat),<br>
map[0],<br>
map[1],<br>
map[2],<br>
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c<br>
index 6d79df6..68802d1 100644<br>
--- a/src/mesa/main/uniforms.c<br>
+++ b/src/mesa/main/uniforms.c<br>
@@ -723,7 +723,7 @@ _mesa_GetActiveUniformBlockiv(GLuint program,<br>
default:<br>
_mesa_error(ctx, GL_INVALID_ENUM,<br>
"glGetActiveUniformBlockiv(pname 0x%x (%s))",<br>
- pname, _mesa_lookup_enum_by_nr(pname));<br>
+ pname, _mesa_enum_string(pname));<br>
return;<br>
}<br>
}<br>
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c<br>
index 529d933..4fcc9a2 100644<br>
--- a/src/mesa/main/varray.c<br>
+++ b/src/mesa/main/varray.c<br>
@@ -185,7 +185,7 @@ update_array(struct gl_context *ctx,<br>
typeBit = type_to_bit(ctx, type);<br>
if (typeBit == 0x0 || (typeBit & legalTypesMask) == 0x0) {<br>
_mesa_error(ctx, GL_INVALID_ENUM, "%s(type = %s)",<br>
- func, _mesa_lookup_enum_by_nr(type));<br>
+ func, _mesa_enum_string(type));<br>
return;<br>
}<br>
<br>
diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c<br>
index 637ac6f..3fcc4e8 100644<br>
--- a/src/mesa/tnl/t_draw.c<br>
+++ b/src/mesa/tnl/t_draw.c<br>
@@ -457,7 +457,7 @@ void _tnl_draw_prims( struct gl_context *ctx,<br>
printf("%s %d..%d\n", __FUNCTION__, min_index, max_index);<br>
for (i = 0; i < nr_prims; i++)<br>
printf("prim %d: %s start %d count %d\n", i,<br>
- _mesa_lookup_enum_by_nr(prim[i].mode),<br>
+ _mesa_enum_string(prim[i].mode),<br>
prim[i].start,<br>
prim[i].count);<br>
}<br>
diff --git a/src/mesa/tnl/t_vb_render.c b/src/mesa/tnl/t_vb_render.c<br>
index 528f8b5..76b761c 100644<br>
--- a/src/mesa/tnl/t_vb_render.c<br>
+++ b/src/mesa/tnl/t_vb_render.c<br>
@@ -314,7 +314,7 @@ static GLboolean run_render( struct gl_context *ctx,<br>
<br>
if (MESA_VERBOSE & VERBOSE_PRIMS)<br>
_mesa_debug(NULL, "MESA prim %s %d..%d\n",<br>
- _mesa_lookup_enum_by_nr(prim & PRIM_MODE_MASK),<br>
+ _mesa_enum_string(prim & PRIM_MODE_MASK),<br>
start, start+length);<br>
<br>
if (length)<br>
diff --git a/src/mesa/tnl/t_vertex_sse.c b/src/mesa/tnl/t_vertex_sse.c<br>
index e0141c3..f846451 100644<br>
--- a/src/mesa/tnl/t_vertex_sse.c<br>
+++ b/src/mesa/tnl/t_vertex_sse.c<br>
@@ -591,7 +591,7 @@ static GLboolean build_vertex_emit( struct x86_program *p )<br>
break;<br>
case GL_UNSIGNED_SHORT:<br>
default:<br>
- printf("unknown CHAN_TYPE %s\n", _mesa_lookup_enum_by_nr(CHAN_TYPE));<br>
+ printf("unknown CHAN_TYPE %s\n", _mesa_enum_string(CHAN_TYPE));<br>
return GL_FALSE;<br>
}<br>
break;<br>
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h<br>
index 2a1a424..ac41828 100644<br>
--- a/src/mesa/tnl_dd/t_dd_dmatmp.h<br>
+++ b/src/mesa/tnl_dd/t_dd_dmatmp.h<br>
@@ -1256,7 +1256,7 @@ static GLboolean TAG(validate_render)( struct gl_context *ctx,<br>
}<br>
<br>
if (!ok) {<br>
-/* fprintf(stderr, "not ok %s\n", _mesa_lookup_enum_by_nr(prim & PRIM_MODE_MASK)); */<br>
+/* fprintf(stderr, "not ok %s\n", _mesa_enum_string(prim & PRIM_MODE_MASK)); */<br>
return GL_FALSE;<br>
}<br>
}<br>
diff --git a/src/mesa/tnl_dd/t_dd_unfilled.h b/src/mesa/tnl_dd/t_dd_unfilled.h<br>
index 404b6e8..b271410 100644<br>
--- a/src/mesa/tnl_dd/t_dd_unfilled.h<br>
+++ b/src/mesa/tnl_dd/t_dd_unfilled.h<br>
@@ -60,7 +60,7 @@ static void TAG(unfilled_tri)( struct gl_context *ctx,<br>
}<br>
<br>
/* fprintf(stderr, "%s %s %d %d %d\n", __FUNCTION__, */<br>
-/* _mesa_lookup_enum_by_nr( mode ), */<br>
+/* _mesa_enum_string( mode ), */<br>
/* ef[e0], ef[e1], ef[e2]); */<br>
<br>
if (mode == GL_POINT) {<br>
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c<br>
index 9dadd04..2bc755d 100644<br>
--- a/src/mesa/vbo/vbo_exec_array.c<br>
+++ b/src/mesa/vbo/vbo_exec_array.c<br>
@@ -765,7 +765,7 @@ vbo_exec_DrawArrays(GLenum mode, GLint start, GLsizei count)<br>
<br>
if (MESA_VERBOSE & VERBOSE_DRAW)<br>
_mesa_debug(ctx, "glDrawArrays(%s, %d, %d)\n",<br>
- _mesa_lookup_enum_by_nr(mode), start, count);<br>
+ _mesa_enum_string(mode), start, count);<br>
<br>
if (!_mesa_validate_DrawArrays( ctx, mode, start, count ))<br>
return;<br>
@@ -792,7 +792,7 @@ vbo_exec_DrawArraysInstanced(GLenum mode, GLint start, GLsizei count,<br>
<br>
if (MESA_VERBOSE & VERBOSE_DRAW)<br>
_mesa_debug(ctx, "glDrawArraysInstanced(%s, %d, %d, %d)\n",<br>
- _mesa_lookup_enum_by_nr(mode), start, count, numInstances);<br>
+ _mesa_enum_string(mode), start, count, numInstances);<br>
<br>
if (!_mesa_validate_DrawArraysInstanced(ctx, mode, start, count, numInstances))<br>
return;<br>
@@ -818,7 +818,7 @@ vbo_exec_DrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count<br>
<br>
if (MESA_VERBOSE & VERBOSE_DRAW)<br>
_mesa_debug(ctx, "glDrawArraysInstancedBaseInstance(%s, %d, %d, %d, %d)\n",<br>
- _mesa_lookup_enum_by_nr(mode), first, count,<br>
+ _mesa_enum_string(mode), first, count,<br>
numInstances, baseInstance);<br>
<br>
if (!_mesa_validate_DrawArraysInstanced(ctx, mode, first, count,<br>
@@ -992,8 +992,8 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode,<br>
if (MESA_VERBOSE & VERBOSE_DRAW)<br>
_mesa_debug(ctx,<br>
"glDrawRangeElementsBaseVertex(%s, %u, %u, %d, %s, %p, %d)\n",<br>
- _mesa_lookup_enum_by_nr(mode), start, end, count,<br>
- _mesa_lookup_enum_by_nr(type), indices, basevertex);<br>
+ _mesa_enum_string(mode), start, end, count,<br>
+ _mesa_enum_string(type), indices, basevertex);<br>
<br>
if (!_mesa_validate_DrawRangeElements( ctx, mode, start, end, count,<br>
type, indices, basevertex ))<br>
@@ -1089,8 +1089,8 @@ vbo_exec_DrawRangeElements(GLenum mode, GLuint start, GLuint end,<br>
GET_CURRENT_CONTEXT(ctx);<br>
_mesa_debug(ctx,<br>
"glDrawRangeElements(%s, %u, %u, %d, %s, %p)\n",<br>
- _mesa_lookup_enum_by_nr(mode), start, end, count,<br>
- _mesa_lookup_enum_by_nr(type), indices);<br>
+ _mesa_enum_string(mode), start, end, count,<br>
+ _mesa_enum_string(type), indices);<br>
}<br>
<br>
vbo_exec_DrawRangeElementsBaseVertex(mode, start, end, count, type,<br>
@@ -1109,8 +1109,8 @@ vbo_exec_DrawElements(GLenum mode, GLsizei count, GLenum type,<br>
<br>
if (MESA_VERBOSE & VERBOSE_DRAW)<br>
_mesa_debug(ctx, "glDrawElements(%s, %u, %s, %p)\n",<br>
- _mesa_lookup_enum_by_nr(mode), count,<br>
- _mesa_lookup_enum_by_nr(type), indices);<br>
+ _mesa_enum_string(mode), count,<br>
+ _mesa_enum_string(type), indices);<br>
<br>
if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices, 0 ))<br>
return;<br>
@@ -1131,8 +1131,8 @@ vbo_exec_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type,<br>
<br>
if (MESA_VERBOSE & VERBOSE_DRAW)<br>
_mesa_debug(ctx, "glDrawElementsBaseVertex(%s, %d, %s, %p, %d)\n",<br>
- _mesa_lookup_enum_by_nr(mode), count,<br>
- _mesa_lookup_enum_by_nr(type), indices, basevertex);<br>
+ _mesa_enum_string(mode), count,<br>
+ _mesa_enum_string(type), indices, basevertex);<br>
<br>
if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices,<br>
basevertex ))<br>
@@ -1154,8 +1154,8 @@ vbo_exec_DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type,<br>
<br>
if (MESA_VERBOSE & VERBOSE_DRAW)<br>
_mesa_debug(ctx, "glDrawElementsInstanced(%s, %d, %s, %p, %d)\n",<br>
- _mesa_lookup_enum_by_nr(mode), count,<br>
- _mesa_lookup_enum_by_nr(type), indices, numInstances);<br>
+ _mesa_enum_string(mode), count,<br>
+ _mesa_enum_string(type), indices, numInstances);<br>
<br>
if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,<br>
numInstances, 0))<br>
@@ -1178,8 +1178,8 @@ vbo_exec_DrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type<br>
<br>
if (MESA_VERBOSE & VERBOSE_DRAW)<br>
_mesa_debug(ctx, "glDrawElementsInstancedBaseVertex(%s, %d, %s, %p, %d; %d)\n",<br>
- _mesa_lookup_enum_by_nr(mode), count,<br>
- _mesa_lookup_enum_by_nr(type), indices,<br>
+ _mesa_enum_string(mode), count,<br>
+ _mesa_enum_string(type), indices,<br>
numInstances, basevertex);<br>
<br>
if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,<br>
@@ -1203,8 +1203,8 @@ vbo_exec_DrawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum ty<br>
<br>
if (MESA_VERBOSE & VERBOSE_DRAW)<br>
_mesa_debug(ctx, "glDrawElementsInstancedBaseInstance(%s, %d, %s, %p, %d, %d)\n",<br>
- _mesa_lookup_enum_by_nr(mode), count,<br>
- _mesa_lookup_enum_by_nr(type), indices,<br>
+ _mesa_enum_string(mode), count,<br>
+ _mesa_enum_string(type), indices,<br>
numInstances, baseInstance);<br>
<br>
if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,<br>
@@ -1229,8 +1229,8 @@ vbo_exec_DrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count,<br>
<br>
if (MESA_VERBOSE & VERBOSE_DRAW)<br>
_mesa_debug(ctx, "glDrawElementsInstancedBaseVertexBaseInstance(%s, %d, %s, %p, %d, %d, %d)\n",<br>
- _mesa_lookup_enum_by_nr(mode), count,<br>
- _mesa_lookup_enum_by_nr(type), indices,<br>
+ _mesa_enum_string(mode), count,<br>
+ _mesa_enum_string(type), indices,<br>
numInstances, basevertex, baseInstance);<br>
<br>
if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,<br>
@@ -1456,7 +1456,7 @@ vbo_exec_DrawTransformFeedback(GLenum mode, GLuint name)<br>
<br>
if (MESA_VERBOSE & VERBOSE_DRAW)<br>
_mesa_debug(ctx, "glDrawTransformFeedback(%s, %d)\n",<br>
- _mesa_lookup_enum_by_nr(mode), name);<br>
+ _mesa_enum_string(mode), name);<br>
<br>
vbo_draw_transform_feedback(ctx, mode, obj, 0, 1);<br>
}<br>
@@ -1470,7 +1470,7 @@ vbo_exec_DrawTransformFeedbackStream(GLenum mode, GLuint name, GLuint stream)<br>
<br>
if (MESA_VERBOSE & VERBOSE_DRAW)<br>
_mesa_debug(ctx, "glDrawTransformFeedbackStream(%s, %u, %u)\n",<br>
- _mesa_lookup_enum_by_nr(mode), name, stream);<br>
+ _mesa_enum_string(mode), name, stream);<br>
<br>
vbo_draw_transform_feedback(ctx, mode, obj, stream, 1);<br>
}<br>
@@ -1485,7 +1485,7 @@ vbo_exec_DrawTransformFeedbackInstanced(GLenum mode, GLuint name,<br>
<br>
if (MESA_VERBOSE & VERBOSE_DRAW)<br>
_mesa_debug(ctx, "glDrawTransformFeedbackInstanced(%s, %d)\n",<br>
- _mesa_lookup_enum_by_nr(mode), name);<br>
+ _mesa_enum_string(mode), name);<br>
<br>
vbo_draw_transform_feedback(ctx, mode, obj, 0, primcount);<br>
}<br>
@@ -1501,7 +1501,7 @@ vbo_exec_DrawTransformFeedbackStreamInstanced(GLenum mode, GLuint name,<br>
if (MESA_VERBOSE & VERBOSE_DRAW)<br>
_mesa_debug(ctx, "glDrawTransformFeedbackStreamInstanced"<br>
"(%s, %u, %u, %i)\n",<br>
- _mesa_lookup_enum_by_nr(mode), name, stream, primcount);<br>
+ _mesa_enum_string(mode), name, stream, primcount);<br>
<br>
vbo_draw_transform_feedback(ctx, mode, obj, stream, primcount);<br>
}<br>
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c<br>
index 1075bd5..22236ab 100644<br>
--- a/src/mesa/vbo/vbo_exec_draw.c<br>
+++ b/src/mesa/vbo/vbo_exec_draw.c<br>
@@ -53,7 +53,7 @@ vbo_exec_debug_verts( struct vbo_exec_context *exec )<br>
struct _mesa_prim *prim = &exec->vtx.prim[i];<br>
printf(" prim %d: %s%s %d..%d %s %s\n",<br>
i,<br>
- _mesa_lookup_prim_by_nr(prim->mode),<br>
+ _mesa_prim_string(prim->mode),<br>
prim->weak ? " (weak)" : "",<br>
prim->start,<br>
prim->start + prim->count,<br>
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c<br>
index 26951bd..1fcf2bf 100644<br>
--- a/src/mesa/vbo/vbo_save_api.c<br>
+++ b/src/mesa/vbo/vbo_save_api.c<br>
@@ -1508,7 +1508,7 @@ vbo_print_vertex_list(struct gl_context *ctx, void *data)<br>
struct _mesa_prim *prim = &node->prim[i];<br>
printf(" prim %d: %s%s %d..%d %s %s\n",<br>
i,<br>
- _mesa_lookup_prim_by_nr(prim->mode),<br>
+ _mesa_prim_string(prim->mode),<br>
prim->weak ? " (weak)" : "",<br>
prim->start,<br>
prim->start + prim->count,<br>
diff --git a/src/mesa/vbo/vbo_save_loopback.c b/src/mesa/vbo/vbo_save_loopback.c<br>
index 31343cd..6627338 100644<br>
--- a/src/mesa/vbo/vbo_save_loopback.c<br>
+++ b/src/mesa/vbo/vbo_save_loopback.c<br>
@@ -95,7 +95,7 @@ static void loopback_prim( struct gl_context *ctx,<br>
<br>
if (0)<br>
printf("loopback prim %s(%s,%s) verts %d..%d\n",<br>
- _mesa_lookup_prim_by_nr(prim->mode),<br>
+ _mesa_prim_string(prim->mode),<br>
prim->begin ? "begin" : "..",<br>
prim->end ? "end" : "..",<br>
start,<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3<br>
<br>
</font></span></blockquote></div><br></div>