diff options
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r-- | src/mesa/main/context.c | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index a94bbf3fdf5..97ee925c0bb 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -351,6 +351,36 @@ _mesa_destroy_visual( GLvisual *vis ) /**********************************************************************/ /*@{*/ + +/** + * This is lame. gdb only seems to recognize enum types that are + * actually used somewhere. We want to be able to print/use enum + * values such as TEXTURE_2D_INDEX in gdb. But we don't actually use + * the gl_texture_index type anywhere. Thus, this lame function. + */ +static void +dummy_enum_func(void) +{ + gl_buffer_index bi; + gl_colortable_index ci; + gl_face_index fi; + gl_frag_attrib fa; + gl_frag_result fr; + gl_texture_index ti; + gl_vert_attrib va; + gl_vert_result vr; + + (void) bi; + (void) ci; + (void) fi; + (void) fa; + (void) fr; + (void) ti; + (void) va; + (void) vr; +} + + /** * One-time initialization mutex lock. * @@ -390,9 +420,6 @@ one_time_init( GLcontext *ctx ) _mesa_ubyte_to_float_color_tab[i] = (float) i / 255.0F; } -#ifdef USE_SPARC_ASM - _mesa_init_sparc_glapi_relocs(); -#endif if (_mesa_getenv("MESA_DEBUG")) { _glapi_noop_enable_warnings(GL_TRUE); _glapi_set_warning_func( (_glapi_warning_func) _mesa_warning ); @@ -409,6 +436,8 @@ one_time_init( GLcontext *ctx ) alreadyCalled = GL_TRUE; } _glthread_UNLOCK_MUTEX(OneTimeLock); + + dummy_enum_func(); } |