[Mesa-dev] [PATCH v2] Renamed functions for file enums.c
Arnas Milasevicius
giant1gf at gmail.com
Wed Jun 5 08:59:27 PDT 2013
_mesa_prim_nr changed in:
src/mesa/main/api_validate.c
src/mesa/main/api_validate.c
src/mesa/main/enums.h
src/mesa/vbo/vbo_exec_draw.c
src/mesa/vbo/vbo_save_api.c
src/mesa/vbo/vbo_save_loopback.c
_mesa_enum_name changed in:
src/mesa/main/enums.h
src/mesa/main/tests/enum_strings.cpp
src/mesa/main/tests/enum_strings.cpp
_mesa_enum_nr changed in:
Pretty much in these and other files
---
src/mapi/glapi/gen/gl_enums.py | 6 +-
src/mesa/drivers/common/meta.c | 2 +-
src/mesa/drivers/dri/i915/i830_state.c | 20 +++----
src/mesa/drivers/dri/i915/intel_render.c | 2 +-
src/mesa/drivers/dri/i915/intel_tris.c | 4 +-
src/mesa/drivers/dri/i965/brw_draw.c | 10 ++--
src/mesa/drivers/dri/i965/brw_draw_upload.c | 2 +-
src/mesa/drivers/dri/i965/gen6_cc.c | 4 +-
src/mesa/drivers/dri/intel/intel_fbo.c | 2 +-
src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 2 +-
src/mesa/drivers/dri/intel/intel_tex_image.c | 2 +-
src/mesa/drivers/dri/intel/intel_tex_subimage.c | 2 +-
src/mesa/drivers/dri/r200/r200_state.c | 2 +-
src/mesa/drivers/dri/r200/r200_tex.c | 20 +++----
src/mesa/drivers/dri/radeon/radeon_common.c | 2 +-
src/mesa/drivers/dri/radeon/radeon_fbo.c | 2 +-
src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c | 2 +-
src/mesa/drivers/dri/radeon/radeon_pixel_read.c | 2 +-
src/mesa/drivers/dri/radeon/radeon_state.c | 2 +-
src/mesa/drivers/dri/radeon/radeon_swtcl.c | 2 +-
src/mesa/drivers/dri/radeon/radeon_tex.c | 6 +-
src/mesa/drivers/dri/radeon/radeon_texture.c | 4 +-
src/mesa/main/api_validate.c | 6 +-
src/mesa/main/atifragshader.c | 30 +++++-----
src/mesa/main/attrib.c | 2 +-
src/mesa/main/blend.c | 34 ++++++------
src/mesa/main/bufferobj.c | 10 ++--
src/mesa/main/clear.c | 8 +--
src/mesa/main/condrender.c | 4 +-
src/mesa/main/debug.c | 2 +-
src/mesa/main/depth.c | 2 +-
src/mesa/main/dlist.c | 14 ++---
src/mesa/main/drawpix.c | 18 +++---
src/mesa/main/enable.c | 12 ++--
src/mesa/main/enums.h | 6 +-
src/mesa/main/errors.c | 4 +-
src/mesa/main/fbobject.c | 30 +++++-----
src/mesa/main/feedback.c | 2 +-
src/mesa/main/formatquery.c | 8 +--
src/mesa/main/get.c | 8 +--
src/mesa/main/getstring.c | 4 +-
src/mesa/main/hint.c | 4 +-
src/mesa/main/light.c | 6 +-
src/mesa/main/matrix.c | 8 +--
src/mesa/main/pack.c | 10 ++--
src/mesa/main/pack_tmp.h | 2 +-
src/mesa/main/polygon.c | 8 +--
src/mesa/main/queryobj.c | 26 ++++-----
src/mesa/main/readpix.c | 12 ++--
src/mesa/main/samplerobj.c | 20 +++----
src/mesa/main/shaderapi.c | 12 ++--
src/mesa/main/tests/enum_strings.cpp | 8 +--
src/mesa/main/texenv.c | 10 ++--
src/mesa/main/texformat.c | 2 +-
src/mesa/main/texgen.c | 6 +-
src/mesa/main/teximage.c | 70 ++++++++++++------------
src/mesa/main/texobj.c | 2 +-
src/mesa/main/texparam.c | 14 ++---
src/mesa/main/texstate.c | 36 ++++++------
src/mesa/main/texstorage.c | 4 +-
src/mesa/main/texstore.c | 4 +-
src/mesa/main/uniforms.c | 2 +-
src/mesa/tnl/t_draw.c | 2 +-
src/mesa/tnl/t_vb_render.c | 2 +-
src/mesa/tnl/t_vertex_sse.c | 2 +-
src/mesa/tnl_dd/t_dd_dmatmp.h | 2 +-
src/mesa/tnl_dd/t_dd_unfilled.h | 2 +-
src/mesa/vbo/vbo_exec_array.c | 46 ++++++++--------
src/mesa/vbo/vbo_exec_draw.c | 2 +-
src/mesa/vbo/vbo_save_api.c | 2 +-
src/mesa/vbo/vbo_save_loopback.c | 2 +-
71 files changed, 317 insertions(+), 317 deletions(-)
diff --git a/src/mapi/glapi/gen/gl_enums.py b/src/mapi/glapi/gen/gl_enums.py
index 806d384..ba19196 100644
--- a/src/mapi/glapi/gen/gl_enums.py
+++ b/src/mapi/glapi/gen/gl_enums.py
@@ -91,7 +91,7 @@ static int compar_nr( const int *a, const unsigned *b )
static char token_tmp[20];
-const char *_mesa_lookup_enum_by_nr( int nr )
+const char *_mesa_enum_nr( int nr )
{
unsigned * i;
@@ -138,7 +138,7 @@ static const char *prim_names[PRIM_MAX+3] = {
* GL_FALSE/GL_POINTS ambiguity and others.
*/
const char *
-_mesa_lookup_prim_by_nr(GLuint nr)
+_mesa_prim_nr(GLuint nr)
{
if (nr < Elements(prim_names))
return prim_names[nr];
@@ -147,7 +147,7 @@ _mesa_lookup_prim_by_nr(GLuint nr)
}
-int _mesa_lookup_enum_by_name( const char *symbol )
+int _mesa_enum_name( const char *symbol )
{
enum_elt * f = NULL;
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 1250bd3..4baab8a 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -3060,7 +3060,7 @@ _mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target,
target == GL_TEXTURE_2D_ARRAY) {
_mesa_perf_debug(ctx, MESA_DEBUG_SEVERITY_HIGH,
"glGenerateMipmap() to %s target\n",
- _mesa_lookup_enum_by_nr(target));
+ _mesa_enum_nr(target));
return GL_TRUE;
}
diff --git a/src/mesa/drivers/dri/i915/i830_state.c b/src/mesa/drivers/dri/i915/i830_state.c
index cedc58a..a1a9e4d 100644
--- a/src/mesa/drivers/dri/i915/i830_state.c
+++ b/src/mesa/drivers/dri/i915/i830_state.c
@@ -57,7 +57,7 @@ i830StencilFuncSeparate(struct gl_context * ctx, GLenum face, GLenum func, GLint
mask = mask & 0xff;
DBG("%s : func: %s, ref : 0x%x, mask: 0x%x\n", __FUNCTION__,
- _mesa_lookup_enum_by_nr(func), ref, mask);
+ _mesa_enum_nr(func), ref, mask);
I830_STATECHANGE(i830, I830_UPLOAD_CTX);
@@ -95,9 +95,9 @@ i830StencilOpSeparate(struct gl_context * ctx, GLenum face, GLenum fail, GLenum
int fop, dfop, dpop;
DBG("%s: fail : %s, zfail: %s, zpass : %s\n", __FUNCTION__,
- _mesa_lookup_enum_by_nr(fail),
- _mesa_lookup_enum_by_nr(zfail),
- _mesa_lookup_enum_by_nr(zpass));
+ _mesa_enum_nr(fail),
+ _mesa_enum_nr(zfail),
+ _mesa_enum_nr(zpass));
fop = 0;
dfop = 0;
@@ -389,8 +389,8 @@ static void
i830BlendEquationSeparate(struct gl_context * ctx, GLenum modeRGB, GLenum modeA)
{
DBG("%s -> %s, %s\n", __FUNCTION__,
- _mesa_lookup_enum_by_nr(modeRGB),
- _mesa_lookup_enum_by_nr(modeA));
+ _mesa_enum_nr(modeRGB),
+ _mesa_enum_nr(modeA));
(void) modeRGB;
(void) modeA;
@@ -403,10 +403,10 @@ i830BlendFuncSeparate(struct gl_context * ctx, GLenum sfactorRGB,
GLenum dfactorRGB, GLenum sfactorA, GLenum dfactorA)
{
DBG("%s -> RGB(%s, %s) A(%s, %s)\n", __FUNCTION__,
- _mesa_lookup_enum_by_nr(sfactorRGB),
- _mesa_lookup_enum_by_nr(dfactorRGB),
- _mesa_lookup_enum_by_nr(sfactorA),
- _mesa_lookup_enum_by_nr(dfactorA));
+ _mesa_enum_nr(sfactorRGB),
+ _mesa_enum_nr(dfactorRGB),
+ _mesa_enum_nr(sfactorA),
+ _mesa_enum_nr(dfactorA));
(void) sfactorRGB;
(void) dfactorRGB;
diff --git a/src/mesa/drivers/dri/i915/intel_render.c b/src/mesa/drivers/dri/i915/intel_render.c
index 6afd738..0bce4d7 100644
--- a/src/mesa/drivers/dri/i915/intel_render.c
+++ b/src/mesa/drivers/dri/i915/intel_render.c
@@ -113,7 +113,7 @@ static void
intelDmaPrimitive(struct intel_context *intel, GLenum prim)
{
if (0)
- fprintf(stderr, "%s %s\n", __FUNCTION__, _mesa_lookup_enum_by_nr(prim));
+ fprintf(stderr, "%s %s\n", __FUNCTION__, _mesa_enum_nr(prim));
INTEL_FIREVERTICES(intel);
intel->vtbl.reduced_primitive_state(intel, reduced_prim[prim]);
intel_set_prim(intel, hw_prim[prim]);
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index 7c60d84..1f30d4f 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -1136,7 +1136,7 @@ intelRasterPrimitive(struct gl_context * ctx, GLenum rprim, GLuint hwprim)
if (0)
fprintf(stderr, "%s %s %x\n", __FUNCTION__,
- _mesa_lookup_enum_by_nr(rprim), hwprim);
+ _mesa_enum_nr(rprim), hwprim);
intel->vtbl.reduced_primitive_state(intel, rprim);
@@ -1160,7 +1160,7 @@ intelRenderPrimitive(struct gl_context * ctx, GLenum prim)
ctx->Polygon.BackMode != GL_FILL);
if (0)
- fprintf(stderr, "%s %s\n", __FUNCTION__, _mesa_lookup_enum_by_nr(prim));
+ fprintf(stderr, "%s %s\n", __FUNCTION__, _mesa_enum_nr(prim));
/* Let some clipping routines know which primitive they're dealing
* with.
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 657d6ee..1b53975 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -92,7 +92,7 @@ static void brw_set_prim(struct brw_context *brw,
struct gl_context *ctx = &brw->intel.ctx;
uint32_t hw_prim = prim_to_hw_prim[prim->mode];
- DBG("PRIM: %s\n", _mesa_lookup_enum_by_nr(prim->mode));
+ DBG("PRIM: %s\n", _mesa_enum_nr(prim->mode));
/* Slight optimization to avoid the GS program when not needed:
*/
@@ -125,7 +125,7 @@ static void gen6_set_prim(struct brw_context *brw,
{
uint32_t hw_prim;
- DBG("PRIM: %s\n", _mesa_lookup_enum_by_nr(prim->mode));
+ DBG("PRIM: %s\n", _mesa_enum_nr(prim->mode));
hw_prim = prim_to_hw_prim[prim->mode];
@@ -165,7 +165,7 @@ static void brw_emit_prim(struct brw_context *brw,
int start_vertex_location;
int base_vertex_location;
- DBG("PRIM: %s %d %d\n", _mesa_lookup_enum_by_nr(prim->mode),
+ DBG("PRIM: %s %d %d\n", _mesa_enum_nr(prim->mode),
prim->start, prim->count);
start_vertex_location = prim->start;
@@ -226,7 +226,7 @@ static void gen7_emit_prim(struct brw_context *brw,
int start_vertex_location;
int base_vertex_location;
- DBG("PRIM: %s %d %d\n", _mesa_lookup_enum_by_nr(prim->mode),
+ DBG("PRIM: %s %d %d\n", _mesa_enum_nr(prim->mode),
prim->start, prim->count);
start_vertex_location = prim->start;
@@ -517,7 +517,7 @@ void brw_draw_prims( struct gl_context *ctx,
*/
if (ctx->RenderMode != GL_RENDER) {
perf_debug("%s render mode not supported in hardware\n",
- _mesa_lookup_enum_by_nr(ctx->RenderMode));
+ _mesa_enum_nr(ctx->RenderMode));
_swsetup_Wakeup(ctx);
_tnl_wakeup(ctx);
_tnl_draw_prims(ctx, arrays, prim, nr_prims, ib, min_index, max_index);
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 2ded14b..ec7ff85 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -230,7 +230,7 @@ get_surface_type(struct intel_context *intel,
if (unlikely(INTEL_DEBUG & DEBUG_VERTS))
printf("type %s size %d normalized %d\n",
- _mesa_lookup_enum_by_nr(glarray->Type),
+ _mesa_enum_nr(glarray->Type),
glarray->Size, glarray->Normalized);
if (glarray->Integer) {
diff --git a/src/mesa/drivers/dri/i965/gen6_cc.c b/src/mesa/drivers/dri/i965/gen6_cc.c
index e4ec170..94ec738 100644
--- a/src/mesa/drivers/dri/i965/gen6_cc.c
+++ b/src/mesa/drivers/dri/i965/gen6_cc.c
@@ -97,8 +97,8 @@ gen6_upload_blend_state(struct brw_context *brw)
rb_type != GL_UNSIGNED_NORMALIZED &&
rb_type != GL_FLOAT, "Ignoring %s logic op on %s "
"renderbuffer\n",
- _mesa_lookup_enum_by_nr(ctx->Color.LogicOp),
- _mesa_lookup_enum_by_nr(rb_type));
+ _mesa_enum_nr(ctx->Color.LogicOp),
+ _mesa_enum_nr(rb_type));
if (rb_type == GL_UNSIGNED_NORMALIZED) {
blend[b].blend1.logic_op_enable = 1;
blend[b].blend1.logic_op_func =
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 9f892a9..9f8a146 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -248,7 +248,7 @@ intel_alloc_renderbuffer_storage(struct gl_context * ctx, struct gl_renderbuffer
intel_miptree_release(&irb->mt);
DBG("%s: %s: %s (%dx%d)\n", __FUNCTION__,
- _mesa_lookup_enum_by_nr(internalFormat),
+ _mesa_enum_nr(internalFormat),
_mesa_get_format_name(rb->Format), width, height);
if (width == 0 || height == 0)
diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index c336c46..28641fb 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -143,7 +143,7 @@ intel_miptree_create_layout(struct intel_context *intel,
struct intel_mipmap_tree *mt = calloc(sizeof(*mt), 1);
DBG("%s target %s format %s level %d..%d <-- %p\n", __FUNCTION__,
- _mesa_lookup_enum_by_nr(target),
+ _mesa_enum_nr(target),
_mesa_get_format_name(format),
first_level, last_level, mt);
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index fba02c2..82afd88 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -196,7 +196,7 @@ intelTexImage(struct gl_context * ctx,
bool ok;
DBG("%s target %s level %d %dx%dx%d\n", __FUNCTION__,
- _mesa_lookup_enum_by_nr(texImage->TexObject->Target),
+ _mesa_enum_nr(texImage->TexObject->Target),
texImage->Level, texImage->Width, texImage->Height, texImage->Depth);
ok = intel_texsubimage_tiled_memcpy(ctx, dims, texImage,
diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
index bd178bb..d6df2d9 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
@@ -78,7 +78,7 @@ intel_blit_texsubimage(struct gl_context * ctx,
DBG("BLT subimage %s target %s level %d offset %d,%d %dx%d\n",
__FUNCTION__,
- _mesa_lookup_enum_by_nr(texImage->TexObject->Target),
+ _mesa_enum_nr(texImage->TexObject->Target),
texImage->Level, xoffset, yoffset, width, height);
pixels = _mesa_validate_pbo_teximage(ctx, 2, width, height, 1,
diff --git a/src/mesa/drivers/dri/r200/r200_state.c b/src/mesa/drivers/dri/r200/r200_state.c
index d3e8114..0f52e7f 100644
--- a/src/mesa/drivers/dri/r200/r200_state.c
+++ b/src/mesa/drivers/dri/r200/r200_state.c
@@ -1722,7 +1722,7 @@ static void r200Enable( struct gl_context *ctx, GLenum cap, GLboolean state )
if ( R200_DEBUG & RADEON_STATE )
fprintf( stderr, "%s( %s = %s )\n", __FUNCTION__,
- _mesa_lookup_enum_by_nr( cap ),
+ _mesa_enum_nr( cap ),
state ? "GL_TRUE" : "GL_FALSE" );
switch ( cap ) {
diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c
index 31a65c8..5d5f8d7 100644
--- a/src/mesa/drivers/dri/r200/r200_tex.c
+++ b/src/mesa/drivers/dri/r200/r200_tex.c
@@ -68,9 +68,9 @@ static void r200SetTexWrap( radeonTexObjPtr t, GLenum swrap, GLenum twrap, GLenu
radeon_print(RADEON_TEXTURE, RADEON_TRACE,
"%s(tex %p) sw %s, tw %s, rw %s\n",
__func__, t,
- _mesa_lookup_enum_by_nr(swrap),
- _mesa_lookup_enum_by_nr(twrap),
- _mesa_lookup_enum_by_nr(rwrap));
+ _mesa_enum_nr(swrap),
+ _mesa_enum_nr(twrap),
+ _mesa_enum_nr(rwrap));
t->pp_txfilter &= ~(R200_CLAMP_S_MASK | R200_CLAMP_T_MASK | R200_BORDER_MODE_D3D);
@@ -225,8 +225,8 @@ static void r200SetTexFilter( radeonTexObjPtr t, GLenum minf, GLenum magf )
radeon_print(RADEON_TEXTURE, RADEON_TRACE,
"%s(tex %p) minf %s, maxf %s, anisotropy %d.\n",
__func__, t,
- _mesa_lookup_enum_by_nr(minf),
- _mesa_lookup_enum_by_nr(magf),
+ _mesa_enum_nr(minf),
+ _mesa_enum_nr(magf),
anisotropy);
if ( anisotropy == R200_MAX_ANISO_1_TO_1 ) {
@@ -302,7 +302,7 @@ static void r200TexEnv( struct gl_context *ctx, GLenum target,
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
radeon_print(RADEON_TEXTURE | RADEON_STATE, RADEON_VERBOSE, "%s( %s )\n",
- __FUNCTION__, _mesa_lookup_enum_by_nr( pname ) );
+ __FUNCTION__, _mesa_enum_nr( pname ) );
/* This is incorrect: Need to maintain this data for each of
* GL_TEXTURE_{123}D, GL_TEXTURE_RECTANGLE_NV, etc, and switch
@@ -384,8 +384,8 @@ static void r200TexParameter( struct gl_context *ctx, GLenum target,
radeon_print(RADEON_TEXTURE | RADEON_STATE, RADEON_VERBOSE,
"%s(%p, tex %p) target %s, pname %s\n",
__FUNCTION__, ctx, texObj,
- _mesa_lookup_enum_by_nr( target ),
- _mesa_lookup_enum_by_nr( pname ) );
+ _mesa_enum_nr( target ),
+ _mesa_enum_nr( pname ) );
switch ( pname ) {
case GL_TEXTURE_MIN_FILTER:
@@ -416,7 +416,7 @@ static void r200DeleteTexture(struct gl_context * ctx, struct gl_texture_object
radeon_print(RADEON_TEXTURE | RADEON_STATE, RADEON_NORMAL,
"%s( %p (target = %s) )\n", __FUNCTION__,
(void *)texObj,
- _mesa_lookup_enum_by_nr(texObj->Target));
+ _mesa_enum_nr(texObj->Target));
if (rmesa) {
int i;
@@ -474,7 +474,7 @@ static struct gl_texture_object *r200NewTextureObject(struct gl_context * ctx,
radeon_print(RADEON_STATE | RADEON_TEXTURE, RADEON_NORMAL,
"%s(%p) target %s, new texture %p.\n",
__FUNCTION__, ctx,
- _mesa_lookup_enum_by_nr(target), t);
+ _mesa_enum_nr(target), t);
_mesa_initialize_texture_object(&t->base, name, target);
t->base.Sampler.MaxAnisotropy = rmesa->radeon.initialMaxAnisotropy;
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 0cf656b..fb0cca9 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -356,7 +356,7 @@ void radeonDrawBuffer( struct gl_context *ctx, GLenum mode )
{
if (RADEON_DEBUG & RADEON_DRI)
fprintf(stderr, "%s %s\n", __FUNCTION__,
- _mesa_lookup_enum_by_nr( mode ));
+ _mesa_enum_nr( mode ));
if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {
radeonContextPtr radeon = RADEON_CONTEXT(ctx);
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
index 63bc7e8..da4f8ae 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -732,7 +732,7 @@ radeon_bind_framebuffer(struct gl_context * ctx, GLenum target,
radeon_print(RADEON_TEXTURE, RADEON_TRACE,
"%s(%p, fb %p, target %s) \n",
__func__, ctx, fb,
- _mesa_lookup_enum_by_nr(target));
+ _mesa_enum_nr(target));
if (target == GL_FRAMEBUFFER_EXT || target == GL_DRAW_FRAMEBUFFER_EXT) {
radeon_draw_buffer(ctx, fb);
diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
index 4cb1838..c316900 100644
--- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
+++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c
@@ -276,7 +276,7 @@ static void calculate_min_max_lod(struct gl_sampler_object *samp, struct gl_text
radeon_print(RADEON_TEXTURE, RADEON_TRACE,
"%s(%p) target %s, min %d, max %d.\n",
__func__, tObj,
- _mesa_lookup_enum_by_nr(tObj->Target),
+ _mesa_enum_nr(tObj->Target),
minLod, maxLod);
/* save these values */
diff --git a/src/mesa/drivers/dri/radeon/radeon_pixel_read.c b/src/mesa/drivers/dri/radeon/radeon_pixel_read.c
index db5e01d..5798750 100644
--- a/src/mesa/drivers/dri/radeon/radeon_pixel_read.c
+++ b/src/mesa/drivers/dri/radeon/radeon_pixel_read.c
@@ -212,7 +212,7 @@ radeonReadPixels(struct gl_context * ctx,
*/
radeon_print(RADEON_FALLBACKS, RADEON_NORMAL,
"Falling back to sw for ReadPixels (format %s, type %s)\n",
- _mesa_lookup_enum_by_nr(format), _mesa_lookup_enum_by_nr(type));
+ _mesa_enum_nr(format), _mesa_enum_nr(type));
if (ctx->NewState)
_mesa_update_state(ctx);
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 70542f6..a2c8816 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -1505,7 +1505,7 @@ static void radeonEnable( struct gl_context *ctx, GLenum cap, GLboolean state )
if ( RADEON_DEBUG & RADEON_STATE )
fprintf( stderr, "%s( %s = %s )\n", __FUNCTION__,
- _mesa_lookup_enum_by_nr( cap ),
+ _mesa_enum_nr( cap ),
state ? "GL_TRUE" : "GL_FALSE" );
switch ( cap ) {
diff --git a/src/mesa/drivers/dri/radeon/radeon_swtcl.c b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
index 1e80162..3243d44 100644
--- a/src/mesa/drivers/dri/radeon/radeon_swtcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_swtcl.c
@@ -440,7 +440,7 @@ static GLboolean radeon_run_render( struct gl_context *ctx,
radeon_print(RADEON_SWRENDER, RADEON_NORMAL,
"radeon_render.c: prim %s %d..%d\n",
- _mesa_lookup_enum_by_nr(prim & PRIM_MODE_MASK),
+ _mesa_enum_nr(prim & PRIM_MODE_MASK),
start, start+length);
if (length)
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c
index 301949d..74c19c0 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tex.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tex.c
@@ -263,7 +263,7 @@ static void radeonTexEnv( struct gl_context *ctx, GLenum target,
if ( RADEON_DEBUG & RADEON_STATE ) {
fprintf( stderr, "%s( %s )\n",
- __FUNCTION__, _mesa_lookup_enum_by_nr( pname ) );
+ __FUNCTION__, _mesa_enum_nr( pname ) );
}
switch ( pname ) {
@@ -335,7 +335,7 @@ static void radeonTexParameter( struct gl_context *ctx, GLenum target,
radeonTexObj* t = radeon_tex_obj(texObj);
radeon_print(RADEON_TEXTURE, RADEON_VERBOSE, "%s( %s )\n", __FUNCTION__,
- _mesa_lookup_enum_by_nr( pname ) );
+ _mesa_enum_nr( pname ) );
switch ( pname ) {
case GL_TEXTURE_BASE_LEVEL:
@@ -359,7 +359,7 @@ static void radeonDeleteTexture( struct gl_context *ctx,
radeon_print(RADEON_TEXTURE, RADEON_NORMAL,
"%s( %p (target = %s) )\n", __FUNCTION__, (void *)texObj,
- _mesa_lookup_enum_by_nr( texObj->Target ) );
+ _mesa_enum_nr( texObj->Target ) );
if ( rmesa ) {
radeon_firevertices(&rmesa->radeon);
diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c
index 52cf95d..3b9c02c 100644
--- a/src/mesa/drivers/dri/radeon/radeon_texture.c
+++ b/src/mesa/drivers/dri/radeon/radeon_texture.c
@@ -267,8 +267,8 @@ gl_format radeonChooseTextureFormat(struct gl_context * ctx,
radeon_print(RADEON_TEXTURE, RADEON_TRACE,
"%s InternalFormat=%s(%d) type=%s format=%s\n",
__func__,
- _mesa_lookup_enum_by_nr(internalFormat), internalFormat,
- _mesa_lookup_enum_by_nr(type), _mesa_lookup_enum_by_nr(format));
+ _mesa_enum_nr(internalFormat), internalFormat,
+ _mesa_enum_nr(type), _mesa_enum_nr(format));
radeon_print(RADEON_TEXTURE, RADEON_TRACE,
"%s do32bpt=%d force16bpt=%d\n",
__func__, do32bpt, force16bpt);
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 30a1953..175a9b4 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -280,8 +280,8 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name)
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s(mode=%s vs transform feedback %s)",
name,
- _mesa_lookup_prim_by_nr(mode),
- _mesa_lookup_prim_by_nr(ctx->TransformFeedback.Mode));
+ _mesa_prim_nr(mode),
+ _mesa_prim_nr(ctx->TransformFeedback.Mode));
return GL_FALSE;
}
}
@@ -305,7 +305,7 @@ valid_elements_type(struct gl_context *ctx, GLenum type, const char *name)
default:
_mesa_error(ctx, GL_INVALID_ENUM, "%s(type = %s)", name,
- _mesa_lookup_enum_by_nr(type));
+ _mesa_enum_nr(type));
return false;
}
}
diff --git a/src/mesa/main/atifragshader.c b/src/mesa/main/atifragshader.c
index 7077c96..ac60a04 100644
--- a/src/mesa/main/atifragshader.c
+++ b/src/mesa/main/atifragshader.c
@@ -132,21 +132,21 @@ static void debug_op(GLint optype, GLuint arg_count, GLenum op, GLuint dst,
op_name = atifs_ops[(arg_count-1)+(optype?3:0)];
- fprintf(stderr, "%s(%s, %s", op_name, _mesa_lookup_enum_by_nr(op),
- _mesa_lookup_enum_by_nr(dst));
+ fprintf(stderr, "%s(%s, %s", op_name, _mesa_enum_nr(op),
+ _mesa_enum_nr(dst));
if (!optype)
fprintf(stderr, ", %d", dstMask);
fprintf(stderr, ", %s", create_dst_mod_str(dstMod));
- fprintf(stderr, ", %s, %s, %d", _mesa_lookup_enum_by_nr(arg1),
- _mesa_lookup_enum_by_nr(arg1Rep), arg1Mod);
+ fprintf(stderr, ", %s, %s, %d", _mesa_enum_nr(arg1),
+ _mesa_enum_nr(arg1Rep), arg1Mod);
if (arg_count>1)
- fprintf(stderr, ", %s, %s, %d", _mesa_lookup_enum_by_nr(arg2),
- _mesa_lookup_enum_by_nr(arg2Rep), arg2Mod);
+ fprintf(stderr, ", %s, %s, %d", _mesa_enum_nr(arg2),
+ _mesa_enum_nr(arg2Rep), arg2Mod);
if (arg_count>2)
- fprintf(stderr, ", %s, %s, %d", _mesa_lookup_enum_by_nr(arg3),
- _mesa_lookup_enum_by_nr(arg3Rep), arg3Mod);
+ fprintf(stderr, ", %s, %s, %d", _mesa_enum_nr(arg3),
+ _mesa_enum_nr(arg3Rep), arg3Mod);
fprintf(stderr,")\n");
@@ -383,7 +383,7 @@ _mesa_EndFragmentShaderATI(void)
for (j = 0; j < MAX_NUM_PASSES_ATI; j++) {
for (i = 0; i < MAX_NUM_FRAGMENT_REGISTERS_ATI; i++) {
GLuint op = curProg->SetupInst[j][i].Opcode;
- const char *op_enum = op > 5 ? _mesa_lookup_enum_by_nr(op) : "0";
+ const char *op_enum = op > 5 ? _mesa_enum_nr(op) : "0";
GLuint src = curProg->SetupInst[j][i].src;
GLuint swizzle = curProg->SetupInst[j][i].swizzle;
fprintf(stderr, "%2d %04X %s %d %04X\n", i, op, op_enum, src,
@@ -392,8 +392,8 @@ _mesa_EndFragmentShaderATI(void)
for (i = 0; i < curProg->numArithInstr[j]; i++) {
GLuint op0 = curProg->Instructions[j][i].Opcode[0];
GLuint op1 = curProg->Instructions[j][i].Opcode[1];
- const char *op0_enum = op0 > 5 ? _mesa_lookup_enum_by_nr(op0) : "0";
- const char *op1_enum = op1 > 5 ? _mesa_lookup_enum_by_nr(op1) : "0";
+ const char *op0_enum = op0 > 5 ? _mesa_enum_nr(op0) : "0";
+ const char *op1_enum = op1 > 5 ? _mesa_enum_nr(op1) : "0";
GLuint count0 = curProg->Instructions[j][i].ArgCount[0];
GLuint count1 = curProg->Instructions[j][i].ArgCount[1];
fprintf(stderr, "%2d %04X %s %d %04X %s %d\n", i, op0, op0_enum, count0,
@@ -477,8 +477,8 @@ _mesa_PassTexCoordATI(GLuint dst, GLuint coord, GLenum swizzle)
#if MESA_DEBUG_ATI_FS
_mesa_debug(ctx, "%s(%s, %s, %s)\n", __FUNCTION__,
- _mesa_lookup_enum_by_nr(dst), _mesa_lookup_enum_by_nr(coord),
- _mesa_lookup_enum_by_nr(swizzle));
+ _mesa_enum_nr(dst), _mesa_enum_nr(coord),
+ _mesa_enum_nr(swizzle));
#endif
}
@@ -550,8 +550,8 @@ _mesa_SampleMapATI(GLuint dst, GLuint interp, GLenum swizzle)
#if MESA_DEBUG_ATI_FS
_mesa_debug(ctx, "%s(%s, %s, %s)\n", __FUNCTION__,
- _mesa_lookup_enum_by_nr(dst), _mesa_lookup_enum_by_nr(interp),
- _mesa_lookup_enum_by_nr(swizzle));
+ _mesa_enum_nr(dst), _mesa_enum_nr(interp),
+ _mesa_enum_nr(swizzle));
#endif
}
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 249e88a..2c97545 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -859,7 +859,7 @@ _mesa_PopAttrib(void)
if (MESA_VERBOSE & VERBOSE_API) {
_mesa_debug(ctx, "glPopAttrib %s\n",
- _mesa_lookup_enum_by_nr(attr->kind));
+ _mesa_enum_nr(attr->kind));
}
switch (attr->kind) {
diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c
index 0c28352..45ebe17 100644
--- a/src/mesa/main/blend.c
+++ b/src/mesa/main/blend.c
@@ -131,28 +131,28 @@ validate_blend_factors(struct gl_context *ctx, const char *func,
if (!legal_src_factor(ctx, sfactorRGB)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"%s(sfactorRGB = %s)", func,
- _mesa_lookup_enum_by_nr(sfactorRGB));
+ _mesa_enum_nr(sfactorRGB));
return GL_FALSE;
}
if (!legal_dst_factor(ctx, dfactorRGB)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"%s(dfactorRGB = %s)", func,
- _mesa_lookup_enum_by_nr(dfactorRGB));
+ _mesa_enum_nr(dfactorRGB));
return GL_FALSE;
}
if (sfactorA != sfactorRGB && !legal_src_factor(ctx, sfactorA)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"%s(sfactorA = %s)", func,
- _mesa_lookup_enum_by_nr(sfactorA));
+ _mesa_enum_nr(sfactorA));
return GL_FALSE;
}
if (dfactorA != dfactorRGB && !legal_dst_factor(ctx, dfactorA)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"%s(dfactorA = %s)", func,
- _mesa_lookup_enum_by_nr(dfactorA));
+ _mesa_enum_nr(dfactorA));
return GL_FALSE;
}
@@ -211,10 +211,10 @@ _mesa_BlendFuncSeparate( GLenum sfactorRGB, GLenum dfactorRGB,
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBlendFuncSeparate %s %s %s %s\n",
- _mesa_lookup_enum_by_nr(sfactorRGB),
- _mesa_lookup_enum_by_nr(dfactorRGB),
- _mesa_lookup_enum_by_nr(sfactorA),
- _mesa_lookup_enum_by_nr(dfactorA));
+ _mesa_enum_nr(sfactorRGB),
+ _mesa_enum_nr(dfactorRGB),
+ _mesa_enum_nr(sfactorA),
+ _mesa_enum_nr(dfactorA));
if (!validate_blend_factors(ctx, "glBlendFuncSeparate",
sfactorRGB, dfactorRGB,
@@ -345,7 +345,7 @@ _mesa_BlendEquation( GLenum mode )
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBlendEquation(%s)\n",
- _mesa_lookup_enum_by_nr(mode));
+ _mesa_enum_nr(mode));
if (!legal_blend_equation(ctx, mode)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquation");
@@ -388,7 +388,7 @@ _mesa_BlendEquationiARB(GLuint buf, GLenum mode)
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBlendEquationi(%u, %s)\n",
- buf, _mesa_lookup_enum_by_nr(mode));
+ buf, _mesa_enum_nr(mode));
if (buf >= ctx->Const.MaxDrawBuffers) {
_mesa_error(ctx, GL_INVALID_VALUE, "glBlendFuncSeparatei(buffer=%u)",
@@ -424,8 +424,8 @@ _mesa_BlendEquationSeparate( GLenum modeRGB, GLenum modeA )
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBlendEquationSeparateEXT(%s %s)\n",
- _mesa_lookup_enum_by_nr(modeRGB),
- _mesa_lookup_enum_by_nr(modeA));
+ _mesa_enum_nr(modeRGB),
+ _mesa_enum_nr(modeA));
if ( (modeRGB != modeA) && !ctx->Extensions.EXT_blend_equation_separate ) {
_mesa_error(ctx, GL_INVALID_OPERATION,
@@ -479,8 +479,8 @@ _mesa_BlendEquationSeparateiARB(GLuint buf, GLenum modeRGB, GLenum modeA)
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBlendEquationSeparatei(%u, %s %s)\n", buf,
- _mesa_lookup_enum_by_nr(modeRGB),
- _mesa_lookup_enum_by_nr(modeA));
+ _mesa_enum_nr(modeRGB),
+ _mesa_enum_nr(modeA));
if (buf >= ctx->Const.MaxDrawBuffers) {
_mesa_error(ctx, GL_INVALID_VALUE, "glBlendEquationSeparatei(buffer=%u)",
@@ -570,7 +570,7 @@ _mesa_AlphaFunc( GLenum func, GLclampf ref )
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glAlphaFunc(%s, %f)\n",
- _mesa_lookup_enum_by_nr(func), ref);
+ _mesa_enum_nr(func), ref);
switch (func) {
case GL_NEVER:
@@ -616,7 +616,7 @@ _mesa_LogicOp( GLenum opcode )
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glLogicOp(%s)\n", _mesa_lookup_enum_by_nr(opcode));
+ _mesa_debug(ctx, "glLogicOp(%s)\n", _mesa_enum_nr(opcode));
switch (opcode) {
case GL_CLEAR:
@@ -793,7 +793,7 @@ _mesa_ClampColor(GLenum target, GLenum clamp)
invalid_enum:
_mesa_error(ctx, GL_INVALID_ENUM, "glClampColor(%s)",
- _mesa_lookup_enum_by_nr(target));
+ _mesa_enum_nr(target));
}
static GLboolean
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index ffb67b9..98231f1 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -816,7 +816,7 @@ _mesa_BindBuffer(GLenum target, GLuint buffer)
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBindBuffer(%s, %u)\n",
- _mesa_lookup_enum_by_nr(target), buffer);
+ _mesa_enum_nr(target), buffer);
bind_buffer_object(ctx, target, buffer);
}
@@ -1006,9 +1006,9 @@ _mesa_BufferData(GLenum target, GLsizeiptrARB size,
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBufferData(%s, %ld, %p, %s)\n",
- _mesa_lookup_enum_by_nr(target),
+ _mesa_enum_nr(target),
(long int) size, data,
- _mesa_lookup_enum_by_nr(usage));
+ _mesa_enum_nr(usage));
if (size < 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glBufferDataARB(size < 0)");
@@ -1320,7 +1320,7 @@ _mesa_GetBufferParameteriv(GLenum target, GLenum pname, GLint *params)
invalid_pname:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameterivARB(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
}
@@ -1373,7 +1373,7 @@ _mesa_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
invalid_pname:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetBufferParameteri64v(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
}
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c
index fb3e576..cbd74aa 100644
--- a/src/mesa/main/clear.c
+++ b/src/mesa/main/clear.c
@@ -354,7 +354,7 @@ _mesa_ClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value)
return;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferiv(buffer=%s)",
- _mesa_lookup_enum_by_nr(buffer));
+ _mesa_enum_nr(buffer));
return;
}
}
@@ -426,7 +426,7 @@ _mesa_ClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value)
return;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferuiv(buffer=%s)",
- _mesa_lookup_enum_by_nr(buffer));
+ _mesa_enum_nr(buffer));
return;
}
}
@@ -518,7 +518,7 @@ _mesa_ClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value)
return;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferfv(buffer=%s)",
- _mesa_lookup_enum_by_nr(buffer));
+ _mesa_enum_nr(buffer));
return;
}
}
@@ -540,7 +540,7 @@ _mesa_ClearBufferfi(GLenum buffer, GLint drawbuffer,
if (buffer != GL_DEPTH_STENCIL) {
_mesa_error(ctx, GL_INVALID_ENUM, "glClearBufferfi(buffer=%s)",
- _mesa_lookup_enum_by_nr(buffer));
+ _mesa_enum_nr(buffer));
return;
}
diff --git a/src/mesa/main/condrender.c b/src/mesa/main/condrender.c
index bfd2b08..f35337e 100644
--- a/src/mesa/main/condrender.c
+++ b/src/mesa/main/condrender.c
@@ -61,7 +61,7 @@ _mesa_BeginConditionalRender(GLuint queryId, GLenum mode)
break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glBeginConditionalRender(mode=%s)",
- _mesa_lookup_enum_by_nr(mode));
+ _mesa_enum_nr(mode));
return;
}
@@ -145,7 +145,7 @@ _mesa_check_conditional_render(struct gl_context *ctx)
default:
_mesa_problem(ctx, "Bad cond render mode %s in "
" _mesa_check_conditional_render()",
- _mesa_lookup_enum_by_nr(ctx->Query.CondRenderMode));
+ _mesa_enum_nr(ctx->Query.CondRenderMode));
return GL_TRUE;
}
}
diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c
index bd75e41..bcdd26d 100644
--- a/src/mesa/main/debug.c
+++ b/src/mesa/main/debug.c
@@ -407,7 +407,7 @@ dump_renderbuffer(const struct gl_renderbuffer *rb, GLboolean writeImage)
{
printf("Renderbuffer %u: %u x %u IntFormat = %s\n",
rb->Name, rb->Width, rb->Height,
- _mesa_lookup_enum_by_nr(rb->InternalFormat));
+ _mesa_enum_nr(rb->InternalFormat));
if (writeImage) {
_mesa_write_renderbuffer_image(rb);
}
diff --git a/src/mesa/main/depth.c b/src/mesa/main/depth.c
index 68ad561..ddd70ee 100644
--- a/src/mesa/main/depth.c
+++ b/src/mesa/main/depth.c
@@ -64,7 +64,7 @@ _mesa_DepthFunc( GLenum func )
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glDepthFunc %s\n", _mesa_lookup_enum_by_nr(func));
+ _mesa_debug(ctx, "glDepthFunc %s\n", _mesa_enum_nr(func));
switch (func) {
case GL_LESS: /* (default) pass if incoming z < stored z */
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 18e3eb7..f6547e1 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -8614,7 +8614,7 @@ _mesa_NewList(GLuint name, GLenum mode)
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glNewList %u %s\n", name,
- _mesa_lookup_enum_by_nr(mode));
+ _mesa_enum_nr(mode));
if (name == 0) {
_mesa_error(ctx, GL_INVALID_VALUE, "glNewList");
@@ -9287,7 +9287,7 @@ _mesa_initialize_save_table(const struct gl_context *ctx)
static const char *
enum_string(GLenum k)
{
- return _mesa_lookup_enum_by_nr(k);
+ return _mesa_enum_nr(k);
}
@@ -9424,19 +9424,19 @@ print_list(struct gl_context *ctx, GLuint list)
break;
case OPCODE_BIND_TEXTURE:
printf("BindTexture %s %d\n",
- _mesa_lookup_enum_by_nr(n[1].ui), n[2].ui);
+ _mesa_enum_nr(n[1].ui), n[2].ui);
break;
case OPCODE_SHADE_MODEL:
- printf("ShadeModel %s\n", _mesa_lookup_enum_by_nr(n[1].ui));
+ printf("ShadeModel %s\n", _mesa_enum_nr(n[1].ui));
break;
case OPCODE_MAP1:
printf("Map1 %s %.3f %.3f %d %d\n",
- _mesa_lookup_enum_by_nr(n[1].ui),
+ _mesa_enum_nr(n[1].ui),
n[2].f, n[3].f, n[4].i, n[5].i);
break;
case OPCODE_MAP2:
printf("Map2 %s %.3f %.3f %.3f %.3f %d %d %d %d\n",
- _mesa_lookup_enum_by_nr(n[1].ui),
+ _mesa_enum_nr(n[1].ui),
n[2].f, n[3].f, n[4].f, n[5].f,
n[6].i, n[7].i, n[8].i, n[9].i);
break;
@@ -9515,7 +9515,7 @@ print_list(struct gl_context *ctx, GLuint list)
case OPCODE_PROVOKING_VERTEX:
printf("ProvokingVertex %s\n",
- _mesa_lookup_enum_by_nr(n[1].ui));
+ _mesa_enum_nr(n[1].ui));
break;
/*
diff --git a/src/mesa/main/drawpix.c b/src/mesa/main/drawpix.c
index e69113b..e1e3162 100644
--- a/src/mesa/main/drawpix.c
+++ b/src/mesa/main/drawpix.c
@@ -54,10 +54,10 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glDrawPixels(%d, %d, %s, %s, %p) // to %s at %d, %d\n",
width, height,
- _mesa_lookup_enum_by_nr(format),
- _mesa_lookup_enum_by_nr(type),
+ _mesa_enum_nr(format),
+ _mesa_enum_nr(type),
pixels,
- _mesa_lookup_enum_by_nr(ctx->DrawBuffer->ColorDrawBuffer[0]),
+ _mesa_enum_nr(ctx->DrawBuffer->ColorDrawBuffer[0]),
IROUND(ctx->Current.RasterPos[0]),
IROUND(ctx->Current.RasterPos[1]));
@@ -97,8 +97,8 @@ _mesa_DrawPixels( GLsizei width, GLsizei height,
err = _mesa_error_check_format_and_type(ctx, format, type);
if (err != GL_NO_ERROR) {
_mesa_error(ctx, err, "glDrawPixels(invalid format %s and/or type %s)",
- _mesa_lookup_enum_by_nr(format),
- _mesa_lookup_enum_by_nr(type));
+ _mesa_enum_nr(format),
+ _mesa_enum_nr(type));
goto end;
}
@@ -199,9 +199,9 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
_mesa_debug(ctx,
"glCopyPixels(%d, %d, %d, %d, %s) // from %s to %s at %d, %d\n",
srcx, srcy, width, height,
- _mesa_lookup_enum_by_nr(type),
- _mesa_lookup_enum_by_nr(ctx->ReadBuffer->ColorReadBuffer),
- _mesa_lookup_enum_by_nr(ctx->DrawBuffer->ColorDrawBuffer[0]),
+ _mesa_enum_nr(type),
+ _mesa_enum_nr(ctx->ReadBuffer->ColorReadBuffer),
+ _mesa_enum_nr(ctx->DrawBuffer->ColorDrawBuffer[0]),
IROUND(ctx->Current.RasterPos[0]),
IROUND(ctx->Current.RasterPos[1]));
@@ -219,7 +219,7 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
type != GL_STENCIL &&
type != GL_DEPTH_STENCIL) {
_mesa_error(ctx, GL_INVALID_ENUM, "glCopyPixels(type=%s)",
- _mesa_lookup_enum_by_nr(type));
+ _mesa_enum_nr(type));
return;
}
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index fdde24e..6cdf5f5 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -143,7 +143,7 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
invalid_enum_error:
_mesa_error(ctx, GL_INVALID_ENUM, "gl%sClientState(%s)",
- state ? "Enable" : "Disable", _mesa_lookup_enum_by_nr(cap));
+ state ? "Enable" : "Disable", _mesa_enum_nr(cap));
}
@@ -280,7 +280,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "%s %s (newstate is %x)\n",
state ? "glEnable" : "glDisable",
- _mesa_lookup_enum_by_nr(cap),
+ _mesa_enum_nr(cap),
ctx->NewState);
switch (cap) {
@@ -1021,7 +1021,7 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
invalid_enum_error:
_mesa_error(ctx, GL_INVALID_ENUM, "gl%s(%s)",
- state ? "Enable" : "Disable", _mesa_lookup_enum_by_nr(cap));
+ state ? "Enable" : "Disable", _mesa_enum_nr(cap));
}
@@ -1086,7 +1086,7 @@ _mesa_set_enablei(struct gl_context *ctx, GLenum cap,
invalid_enum_error:
_mesa_error(ctx, GL_INVALID_ENUM, "%s(cap=%s)",
state ? "glEnablei" : "glDisablei",
- _mesa_lookup_enum_by_nr(cap));
+ _mesa_enum_nr(cap));
}
@@ -1121,7 +1121,7 @@ _mesa_IsEnabledi( GLenum cap, GLuint index )
return (ctx->Color.BlendEnabled >> index) & 1;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabledIndexed(cap=%s)",
- _mesa_lookup_enum_by_nr(cap));
+ _mesa_enum_nr(cap));
return GL_FALSE;
}
}
@@ -1594,6 +1594,6 @@ _mesa_IsEnabled( GLenum cap )
invalid_enum_error:
_mesa_error(ctx, GL_INVALID_ENUM, "glIsEnabled(%s)",
- _mesa_lookup_enum_by_nr(cap));
+ _mesa_enum_nr(cap));
return GL_FALSE;
}
diff --git a/src/mesa/main/enums.h b/src/mesa/main/enums.h
index b2f373a..c8a783c 100644
--- a/src/mesa/main/enums.h
+++ b/src/mesa/main/enums.h
@@ -38,13 +38,13 @@
#define _ENUMS_H_
-extern const char *_mesa_lookup_enum_by_nr( int nr );
+extern const char *_mesa_enum_nr( int nr );
/* Get the name of an enum given that it is a primitive type. Avoids
* GL_FALSE/GL_POINTS ambiguity and others.
*/
-const char *_mesa_lookup_prim_by_nr( unsigned nr );
+const char *_mesa_prim_nr( unsigned nr );
-extern int _mesa_lookup_enum_by_name( const char *symbol );
+extern int _mesa_enum_name( const char *symbol );
#endif
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c
index 0ee3dae..c08d449 100644
--- a/src/mesa/main/errors.c
+++ b/src/mesa/main/errors.c
@@ -794,7 +794,7 @@ flush_delayed_errors( struct gl_context *ctx )
if (ctx->ErrorDebugCount) {
_mesa_snprintf(s, MAX_DEBUG_MESSAGE_LENGTH, "%d similar %s errors",
ctx->ErrorDebugCount,
- _mesa_lookup_enum_by_nr(ctx->ErrorValue));
+ _mesa_enum_nr(ctx->ErrorValue));
output_if_debug("Mesa", s, GL_TRUE);
@@ -959,7 +959,7 @@ _mesa_error( struct gl_context *ctx, GLenum error, const char *fmtString, ... )
}
len = _mesa_snprintf(s2, MAX_DEBUG_MESSAGE_LENGTH, "%s in %s",
- _mesa_lookup_enum_by_nr(error), s);
+ _mesa_enum_nr(error), s);
if (len >= MAX_DEBUG_MESSAGE_LENGTH) {
/* Same as above. */
ASSERT(0);
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 39fa242..4e66578 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1587,14 +1587,14 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,
if (samples == NO_SAMPLES)
_mesa_debug(ctx, "%s(%s, %s, %d, %d)\n",
func,
- _mesa_lookup_enum_by_nr(target),
- _mesa_lookup_enum_by_nr(internalFormat),
+ _mesa_enum_nr(target),
+ _mesa_enum_nr(internalFormat),
width, height);
else
_mesa_debug(ctx, "%s(%s, %s, %d, %d, %d)\n",
func,
- _mesa_lookup_enum_by_nr(target),
- _mesa_lookup_enum_by_nr(internalFormat),
+ _mesa_enum_nr(target),
+ _mesa_enum_nr(internalFormat),
width, height, samples);
}
@@ -1606,7 +1606,7 @@ renderbuffer_storage(GLenum target, GLenum internalFormat,
baseFormat = _mesa_base_fbo_format(ctx, internalFormat);
if (baseFormat == 0) {
_mesa_error(ctx, GL_INVALID_ENUM, "%s(internalFormat=%s)",
- func, _mesa_lookup_enum_by_nr(internalFormat));
+ func, _mesa_enum_nr(internalFormat));
return;
}
@@ -2119,7 +2119,7 @@ _mesa_CheckFramebufferStatus(GLenum target)
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glCheckFramebufferStatus(%s)\n",
- _mesa_lookup_enum_by_nr(target));
+ _mesa_enum_nr(target));
buffer = get_framebuffer_target(ctx, target);
if (!buffer) {
@@ -2363,7 +2363,7 @@ _mesa_FramebufferTexture1D(GLenum target, GLenum attachment,
if (error) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glFramebufferTexture1DEXT(textarget=%s)",
- _mesa_lookup_enum_by_nr(textarget));
+ _mesa_enum_nr(textarget));
return;
}
}
@@ -2414,7 +2414,7 @@ _mesa_FramebufferTexture2D(GLenum target, GLenum attachment,
if (error) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glFramebufferTexture2DEXT(textarget=%s)",
- _mesa_lookup_enum_by_nr(textarget));
+ _mesa_enum_nr(textarget));
return;
}
}
@@ -2501,7 +2501,7 @@ _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,
if (att == NULL) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glFramebufferRenderbufferEXT(invalid attachment %s)",
- _mesa_lookup_enum_by_nr(attachment));
+ _mesa_enum_nr(attachment));
return;
}
@@ -2842,7 +2842,7 @@ _mesa_GenerateMipmap(GLenum target)
if (error) {
_mesa_error(ctx, GL_INVALID_ENUM, "glGenerateMipmapEXT(target=%s)",
- _mesa_lookup_enum_by_nr(target));
+ _mesa_enum_nr(target));
return;
}
@@ -3019,7 +3019,7 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
"glBlitFramebuffer(%d, %d, %d, %d, %d, %d, %d, %d, 0x%x, %s)\n",
srcX0, srcY0, srcX1, srcY1,
dstX0, dstY0, dstX1, dstY1,
- mask, _mesa_lookup_enum_by_nr(filter));
+ mask, _mesa_enum_nr(filter));
if (ctx->NewState) {
_mesa_update_state(ctx);
@@ -3045,7 +3045,7 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
if (!is_valid_blit_filter(ctx, filter)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glBlitFramebufferEXT(%s)",
- _mesa_lookup_enum_by_nr(filter));
+ _mesa_enum_nr(filter));
return;
}
@@ -3053,7 +3053,7 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
filter == GL_SCALED_RESOLVE_NICEST_EXT) &&
(readFb->Visual.samples == 0 || drawFb->Visual.samples > 0)) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glBlitFramebufferEXT(%s)",
- _mesa_lookup_enum_by_nr(filter));
+ _mesa_enum_nr(filter));
return;
}
@@ -3518,7 +3518,7 @@ _mesa_DiscardFramebufferEXT(GLenum target, GLsizei numAttachments,
if (!fb) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glDiscardFramebufferEXT(target %s)",
- _mesa_lookup_enum_by_nr(target));
+ _mesa_enum_nr(target));
return;
}
@@ -3555,5 +3555,5 @@ _mesa_DiscardFramebufferEXT(GLenum target, GLsizei numAttachments,
invalid_enum:
_mesa_error(ctx, GL_INVALID_ENUM,
"glDiscardFramebufferEXT(attachment %s)",
- _mesa_lookup_enum_by_nr(attachments[i]));
+ _mesa_enum_nr(attachments[i]));
}
diff --git a/src/mesa/main/feedback.c b/src/mesa/main/feedback.c
index 990d1da..aff38d0 100644
--- a/src/mesa/main/feedback.c
+++ b/src/mesa/main/feedback.c
@@ -417,7 +417,7 @@ _mesa_RenderMode( GLenum mode )
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glRenderMode %s\n", _mesa_lookup_enum_by_nr(mode));
+ _mesa_debug(ctx, "glRenderMode %s\n", _mesa_enum_nr(mode));
FLUSH_VERTICES(ctx, _NEW_RENDERMODE);
diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c
index 40eca87..55a1f6b 100644
--- a/src/mesa/main/formatquery.c
+++ b/src/mesa/main/formatquery.c
@@ -80,7 +80,7 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,
default:
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetInternalformativ(target=%s)",
- _mesa_lookup_enum_by_nr(target));
+ _mesa_enum_nr(target));
return;
}
@@ -93,7 +93,7 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,
if (_mesa_base_fbo_format(ctx, internalformat) == 0) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetInternalformativ(internalformat=%s)",
- _mesa_lookup_enum_by_nr(internalformat));
+ _mesa_enum_nr(internalformat));
return;
}
@@ -105,7 +105,7 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,
if (bufSize < 0) {
_mesa_error(ctx, GL_INVALID_VALUE,
"glGetInternalformativ(target=%s)",
- _mesa_lookup_enum_by_nr(target));
+ _mesa_enum_nr(target));
return;
}
@@ -143,7 +143,7 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,
default:
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetInternalformativ(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
return;
}
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 593c75b..04f7e42 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -1006,7 +1006,7 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d
if (api_check && !api_found) {
_mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,
- _mesa_lookup_enum_by_nr(d->pname));
+ _mesa_enum_nr(d->pname));
return GL_FALSE;
}
@@ -1067,7 +1067,7 @@ find_value(const char *func, GLenum pname, void **p, union value *v)
* any valid enum. */
if (unlikely(idx == 0)) {
_mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
return &error_value;
}
@@ -1691,11 +1691,11 @@ find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v)
invalid_enum:
_mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
return TYPE_INVALID;
invalid_value:
_mesa_error(ctx, GL_INVALID_VALUE, "%s(pname=%s)", func,
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
return TYPE_INVALID;
}
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index 52985f1..c63ae7e 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -202,7 +202,7 @@ _mesa_GetPointerv( GLenum pname, GLvoid **params )
return;
if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glGetPointerv %s\n", _mesa_lookup_enum_by_nr(pname));
+ _mesa_debug(ctx, "glGetPointerv %s\n", _mesa_enum_nr(pname));
switch (pname) {
case GL_VERTEX_ARRAY_POINTER:
@@ -296,7 +296,7 @@ _mesa_GetError( void )
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glGetError <-- %s\n", _mesa_lookup_enum_by_nr(e));
+ _mesa_debug(ctx, "glGetError <-- %s\n", _mesa_enum_nr(e));
ctx->ErrorValue = (GLenum) GL_NO_ERROR;
ctx->ErrorDebugCount = 0;
diff --git a/src/mesa/main/hint.c b/src/mesa/main/hint.c
index ed0394b..92be3ef 100644
--- a/src/mesa/main/hint.c
+++ b/src/mesa/main/hint.c
@@ -41,8 +41,8 @@ _mesa_Hint( GLenum target, GLenum mode )
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glHint %s %s\n",
- _mesa_lookup_enum_by_nr(target),
- _mesa_lookup_enum_by_nr(mode));
+ _mesa_enum_nr(target),
+ _mesa_enum_nr(mode));
if (mode != GL_NICEST && mode != GL_FASTEST && mode != GL_DONT_CARE) {
_mesa_error(ctx, GL_INVALID_ENUM, "glHint(mode)");
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index a3a576e..2cb052f 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -42,7 +42,7 @@ _mesa_ShadeModel( GLenum mode )
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glShadeModel %s\n", _mesa_lookup_enum_by_nr(mode));
+ _mesa_debug(ctx, "glShadeModel %s\n", _mesa_enum_nr(mode));
if (mode != GL_FLAT && mode != GL_SMOOTH) {
_mesa_error(ctx, GL_INVALID_ENUM, "glShadeModel");
@@ -723,8 +723,8 @@ _mesa_ColorMaterial( GLenum face, GLenum mode )
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glColorMaterial %s %s\n",
- _mesa_lookup_enum_by_nr(face),
- _mesa_lookup_enum_by_nr(mode));
+ _mesa_enum_nr(face),
+ _mesa_enum_nr(mode));
bitmask = _mesa_material_bitmask(ctx, face, mode, legal, "glColorMaterial");
if (bitmask == 0)
diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c
index 0ba7e93..fac84df 100644
--- a/src/mesa/main/matrix.c
+++ b/src/mesa/main/matrix.c
@@ -230,7 +230,7 @@ _mesa_PushMatrix( void )
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glPushMatrix %s\n",
- _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode));
+ _mesa_enum_nr(ctx->Transform.MatrixMode));
if (stack->Depth + 1 >= stack->MaxDepth) {
if (ctx->Transform.MatrixMode == GL_TEXTURE) {
@@ -240,7 +240,7 @@ _mesa_PushMatrix( void )
}
else {
_mesa_error(ctx, GL_STACK_OVERFLOW, "glPushMatrix(mode=%s)",
- _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode));
+ _mesa_enum_nr(ctx->Transform.MatrixMode));
}
return;
}
@@ -271,7 +271,7 @@ _mesa_PopMatrix( void )
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glPopMatrix %s\n",
- _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode));
+ _mesa_enum_nr(ctx->Transform.MatrixMode));
if (stack->Depth == 0) {
if (ctx->Transform.MatrixMode == GL_TEXTURE) {
@@ -281,7 +281,7 @@ _mesa_PopMatrix( void )
}
else {
_mesa_error(ctx, GL_STACK_UNDERFLOW, "glPopMatrix(mode=%s)",
- _mesa_lookup_enum_by_nr(ctx->Transform.MatrixMode));
+ _mesa_enum_nr(ctx->Transform.MatrixMode));
}
return;
}
diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c
index d976e5a..d1389e5 100644
--- a/src/mesa/main/pack.c
+++ b/src/mesa/main/pack.c
@@ -523,8 +523,8 @@ _pack_rgba_span_from_uints_problem(struct gl_context *ctx,
_mesa_problem(ctx,
"Unsupported type (%s) / format (%s) "
"in _mesa_pack_rgba_span_from_uints",
- _mesa_lookup_enum_by_nr(dstType),
- _mesa_lookup_enum_by_nr(dstFormat));
+ _mesa_enum_nr(dstType),
+ _mesa_enum_nr(dstFormat));
}
void
@@ -909,8 +909,8 @@ _pack_rgba_span_from_ints_problem(struct gl_context *ctx,
_mesa_problem(ctx,
"Unsupported type (%s) / format (%s) "
"in _mesa_pack_rgba_span_from_ints",
- _mesa_lookup_enum_by_nr(dstType),
- _mesa_lookup_enum_by_nr(dstFormat));
+ _mesa_enum_nr(dstType),
+ _mesa_enum_nr(dstFormat));
}
void
@@ -3104,7 +3104,7 @@ get_component_mapping(GLenum format,
break;
default:
_mesa_problem(NULL, "bad srcFormat %s in get_component_mapping",
- _mesa_lookup_enum_by_nr(format));
+ _mesa_enum_nr(format));
return;
}
}
diff --git a/src/mesa/main/pack_tmp.h b/src/mesa/main/pack_tmp.h
index 0d4eb38..273986c 100644
--- a/src/mesa/main/pack_tmp.h
+++ b/src/mesa/main/pack_tmp.h
@@ -116,7 +116,7 @@ FN_NAME(struct gl_context *ctx,
default:
_mesa_problem(ctx,
"Unsupported format (%s)",
- _mesa_lookup_enum_by_nr(dstFormat));
+ _mesa_enum_nr(dstFormat));
break;
}
}
diff --git a/src/mesa/main/polygon.c b/src/mesa/main/polygon.c
index 0ded743..5f9a182 100644
--- a/src/mesa/main/polygon.c
+++ b/src/mesa/main/polygon.c
@@ -57,7 +57,7 @@ _mesa_CullFace( GLenum mode )
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE&VERBOSE_API)
- _mesa_debug(ctx, "glCullFace %s\n", _mesa_lookup_enum_by_nr(mode));
+ _mesa_debug(ctx, "glCullFace %s\n", _mesa_enum_nr(mode));
if (mode!=GL_FRONT && mode!=GL_BACK && mode!=GL_FRONT_AND_BACK) {
_mesa_error( ctx, GL_INVALID_ENUM, "glCullFace" );
@@ -92,7 +92,7 @@ _mesa_FrontFace( GLenum mode )
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE&VERBOSE_API)
- _mesa_debug(ctx, "glFrontFace %s\n", _mesa_lookup_enum_by_nr(mode));
+ _mesa_debug(ctx, "glFrontFace %s\n", _mesa_enum_nr(mode));
if (mode!=GL_CW && mode!=GL_CCW) {
_mesa_error( ctx, GL_INVALID_ENUM, "glFrontFace" );
@@ -131,8 +131,8 @@ _mesa_PolygonMode( GLenum face, GLenum mode )
if (MESA_VERBOSE&VERBOSE_API)
_mesa_debug(ctx, "glPolygonMode %s %s\n",
- _mesa_lookup_enum_by_nr(face),
- _mesa_lookup_enum_by_nr(mode));
+ _mesa_enum_nr(face),
+ _mesa_enum_nr(mode));
if (mode!=GL_POINT && mode!=GL_LINE && mode!=GL_FILL) {
_mesa_error( ctx, GL_INVALID_ENUM, "glPolygonMode(mode)" );
diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c
index 0d6fe39..8540bcc 100644
--- a/src/mesa/main/queryobj.c
+++ b/src/mesa/main/queryobj.c
@@ -311,7 +311,7 @@ _mesa_BeginQueryIndexed(GLenum target, GLuint index, GLuint id)
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glBeginQueryIndexed(%s, %u, %u)\n",
- _mesa_lookup_enum_by_nr(target), index, id);
+ _mesa_enum_nr(target), index, id);
if (!query_error_check_index(ctx, target, index))
return;
@@ -333,7 +333,7 @@ _mesa_BeginQueryIndexed(GLenum target, GLuint index, GLuint id)
if (*bindpt) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBeginQuery{Indexed}(target=%s is active)",
- _mesa_lookup_enum_by_nr(target));
+ _mesa_enum_nr(target));
return;
}
@@ -388,7 +388,7 @@ _mesa_EndQueryIndexed(GLenum target, GLuint index)
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glEndQueryIndexed(%s, %u)\n",
- _mesa_lookup_enum_by_nr(target), index);
+ _mesa_enum_nr(target), index);
if (!query_error_check_index(ctx, target, index))
return;
@@ -408,8 +408,8 @@ _mesa_EndQueryIndexed(GLenum target, GLuint index)
if (q && q->Target != target) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glEndQuery(target=%s with active query of target %s)",
- _mesa_lookup_enum_by_nr(target),
- _mesa_lookup_enum_by_nr(q->Target));
+ _mesa_enum_nr(target),
+ _mesa_enum_nr(q->Target));
return;
}
@@ -445,7 +445,7 @@ _mesa_QueryCounter(GLuint id, GLenum target)
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glQueryCounter(%u, %s)\n", id,
- _mesa_lookup_enum_by_nr(target));
+ _mesa_enum_nr(target));
/* error checking */
if (target != GL_TIMESTAMP) {
@@ -507,9 +507,9 @@ _mesa_GetQueryIndexediv(GLenum target, GLuint index, GLenum pname,
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glGetQueryIndexediv(%s, %u, %s)\n",
- _mesa_lookup_enum_by_nr(target),
+ _mesa_enum_nr(target),
index,
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
if (!query_error_check_index(ctx, target, index))
return;
@@ -558,7 +558,7 @@ _mesa_GetQueryIndexediv(GLenum target, GLuint index, GLenum pname,
default:
_mesa_problem(ctx,
"Unknown target in glGetQueryIndexediv(target = %s)",
- _mesa_lookup_enum_by_nr(target));
+ _mesa_enum_nr(target));
*params = 0;
break;
}
@@ -586,7 +586,7 @@ _mesa_GetQueryObjectiv(GLuint id, GLenum pname, GLint *params)
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glGetQueryObjectiv(%u, %s)\n", id,
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
if (id)
q = _mesa_lookup_query_object(ctx, id);
@@ -637,7 +637,7 @@ _mesa_GetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params)
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glGetQueryObjectuiv(%u, %s)\n", id,
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
if (id)
q = _mesa_lookup_query_object(ctx, id);
@@ -691,7 +691,7 @@ _mesa_GetQueryObjecti64v(GLuint id, GLenum pname, GLint64EXT *params)
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glGetQueryObjecti64v(%u, %s)\n", id,
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
if (id)
q = _mesa_lookup_query_object(ctx, id);
@@ -731,7 +731,7 @@ _mesa_GetQueryObjectui64v(GLuint id, GLenum pname, GLuint64EXT *params)
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glGetQueryObjectui64v(%u, %s)\n", id,
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
if (id)
q = _mesa_lookup_query_object(ctx, id);
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 85952d6..d5e96ce 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -920,8 +920,8 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height,
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glReadPixels(%d, %d, %s, %s, %p)\n",
width, height,
- _mesa_lookup_enum_by_nr(format),
- _mesa_lookup_enum_by_nr(type),
+ _mesa_enum_nr(format),
+ _mesa_enum_nr(type),
pixels);
if (width < 0 || height < 0) {
@@ -978,8 +978,8 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height,
if (err != GL_NO_ERROR) {
_mesa_error(ctx, err, "glReadPixels(invalid format %s and/or type %s)",
- _mesa_lookup_enum_by_nr(format),
- _mesa_lookup_enum_by_nr(type));
+ _mesa_enum_nr(format),
+ _mesa_enum_nr(type));
return;
}
}
@@ -987,8 +987,8 @@ _mesa_ReadnPixelsARB( GLint x, GLint y, GLsizei width, GLsizei height,
err = _mesa_error_check_format_and_type(ctx, format, type);
if (err != GL_NO_ERROR) {
_mesa_error(ctx, err, "glReadPixels(invalid format %s and/or type %s)",
- _mesa_lookup_enum_by_nr(format),
- _mesa_lookup_enum_by_nr(type));
+ _mesa_enum_nr(format),
+ _mesa_enum_nr(type));
return;
}
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
index 91b17ab..4842d73 100644
--- a/src/mesa/main/samplerobj.c
+++ b/src/mesa/main/samplerobj.c
@@ -675,7 +675,7 @@ _mesa_SamplerParameteri(GLuint sampler, GLenum pname, GLint param)
break;
case INVALID_PNAME:
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameteri(pname=%s)\n",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
break;
case INVALID_PARAM:
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameteri(param=%d)\n",
@@ -760,7 +760,7 @@ _mesa_SamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
break;
case INVALID_PNAME:
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterf(pname=%s)\n",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
break;
case INVALID_PARAM:
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterf(param=%f)\n",
@@ -852,7 +852,7 @@ _mesa_SamplerParameteriv(GLuint sampler, GLenum pname, const GLint *params)
break;
case INVALID_PNAME:
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameteriv(pname=%s)\n",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
break;
case INVALID_PARAM:
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameteriv(param=%d)\n",
@@ -937,7 +937,7 @@ _mesa_SamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *params)
break;
case INVALID_PNAME:
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterfv(pname=%s)\n",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
break;
case INVALID_PARAM:
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterfv(param=%f)\n",
@@ -1022,7 +1022,7 @@ _mesa_SamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *params)
break;
case INVALID_PNAME:
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterIiv(pname=%s)\n",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
break;
case INVALID_PARAM:
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterIiv(param=%d)\n",
@@ -1108,7 +1108,7 @@ _mesa_SamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *params)
break;
case INVALID_PNAME:
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterIuiv(pname=%s)\n",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
break;
case INVALID_PARAM:
_mesa_error(ctx, GL_INVALID_ENUM, "glSamplerParameterIuiv(param=%u)\n",
@@ -1198,7 +1198,7 @@ _mesa_GetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params)
invalid_pname:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetSamplerParameteriv(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
}
@@ -1276,7 +1276,7 @@ _mesa_GetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params)
invalid_pname:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetSamplerParameterfv(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
}
@@ -1355,7 +1355,7 @@ _mesa_GetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params)
invalid_pname:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetSamplerParameterIiv(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
}
@@ -1434,7 +1434,7 @@ _mesa_GetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params)
invalid_pname:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetSamplerParameterIuiv(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
}
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 8cb0276..9aff694 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -619,7 +619,7 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, GLint *param
}
_mesa_error(ctx, GL_INVALID_ENUM, "glGetProgramiv(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
}
@@ -1041,7 +1041,7 @@ _mesa_CreateShader(GLenum type)
{
GET_CURRENT_CONTEXT(ctx);
if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glCreateShader %s\n", _mesa_lookup_enum_by_nr(type));
+ _mesa_debug(ctx, "glCreateShader %s\n", _mesa_enum_nr(type));
return create_shader(ctx, type);
}
@@ -1628,7 +1628,7 @@ _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value)
default:
_mesa_error(ctx, GL_INVALID_VALUE,
"glProgramParameteri(geometry input type = %s",
- _mesa_lookup_enum_by_nr(value));
+ _mesa_enum_nr(value));
return;
}
return;
@@ -1645,7 +1645,7 @@ _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value)
default:
_mesa_error(ctx, GL_INVALID_VALUE,
"glProgramParameteri(geometry output type = %s",
- _mesa_lookup_enum_by_nr(value));
+ _mesa_enum_nr(value));
return;
}
return;
@@ -1667,7 +1667,7 @@ _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value)
_mesa_error(ctx, GL_INVALID_VALUE,
"glProgramParameteri(pname=%s, value=%d): "
"value must be 0 or 1.",
- _mesa_lookup_enum_by_nr(pname),
+ _mesa_enum_nr(pname),
value);
return;
}
@@ -1699,7 +1699,7 @@ _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value)
}
_mesa_error(ctx, GL_INVALID_ENUM, "glProgramParameteri(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
}
void
diff --git a/src/mesa/main/tests/enum_strings.cpp b/src/mesa/main/tests/enum_strings.cpp
index 1dae60f..929635b 100644
--- a/src/mesa/main/tests/enum_strings.cpp
+++ b/src/mesa/main/tests/enum_strings.cpp
@@ -40,7 +40,7 @@ TEST(EnumStrings, LookUpByNumber)
{
for (unsigned i = 0; everything[i].name != NULL; i++) {
EXPECT_STREQ(everything[i].name,
- _mesa_lookup_enum_by_nr(everything[i].value));
+ _mesa_enum_nr(everything[i].value));
}
}
@@ -48,7 +48,7 @@ TEST(EnumStrings, LookUpByName)
{
for (unsigned i = 0; everything[i].name != NULL; i++) {
EXPECT_EQ(everything[i].value,
- _mesa_lookup_enum_by_name(everything[i].name));
+ _mesa_enum_name(everything[i].name));
}
}
@@ -59,13 +59,13 @@ TEST(EnumStrings, LookUpByDuplicateName)
*/
for (unsigned i = 0; alternate_names[i].name != NULL; i++) {
EXPECT_EQ(alternate_names[i].value,
- _mesa_lookup_enum_by_name(alternate_names[i].name));
+ _mesa_enum_name(alternate_names[i].name));
}
}
TEST(EnumStrings, LookUpUnknownNumber)
{
- EXPECT_STRCASEEQ("0xEEEE", _mesa_lookup_enum_by_nr(0xEEEE));
+ EXPECT_STRCASEEQ("0xEEEE", _mesa_enum_nr(0xEEEE));
}
/* Please type the name and the value. This makes it easier to detect
diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c
index 84731dd..be97fbb 100644
--- a/src/mesa/main/texenv.c
+++ b/src/mesa/main/texenv.c
@@ -43,7 +43,7 @@
#define TE_ERROR(errCode, msg, value) \
- _mesa_error(ctx, errCode, msg, _mesa_lookup_enum_by_nr(value));
+ _mesa_error(ctx, errCode, msg, _mesa_enum_nr(value));
/** Set texture env mode */
@@ -508,16 +508,16 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param )
}
else {
_mesa_error(ctx, GL_INVALID_ENUM, "glTexEnv(target=%s)",
- _mesa_lookup_enum_by_nr(target));
+ _mesa_enum_nr(target));
return;
}
if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug(ctx, "glTexEnv %s %s %.1f(%s) ...\n",
- _mesa_lookup_enum_by_nr(target),
- _mesa_lookup_enum_by_nr(pname),
+ _mesa_enum_nr(target),
+ _mesa_enum_nr(pname),
*param,
- _mesa_lookup_enum_by_nr((GLenum) iparam0));
+ _mesa_enum_nr((GLenum) iparam0));
/* Tell device driver about the new texture environment */
if (ctx->Driver.TexEnv) {
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 495a204..86707ce 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -817,7 +817,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
}
_mesa_problem(ctx, "unexpected format %s in _mesa_choose_tex_format()",
- _mesa_lookup_enum_by_nr(internalFormat));
+ _mesa_enum_nr(internalFormat));
return MESA_FORMAT_NONE;
}
diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c
index 81ad224..efdd4d2 100644
--- a/src/mesa/main/texgen.c
+++ b/src/mesa/main/texgen.c
@@ -77,10 +77,10 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
if (MESA_VERBOSE&(VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug(ctx, "glTexGen %s %s %.1f(%s)...\n",
- _mesa_lookup_enum_by_nr(coord),
- _mesa_lookup_enum_by_nr(pname),
+ _mesa_enum_nr(coord),
+ _mesa_enum_nr(pname),
*params,
- _mesa_lookup_enum_by_nr((GLenum) (GLint) *params));
+ _mesa_enum_nr((GLenum) (GLint) *params));
if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) {
_mesa_error(ctx, GL_INVALID_OPERATION, "glTexGen(current unit)");
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 9aaa63f..37dbbb9 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1960,8 +1960,8 @@ texture_error_check( struct gl_context *ctx,
_mesa_error(ctx, GL_INVALID_OPERATION,
"glTexImage%dD(format = %s, internalFormat = %s)",
dimensions,
- _mesa_lookup_enum_by_nr(format),
- _mesa_lookup_enum_by_nr(internalFormat));
+ _mesa_enum_nr(format),
+ _mesa_enum_nr(internalFormat));
return GL_TRUE;
}
@@ -1971,9 +1971,9 @@ texture_error_check( struct gl_context *ctx,
_mesa_error(ctx, err,
"glTexImage%dD(format = %s, type = %s, internalFormat = %s)",
dimensions,
- _mesa_lookup_enum_by_nr(format),
- _mesa_lookup_enum_by_nr(type),
- _mesa_lookup_enum_by_nr(internalFormat));
+ _mesa_enum_nr(format),
+ _mesa_enum_nr(type),
+ _mesa_enum_nr(internalFormat));
return GL_TRUE;
}
}
@@ -2003,7 +2003,7 @@ texture_error_check( struct gl_context *ctx,
if (_mesa_base_tex_format(ctx, internalFormat) < 0) {
_mesa_error(ctx, GL_INVALID_VALUE,
"glTexImage%dD(internalFormat=%s)",
- dimensions, _mesa_lookup_enum_by_nr(internalFormat));
+ dimensions, _mesa_enum_nr(internalFormat));
return GL_TRUE;
}
@@ -2012,8 +2012,8 @@ texture_error_check( struct gl_context *ctx,
if (err != GL_NO_ERROR) {
_mesa_error(ctx, err,
"glTexImage%dD(incompatible format = %s, type = %s)",
- dimensions, _mesa_lookup_enum_by_nr(format),
- _mesa_lookup_enum_by_nr(type));
+ dimensions, _mesa_enum_nr(format),
+ _mesa_enum_nr(type));
return GL_TRUE;
}
@@ -2026,8 +2026,8 @@ texture_error_check( struct gl_context *ctx,
(_mesa_is_dudv_format(internalFormat) != _mesa_is_dudv_format(format))) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glTexImage%dD(incompatible internalFormat = %s, format = %s)",
- dimensions, _mesa_lookup_enum_by_nr(internalFormat),
- _mesa_lookup_enum_by_nr(format));
+ dimensions, _mesa_enum_nr(internalFormat),
+ _mesa_enum_nr(format));
return GL_TRUE;
}
@@ -2300,7 +2300,7 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
/* check target (proxies not allowed) */
if (!legal_texsubimage_target(ctx, dimensions, target)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glTexSubImage%uD(target=%s)",
- dimensions, _mesa_lookup_enum_by_nr(target));
+ dimensions, _mesa_enum_nr(target));
return GL_TRUE;
}
@@ -2322,8 +2322,8 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
_mesa_error(ctx, err,
"glTexSubImage%dD(format = %s, type = %s)",
dimensions,
- _mesa_lookup_enum_by_nr(format),
- _mesa_lookup_enum_by_nr(type));
+ _mesa_enum_nr(format),
+ _mesa_enum_nr(type));
return GL_TRUE;
}
}
@@ -2332,8 +2332,8 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
if (err != GL_NO_ERROR) {
_mesa_error(ctx, err,
"glTexSubImage%dD(incompatible format = %s, type = %s)",
- dimensions, _mesa_lookup_enum_by_nr(format),
- _mesa_lookup_enum_by_nr(type));
+ dimensions, _mesa_enum_nr(format),
+ _mesa_enum_nr(type));
return GL_TRUE;
}
@@ -2413,7 +2413,7 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
/* check target */
if (!legal_texsubimage_target(ctx, dimensions, target)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glCopyTexImage%uD(target=%s)",
- dimensions, _mesa_lookup_enum_by_nr(target));
+ dimensions, _mesa_enum_nr(target));
return GL_TRUE;
}
@@ -2654,7 +2654,7 @@ copytexsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
/* check target (proxies not allowed) */
if (!legal_texsubimage_target(ctx, dimensions, target)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glCopyTexSubImage%uD(target=%s)",
- dimensions, _mesa_lookup_enum_by_nr(target));
+ dimensions, _mesa_enum_nr(target));
return GL_TRUE;
}
@@ -2915,8 +2915,8 @@ _mesa_choose_texture_format(struct gl_context *ctx,
"DXT compression requested (%s), "
"but libtxc_dxtn library not installed. Using %s "
"instead.",
- _mesa_lookup_enum_by_nr(before),
- _mesa_lookup_enum_by_nr(internalFormat));
+ _mesa_enum_nr(before),
+ _mesa_enum_nr(internalFormat));
}
}
@@ -3003,18 +3003,18 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims,
_mesa_debug(ctx,
"glCompressedTexImage%uD %s %d %s %d %d %d %d %p\n",
dims,
- _mesa_lookup_enum_by_nr(target), level,
- _mesa_lookup_enum_by_nr(internalFormat),
+ _mesa_enum_nr(target), level,
+ _mesa_enum_nr(internalFormat),
width, height, depth, border, pixels);
else
_mesa_debug(ctx,
"glTexImage%uD %s %d %s %d %d %d %d %s %s %p\n",
dims,
- _mesa_lookup_enum_by_nr(target), level,
- _mesa_lookup_enum_by_nr(internalFormat),
+ _mesa_enum_nr(target), level,
+ _mesa_enum_nr(internalFormat),
width, height, depth, border,
- _mesa_lookup_enum_by_nr(format),
- _mesa_lookup_enum_by_nr(type), pixels);
+ _mesa_enum_nr(format),
+ _mesa_enum_nr(type), pixels);
}
internalFormat = override_internal_format(internalFormat, width, height);
@@ -3022,7 +3022,7 @@ teximage(struct gl_context *ctx, GLboolean compressed, GLuint dims,
/* target error checking */
if (!legal_teximage_target(ctx, dims, target)) {
_mesa_error(ctx, GL_INVALID_ENUM, "%s%uD(target=%s)",
- func, dims, _mesa_lookup_enum_by_nr(target));
+ func, dims, _mesa_enum_nr(target));
return;
}
@@ -3309,15 +3309,15 @@ texsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug(ctx, "glTexSubImage%uD %s %d %d %d %d %d %d %d %s %s %p\n",
dims,
- _mesa_lookup_enum_by_nr(target), level,
+ _mesa_enum_nr(target), level,
xoffset, yoffset, zoffset, width, height, depth,
- _mesa_lookup_enum_by_nr(format),
- _mesa_lookup_enum_by_nr(type), pixels);
+ _mesa_enum_nr(format),
+ _mesa_enum_nr(type), pixels);
/* check target (proxies not allowed) */
if (!legal_texsubimage_target(ctx, dims, target)) {
_mesa_error(ctx, GL_INVALID_ENUM, "glTexSubImage%uD(target=%s)",
- dims, _mesa_lookup_enum_by_nr(target));
+ dims, _mesa_enum_nr(target));
return;
}
@@ -3448,8 +3448,8 @@ copyteximage(struct gl_context *ctx, GLuint dims,
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug(ctx, "glCopyTexImage%uD %s %d %s %d %d %d %d %d\n",
dims,
- _mesa_lookup_enum_by_nr(target), level,
- _mesa_lookup_enum_by_nr(internalFormat),
+ _mesa_enum_nr(target), level,
+ _mesa_enum_nr(internalFormat),
x, y, width, height, border);
if (ctx->NewState & NEW_COPY_TEX_STATE)
@@ -3573,7 +3573,7 @@ copytexsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug(ctx, "glCopyTexSubImage%uD %s %d %d %d %d %d %d %d %d\n",
dims,
- _mesa_lookup_enum_by_nr(target),
+ _mesa_enum_nr(target),
level, xoffset, yoffset, zoffset, x, y, width, height);
if (ctx->NewState & NEW_COPY_TEX_STATE)
@@ -4240,14 +4240,14 @@ teximagemultisample(GLuint dims, GLenum target, GLsizei samples,
if (immutable && !_mesa_is_legal_tex_storage_format(ctx, internalformat)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"%s(internalformat=%s not legal for immutable-format)",
- func, _mesa_lookup_enum_by_nr(internalformat));
+ func, _mesa_enum_nr(internalformat));
return;
}
if (!is_renderable_texture_format(ctx, internalformat)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"%s(internalformat=%s)",
- func, _mesa_lookup_enum_by_nr(internalformat));
+ func, _mesa_enum_nr(internalformat));
return;
}
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 27c0403..747b86d 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -1231,7 +1231,7 @@ _mesa_BindTexture( GLenum target, GLuint texName )
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug(ctx, "glBindTexture %s %d\n",
- _mesa_lookup_enum_by_nr(target), (GLint) texName);
+ _mesa_enum_nr(target), (GLint) texName);
targetIndex = target_enum_to_index(ctx, target);
if (targetIndex < 0) {
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index b5a1e58..3d874fb 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -583,17 +583,17 @@ set_tex_parameteri(struct gl_context *ctx,
invalid_pname:
_mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
return GL_FALSE;
invalid_param:
_mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(param=%s)",
- _mesa_lookup_enum_by_nr(params[0]));
+ _mesa_enum_nr(params[0]));
return GL_FALSE;
invalid_operation:
_mesa_error(ctx, GL_INVALID_OPERATION, "glTexParameter(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
return GL_FALSE;
}
@@ -713,12 +713,12 @@ set_tex_parameterf(struct gl_context *ctx,
invalid_pname:
_mesa_error(ctx, GL_INVALID_ENUM, "glTexParameter(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
return GL_FALSE;
invalid_operation:
_mesa_error(ctx, GL_INVALID_OPERATION, "glTexParameter(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
return GL_FALSE;
}
@@ -1218,7 +1218,7 @@ get_tex_level_parameter_image(struct gl_context *ctx,
invalid_pname:
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
}
@@ -1329,7 +1329,7 @@ get_tex_level_parameter_buffer(struct gl_context *ctx,
invalid_pname:
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetTexLevelParameter[if]v(pname=%s)",
- _mesa_lookup_enum_by_nr(pname));
+ _mesa_enum_nr(pname));
}
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index afc9337..b49d0c9 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -123,21 +123,21 @@ _mesa_print_texunit_state( struct gl_context *ctx, GLuint unit )
{
const struct gl_texture_unit *texUnit = ctx->Texture.Unit + unit;
printf("Texture Unit %d\n", unit);
- printf(" GL_TEXTURE_ENV_MODE = %s\n", _mesa_lookup_enum_by_nr(texUnit->EnvMode));
- printf(" GL_COMBINE_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeRGB));
- printf(" GL_COMBINE_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeA));
- printf(" GL_SOURCE0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[0]));
- printf(" GL_SOURCE1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[1]));
- printf(" GL_SOURCE2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[2]));
- printf(" GL_SOURCE0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[0]));
- printf(" GL_SOURCE1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[1]));
- printf(" GL_SOURCE2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[2]));
- printf(" GL_OPERAND0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[0]));
- printf(" GL_OPERAND1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[1]));
- printf(" GL_OPERAND2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[2]));
- printf(" GL_OPERAND0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[0]));
- printf(" GL_OPERAND1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[1]));
- printf(" GL_OPERAND2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[2]));
+ printf(" GL_TEXTURE_ENV_MODE = %s\n", _mesa_enum_nr(texUnit->EnvMode));
+ printf(" GL_COMBINE_RGB = %s\n", _mesa_enum_nr(texUnit->Combine.ModeRGB));
+ printf(" GL_COMBINE_ALPHA = %s\n", _mesa_enum_nr(texUnit->Combine.ModeA));
+ printf(" GL_SOURCE0_RGB = %s\n", _mesa_enum_nr(texUnit->Combine.SourceRGB[0]));
+ printf(" GL_SOURCE1_RGB = %s\n", _mesa_enum_nr(texUnit->Combine.SourceRGB[1]));
+ printf(" GL_SOURCE2_RGB = %s\n", _mesa_enum_nr(texUnit->Combine.SourceRGB[2]));
+ printf(" GL_SOURCE0_ALPHA = %s\n", _mesa_enum_nr(texUnit->Combine.SourceA[0]));
+ printf(" GL_SOURCE1_ALPHA = %s\n", _mesa_enum_nr(texUnit->Combine.SourceA[1]));
+ printf(" GL_SOURCE2_ALPHA = %s\n", _mesa_enum_nr(texUnit->Combine.SourceA[2]));
+ printf(" GL_OPERAND0_RGB = %s\n", _mesa_enum_nr(texUnit->Combine.OperandRGB[0]));
+ printf(" GL_OPERAND1_RGB = %s\n", _mesa_enum_nr(texUnit->Combine.OperandRGB[1]));
+ printf(" GL_OPERAND2_RGB = %s\n", _mesa_enum_nr(texUnit->Combine.OperandRGB[2]));
+ printf(" GL_OPERAND0_ALPHA = %s\n", _mesa_enum_nr(texUnit->Combine.OperandA[0]));
+ printf(" GL_OPERAND1_ALPHA = %s\n", _mesa_enum_nr(texUnit->Combine.OperandA[1]));
+ printf(" GL_OPERAND2_ALPHA = %s\n", _mesa_enum_nr(texUnit->Combine.OperandA[2]));
printf(" GL_RGB_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftRGB);
printf(" GL_ALPHA_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftA);
printf(" GL_TEXTURE_ENV_COLOR = (%f, %f, %f, %f)\n", texUnit->EnvColor[0], texUnit->EnvColor[1], texUnit->EnvColor[2], texUnit->EnvColor[3]);
@@ -300,11 +300,11 @@ _mesa_ActiveTexture(GLenum texture)
if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
_mesa_debug(ctx, "glActiveTexture %s\n",
- _mesa_lookup_enum_by_nr(texture));
+ _mesa_enum_nr(texture));
if (texUnit >= k) {
_mesa_error(ctx, GL_INVALID_ENUM, "glActiveTexture(texture=%s)",
- _mesa_lookup_enum_by_nr(texture));
+ _mesa_enum_nr(texture));
return;
}
@@ -330,7 +330,7 @@ _mesa_ClientActiveTexture(GLenum texture)
if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE))
_mesa_debug(ctx, "glClientActiveTexture %s\n",
- _mesa_lookup_enum_by_nr(texture));
+ _mesa_enum_nr(texture));
if (texUnit >= ctx->Const.MaxTextureCoordUnits) {
_mesa_error(ctx, GL_INVALID_ENUM, "glClientActiveTexture(texture)");
diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c
index 0a53726..a441c1d 100644
--- a/src/mesa/main/texstorage.c
+++ b/src/mesa/main/texstorage.c
@@ -292,7 +292,7 @@ tex_storage_error_check(struct gl_context *ctx, GLuint dims, GLenum target,
if (!_mesa_is_legal_tex_storage_format(ctx, internalformat)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glTexStorage%uD(internalformat = %s)", dims,
- _mesa_lookup_enum_by_nr(internalformat));
+ _mesa_enum_nr(internalformat));
return GL_TRUE;
}
@@ -307,7 +307,7 @@ tex_storage_error_check(struct gl_context *ctx, GLuint dims, GLenum target,
if (!legal_texobj_target(ctx, dims, target)) {
_mesa_error(ctx, GL_INVALID_ENUM,
"glTexStorage%uD(illegal target=%s)",
- dims, _mesa_lookup_enum_by_nr(target));
+ dims, _mesa_enum_nr(target));
return GL_TRUE;
}
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index daa024c..3ba7efd 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -280,8 +280,8 @@ compute_component_mapping(GLenum inFormat, GLenum outFormat,
#if 0
printf("from %x/%s to %x/%s map %d %d %d %d %d %d\n",
- inFormat, _mesa_lookup_enum_by_nr(inFormat),
- outFormat, _mesa_lookup_enum_by_nr(outFormat),
+ inFormat, _mesa_enum_nr(inFormat),
+ outFormat, _mesa_enum_nr(outFormat),
map[0],
map[1],
map[2],
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index 6d79df6..c9877c9 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -723,7 +723,7 @@ _mesa_GetActiveUniformBlockiv(GLuint program,
default:
_mesa_error(ctx, GL_INVALID_ENUM,
"glGetActiveUniformBlockiv(pname 0x%x (%s))",
- pname, _mesa_lookup_enum_by_nr(pname));
+ pname, _mesa_enum_nr(pname));
return;
}
}
diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index 08cd1d1..f032080 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -458,7 +458,7 @@ void _tnl_draw_prims( struct gl_context *ctx,
printf("%s %d..%d\n", __FUNCTION__, min_index, max_index);
for (i = 0; i < nr_prims; i++)
printf("prim %d: %s start %d count %d\n", i,
- _mesa_lookup_enum_by_nr(prim[i].mode),
+ _mesa_enum_nr(prim[i].mode),
prim[i].start,
prim[i].count);
}
diff --git a/src/mesa/tnl/t_vb_render.c b/src/mesa/tnl/t_vb_render.c
index 4d42bcd..ff114b0 100644
--- a/src/mesa/tnl/t_vb_render.c
+++ b/src/mesa/tnl/t_vb_render.c
@@ -315,7 +315,7 @@ static GLboolean run_render( struct gl_context *ctx,
if (MESA_VERBOSE & VERBOSE_PRIMS)
_mesa_debug(NULL, "MESA prim %s %d..%d\n",
- _mesa_lookup_enum_by_nr(prim & PRIM_MODE_MASK),
+ _mesa_enum_nr(prim & PRIM_MODE_MASK),
start, start+length);
if (length)
diff --git a/src/mesa/tnl/t_vertex_sse.c b/src/mesa/tnl/t_vertex_sse.c
index e0141c3..147cb70 100644
--- a/src/mesa/tnl/t_vertex_sse.c
+++ b/src/mesa/tnl/t_vertex_sse.c
@@ -591,7 +591,7 @@ static GLboolean build_vertex_emit( struct x86_program *p )
break;
case GL_UNSIGNED_SHORT:
default:
- printf("unknown CHAN_TYPE %s\n", _mesa_lookup_enum_by_nr(CHAN_TYPE));
+ printf("unknown CHAN_TYPE %s\n", _mesa_enum_nr(CHAN_TYPE));
return GL_FALSE;
}
break;
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h
index 893cb3c..f269d4a 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp.h
@@ -1257,7 +1257,7 @@ static GLboolean TAG(validate_render)( struct gl_context *ctx,
}
if (!ok) {
-/* fprintf(stderr, "not ok %s\n", _mesa_lookup_enum_by_nr(prim & PRIM_MODE_MASK)); */
+/* fprintf(stderr, "not ok %s\n", _mesa_enum_nr(prim & PRIM_MODE_MASK)); */
return GL_FALSE;
}
}
diff --git a/src/mesa/tnl_dd/t_dd_unfilled.h b/src/mesa/tnl_dd/t_dd_unfilled.h
index 0dee88c..082a697 100644
--- a/src/mesa/tnl_dd/t_dd_unfilled.h
+++ b/src/mesa/tnl_dd/t_dd_unfilled.h
@@ -61,7 +61,7 @@ static void TAG(unfilled_tri)( struct gl_context *ctx,
}
/* fprintf(stderr, "%s %s %d %d %d\n", __FUNCTION__, */
-/* _mesa_lookup_enum_by_nr( mode ), */
+/* _mesa_enum_nr( mode ), */
/* ef[e0], ef[e1], ef[e2]); */
if (mode == GL_POINT) {
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 9dadd04..fbca101 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -765,7 +765,7 @@ vbo_exec_DrawArrays(GLenum mode, GLint start, GLsizei count)
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawArrays(%s, %d, %d)\n",
- _mesa_lookup_enum_by_nr(mode), start, count);
+ _mesa_enum_nr(mode), start, count);
if (!_mesa_validate_DrawArrays( ctx, mode, start, count ))
return;
@@ -792,7 +792,7 @@ vbo_exec_DrawArraysInstanced(GLenum mode, GLint start, GLsizei count,
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawArraysInstanced(%s, %d, %d, %d)\n",
- _mesa_lookup_enum_by_nr(mode), start, count, numInstances);
+ _mesa_enum_nr(mode), start, count, numInstances);
if (!_mesa_validate_DrawArraysInstanced(ctx, mode, start, count, numInstances))
return;
@@ -818,7 +818,7 @@ vbo_exec_DrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawArraysInstancedBaseInstance(%s, %d, %d, %d, %d)\n",
- _mesa_lookup_enum_by_nr(mode), first, count,
+ _mesa_enum_nr(mode), first, count,
numInstances, baseInstance);
if (!_mesa_validate_DrawArraysInstanced(ctx, mode, first, count,
@@ -992,8 +992,8 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode,
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx,
"glDrawRangeElementsBaseVertex(%s, %u, %u, %d, %s, %p, %d)\n",
- _mesa_lookup_enum_by_nr(mode), start, end, count,
- _mesa_lookup_enum_by_nr(type), indices, basevertex);
+ _mesa_enum_nr(mode), start, end, count,
+ _mesa_enum_nr(type), indices, basevertex);
if (!_mesa_validate_DrawRangeElements( ctx, mode, start, end, count,
type, indices, basevertex ))
@@ -1089,8 +1089,8 @@ vbo_exec_DrawRangeElements(GLenum mode, GLuint start, GLuint end,
GET_CURRENT_CONTEXT(ctx);
_mesa_debug(ctx,
"glDrawRangeElements(%s, %u, %u, %d, %s, %p)\n",
- _mesa_lookup_enum_by_nr(mode), start, end, count,
- _mesa_lookup_enum_by_nr(type), indices);
+ _mesa_enum_nr(mode), start, end, count,
+ _mesa_enum_nr(type), indices);
}
vbo_exec_DrawRangeElementsBaseVertex(mode, start, end, count, type,
@@ -1109,8 +1109,8 @@ vbo_exec_DrawElements(GLenum mode, GLsizei count, GLenum type,
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawElements(%s, %u, %s, %p)\n",
- _mesa_lookup_enum_by_nr(mode), count,
- _mesa_lookup_enum_by_nr(type), indices);
+ _mesa_enum_nr(mode), count,
+ _mesa_enum_nr(type), indices);
if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices, 0 ))
return;
@@ -1131,8 +1131,8 @@ vbo_exec_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type,
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawElementsBaseVertex(%s, %d, %s, %p, %d)\n",
- _mesa_lookup_enum_by_nr(mode), count,
- _mesa_lookup_enum_by_nr(type), indices, basevertex);
+ _mesa_enum_nr(mode), count,
+ _mesa_enum_nr(type), indices, basevertex);
if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices,
basevertex ))
@@ -1154,8 +1154,8 @@ vbo_exec_DrawElementsInstanced(GLenum mode, GLsizei count, GLenum type,
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawElementsInstanced(%s, %d, %s, %p, %d)\n",
- _mesa_lookup_enum_by_nr(mode), count,
- _mesa_lookup_enum_by_nr(type), indices, numInstances);
+ _mesa_enum_nr(mode), count,
+ _mesa_enum_nr(type), indices, numInstances);
if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,
numInstances, 0))
@@ -1178,8 +1178,8 @@ vbo_exec_DrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawElementsInstancedBaseVertex(%s, %d, %s, %p, %d; %d)\n",
- _mesa_lookup_enum_by_nr(mode), count,
- _mesa_lookup_enum_by_nr(type), indices,
+ _mesa_enum_nr(mode), count,
+ _mesa_enum_nr(type), indices,
numInstances, basevertex);
if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,
@@ -1203,8 +1203,8 @@ vbo_exec_DrawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum ty
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawElementsInstancedBaseInstance(%s, %d, %s, %p, %d, %d)\n",
- _mesa_lookup_enum_by_nr(mode), count,
- _mesa_lookup_enum_by_nr(type), indices,
+ _mesa_enum_nr(mode), count,
+ _mesa_enum_nr(type), indices,
numInstances, baseInstance);
if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,
@@ -1229,8 +1229,8 @@ vbo_exec_DrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count,
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawElementsInstancedBaseVertexBaseInstance(%s, %d, %s, %p, %d, %d, %d)\n",
- _mesa_lookup_enum_by_nr(mode), count,
- _mesa_lookup_enum_by_nr(type), indices,
+ _mesa_enum_nr(mode), count,
+ _mesa_enum_nr(type), indices,
numInstances, basevertex, baseInstance);
if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices,
@@ -1456,7 +1456,7 @@ vbo_exec_DrawTransformFeedback(GLenum mode, GLuint name)
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawTransformFeedback(%s, %d)\n",
- _mesa_lookup_enum_by_nr(mode), name);
+ _mesa_enum_nr(mode), name);
vbo_draw_transform_feedback(ctx, mode, obj, 0, 1);
}
@@ -1470,7 +1470,7 @@ vbo_exec_DrawTransformFeedbackStream(GLenum mode, GLuint name, GLuint stream)
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawTransformFeedbackStream(%s, %u, %u)\n",
- _mesa_lookup_enum_by_nr(mode), name, stream);
+ _mesa_enum_nr(mode), name, stream);
vbo_draw_transform_feedback(ctx, mode, obj, stream, 1);
}
@@ -1485,7 +1485,7 @@ vbo_exec_DrawTransformFeedbackInstanced(GLenum mode, GLuint name,
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawTransformFeedbackInstanced(%s, %d)\n",
- _mesa_lookup_enum_by_nr(mode), name);
+ _mesa_enum_nr(mode), name);
vbo_draw_transform_feedback(ctx, mode, obj, 0, primcount);
}
@@ -1501,7 +1501,7 @@ vbo_exec_DrawTransformFeedbackStreamInstanced(GLenum mode, GLuint name,
if (MESA_VERBOSE & VERBOSE_DRAW)
_mesa_debug(ctx, "glDrawTransformFeedbackStreamInstanced"
"(%s, %u, %u, %i)\n",
- _mesa_lookup_enum_by_nr(mode), name, stream, primcount);
+ _mesa_enum_nr(mode), name, stream, primcount);
vbo_draw_transform_feedback(ctx, mode, obj, stream, primcount);
}
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 6a4f2a9..0b31063 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -54,7 +54,7 @@ vbo_exec_debug_verts( struct vbo_exec_context *exec )
struct _mesa_prim *prim = &exec->vtx.prim[i];
printf(" prim %d: %s%s %d..%d %s %s\n",
i,
- _mesa_lookup_prim_by_nr(prim->mode),
+ _mesa_prim_nr(prim->mode),
prim->weak ? " (weak)" : "",
prim->start,
prim->start + prim->count,
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 26951bd..5878a7e 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -1508,7 +1508,7 @@ vbo_print_vertex_list(struct gl_context *ctx, void *data)
struct _mesa_prim *prim = &node->prim[i];
printf(" prim %d: %s%s %d..%d %s %s\n",
i,
- _mesa_lookup_prim_by_nr(prim->mode),
+ _mesa_prim_nr(prim->mode),
prim->weak ? " (weak)" : "",
prim->start,
prim->start + prim->count,
diff --git a/src/mesa/vbo/vbo_save_loopback.c b/src/mesa/vbo/vbo_save_loopback.c
index 31343cd..e2dd23e 100644
--- a/src/mesa/vbo/vbo_save_loopback.c
+++ b/src/mesa/vbo/vbo_save_loopback.c
@@ -95,7 +95,7 @@ static void loopback_prim( struct gl_context *ctx,
if (0)
printf("loopback prim %s(%s,%s) verts %d..%d\n",
- _mesa_lookup_prim_by_nr(prim->mode),
+ _mesa_prim_nr(prim->mode),
prim->begin ? "begin" : "..",
prim->end ? "end" : "..",
start,
--
1.8.3
More information about the mesa-dev
mailing list