From 126c89e35fb5179fe077f7593f31ea874c89dd65 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 5 Aug 2005 18:13:37 +0000 Subject: [PATCH] Fix recent problems with display lists and other parts of the code. CALL_by_offset, SET_by_offset, and GET_by_offset all had various problems. The core issue is that parts of the device-independent code in Mesa assumes that all functions have slots in the dispatch table. This is especially true in the display list code. It will merrilly try to set dispatch pointers for glVertexAttrib1fARB even if GL_ARB_vertex_program is not supported. When the GET/SET/CALL macros are invoked, they would read a 0 from the remap table. The problem is that 0 is the dispatch offset for glNewList! One change is that the remap table is now initialized to be full of -1 values. In addtion, all of the *_by_offset marcos misbehave in an obvious way if the specified offset is -1. SET_by_offset will do nothing, GET_by_offset will return NULL, and CALL_by_offset, since it uses GET_by_offset, will segfault. I also had to add GL_EXT_blend_func_separate to the list of default extensions in all_mesa_extensions (src/mesa/drivers/dri/common/utils.c). Even though many drivers do not export this extension, glBlendFunc is internally implemented by calling glBlendFuncSeparate. Without this addition, glBlendFunc stopped working on drivers (such as mga) that do not export GL_EXT_blend_func_separate. There are still a few assertions / crashes in GL_ARB_vertex_program tests, but I don't think that these are related to any of my changes. --- src/mesa/drivers/dri/common/utils.c | 12 +- src/mesa/glapi/dispatch.h | 17 +- src/mesa/glapi/gl_offsets.py | 34 ++- src/mesa/glapi/gl_table.py | 17 +- src/mesa/glapi/glapioffsets.h | 416 ++++++++++++++++++++++++++++ src/mesa/main/api_arrayelt.c | 28 ++ src/mesa/main/vtxfmt.c | 6 +- src/mesa/main/vtxfmt_tmp.h | 1 + 8 files changed, 519 insertions(+), 12 deletions(-) diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c index b6fb06ffac9..7ae7f284ee9 100644 --- a/src/mesa/drivers/dri/common/utils.c +++ b/src/mesa/drivers/dri/common/utils.c @@ -36,7 +36,7 @@ #include "utils.h" #include "dispatch.h" -unsigned driDispatchRemapTable[ driDispatchRemapTable_size ]; +int driDispatchRemapTable[ driDispatchRemapTable_size ]; #if defined(USE_X86_ASM) #include "x86/common_x86_asm.h" @@ -188,12 +188,18 @@ driGetRendererString( char * buffer, const char * hardware_name, #define need_GL_EXT_vertex_array #define need_GL_MESA_window_pos +/* This is needed in *all* drivers because Mesa internally implements + * glBlendFunc by calling glBlendFuncSeparateEXT. + */ +#define need_GL_EXT_blend_func_separate + #include "extension_helper.h" static const struct dri_extension all_mesa_extensions[] = { { "GL_ARB_multisample", GL_ARB_multisample_functions }, { "GL_ARB_transpose_matrix", GL_ARB_transpose_matrix_functions }, { "GL_ARB_window_pos", GL_ARB_window_pos_functions }, + { "GL_EXT_blend_func_separate", GL_EXT_blend_func_separate_functions }, { "GL_EXT_compiled_vertex_array", GL_EXT_compiled_vertex_array_functions }, { "GL_EXT_polygon_offset", GL_EXT_polygon_offset_functions }, { "GL_EXT_texture_object", GL_EXT_texture_object_functions }, @@ -220,6 +226,10 @@ void driInitExtensions( GLcontext * ctx, unsigned i; if ( first_time ) { + for ( i = 0 ; i < driDispatchRemapTable_size ; i++ ) { + driDispatchRemapTable[i] = -1; + } + first_time = 0; driInitExtensions( ctx, all_mesa_extensions, GL_FALSE ); } diff --git a/src/mesa/glapi/dispatch.h b/src/mesa/glapi/dispatch.h index 1e61edcf9f4..9a456b5409d 100644 --- a/src/mesa/glapi/dispatch.h +++ b/src/mesa/glapi/dispatch.h @@ -40,11 +40,20 @@ */ #define CALL_by_offset(disp, cast, offset, parameters) \ - (*(cast (((_glapi_proc *)(disp))[offset]))) parameters + (*(cast (GET_by_offset(disp, offset)))) parameters #define GET_by_offset(disp, offset) \ - (((_glapi_proc *)(disp))[offset]) + (offset >= 0) ? (((_glapi_proc *)(disp))[offset]) : NULL #define SET_by_offset(disp, offset, fn) \ - ((((_glapi_proc *)(disp))[offset]) = (_glapi_proc) fn) + do { \ + if ( (offset) < 0 ) { \ + /* fprintf( stderr, "[%s:%u] SET_by_offset(%p, %d, %s)!\n", */ \ + /* __func__, __LINE__, disp, offset, # fn); */ \ + /* abort(); */ \ + } \ + else { \ + ( (_glapi_proc *) (disp) )[offset] = (_glapi_proc) fn; \ + } \ + } while(0) #define CALL_NewList(disp, parameters) (*((disp)->NewList)) parameters #define GET_NewList(disp) ((disp)->NewList) @@ -2501,7 +2510,7 @@ #else #define driDispatchRemapTable_size 408 -extern unsigned driDispatchRemapTable[ driDispatchRemapTable_size ]; +extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; #define LoadTransposeMatrixfARB_remap_index 0 #define LoadTransposeMatrixdARB_remap_index 1 diff --git a/src/mesa/glapi/gl_offsets.py b/src/mesa/glapi/gl_offsets.py index 6f6be2069c2..2966e3b624b 100644 --- a/src/mesa/glapi/gl_offsets.py +++ b/src/mesa/glapi/gl_offsets.py @@ -41,13 +41,45 @@ class PrintGlOffsets(gl_XML.gl_print_base): return def printBody(self, api): - last_static = 0 + abi = [ "1.0", "1.1", "1.2", "GL_ARB_multitexture" ] + + functions = [] + abi_functions = [] + count = 0 for f in api.functionIterateByOffset(): + [category, num] = api.get_category_for_name( f.name ) + if category not in abi: + functions.append( [f, count] ) + count += 1 + else: + abi_functions.append( f ) + + + for f in abi_functions: + print '#define _gloffset_%s %d' % (f.name, f.offset) + last_static = f.offset + + print '' + print '#if !defined(IN_DRI_DRIVER)' + print '' + + for [f, index] in functions: print '#define _gloffset_%s %d' % (f.name, f.offset) if f.offset > last_static: last_static = f.offset print '#define _gloffset_FIRST_DYNAMIC %d' % (last_static + 1) + + print '' + print '#else' + print '' + + for [f, index] in functions: + print '#define _gloffset_%s driDispatchRemapTable[%s_remap_index]' % (f.name, f.name) + + print '' + print '#endif /* !defined(IN_DRI_DRIVER) */' + return diff --git a/src/mesa/glapi/gl_table.py b/src/mesa/glapi/gl_table.py index 864ac8a8c3e..52b4be1d2b5 100644 --- a/src/mesa/glapi/gl_table.py +++ b/src/mesa/glapi/gl_table.py @@ -91,11 +91,20 @@ class PrintRemapTable(gl_XML.gl_print_base): def printBody(self, api): print '#define CALL_by_offset(disp, cast, offset, parameters) \\' - print ' (*(cast (((_glapi_proc *)(disp))[offset]))) parameters' + print ' (*(cast (GET_by_offset(disp, offset)))) parameters' print '#define GET_by_offset(disp, offset) \\' - print ' (((_glapi_proc *)(disp))[offset])' + print ' (offset >= 0) ? (((_glapi_proc *)(disp))[offset]) : NULL' print '#define SET_by_offset(disp, offset, fn) \\' - print ' ((((_glapi_proc *)(disp))[offset]) = (_glapi_proc) fn)' + print ' do { \\' + print ' if ( (offset) < 0 ) { \\' + print ' /* fprintf( stderr, "[%s:%u] SET_by_offset(%p, %d, %s)!\\n", */ \\' + print ' /* __func__, __LINE__, disp, offset, # fn); */ \\' + print ' /* abort(); */ \\' + print ' } \\' + print ' else { \\' + print ' ( (_glapi_proc *) (disp) )[offset] = (_glapi_proc) fn; \\' + print ' } \\' + print ' } while(0)' print '' abi = [ "1.0", "1.1", "1.2", "GL_ARB_multitexture" ] @@ -131,7 +140,7 @@ class PrintRemapTable(gl_XML.gl_print_base): print '#else' print '' print '#define driDispatchRemapTable_size %u' % (count) - print 'extern unsigned driDispatchRemapTable[ driDispatchRemapTable_size ];' + print 'extern int driDispatchRemapTable[ driDispatchRemapTable_size ];' print '' for [f, index] in functions: diff --git a/src/mesa/glapi/glapioffsets.h b/src/mesa/glapi/glapioffsets.h index 262b69e67dd..9e266450e9e 100644 --- a/src/mesa/glapi/glapioffsets.h +++ b/src/mesa/glapi/glapioffsets.h @@ -437,6 +437,9 @@ #define _gloffset_MultiTexCoord4ivARB 405 #define _gloffset_MultiTexCoord4sARB 406 #define _gloffset_MultiTexCoord4svARB 407 + +#if !defined(IN_DRI_DRIVER) + #define _gloffset_LoadTransposeMatrixfARB 408 #define _gloffset_LoadTransposeMatrixdARB 409 #define _gloffset_MultTransposeMatrixfARB 410 @@ -847,4 +850,417 @@ #define _gloffset_StencilMaskSeparate 815 #define _gloffset_FIRST_DYNAMIC 816 +#else + +#define _gloffset_LoadTransposeMatrixfARB driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index] +#define _gloffset_LoadTransposeMatrixdARB driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index] +#define _gloffset_MultTransposeMatrixfARB driDispatchRemapTable[MultTransposeMatrixfARB_remap_index] +#define _gloffset_MultTransposeMatrixdARB driDispatchRemapTable[MultTransposeMatrixdARB_remap_index] +#define _gloffset_SampleCoverageARB driDispatchRemapTable[SampleCoverageARB_remap_index] +#define _gloffset_DrawBuffersARB driDispatchRemapTable[DrawBuffersARB_remap_index] +#define _gloffset_PolygonOffsetEXT driDispatchRemapTable[PolygonOffsetEXT_remap_index] +#define _gloffset_GetTexFilterFuncSGIS driDispatchRemapTable[GetTexFilterFuncSGIS_remap_index] +#define _gloffset_TexFilterFuncSGIS driDispatchRemapTable[TexFilterFuncSGIS_remap_index] +#define _gloffset_GetHistogramEXT driDispatchRemapTable[GetHistogramEXT_remap_index] +#define _gloffset_GetHistogramParameterfvEXT driDispatchRemapTable[GetHistogramParameterfvEXT_remap_index] +#define _gloffset_GetHistogramParameterivEXT driDispatchRemapTable[GetHistogramParameterivEXT_remap_index] +#define _gloffset_GetMinmaxEXT driDispatchRemapTable[GetMinmaxEXT_remap_index] +#define _gloffset_GetMinmaxParameterfvEXT driDispatchRemapTable[GetMinmaxParameterfvEXT_remap_index] +#define _gloffset_GetMinmaxParameterivEXT driDispatchRemapTable[GetMinmaxParameterivEXT_remap_index] +#define _gloffset_GetConvolutionFilterEXT driDispatchRemapTable[GetConvolutionFilterEXT_remap_index] +#define _gloffset_GetConvolutionParameterfvEXT driDispatchRemapTable[GetConvolutionParameterfvEXT_remap_index] +#define _gloffset_GetConvolutionParameterivEXT driDispatchRemapTable[GetConvolutionParameterivEXT_remap_index] +#define _gloffset_GetSeparableFilterEXT driDispatchRemapTable[GetSeparableFilterEXT_remap_index] +#define _gloffset_GetColorTableSGI driDispatchRemapTable[GetColorTableSGI_remap_index] +#define _gloffset_GetColorTableParameterfvSGI driDispatchRemapTable[GetColorTableParameterfvSGI_remap_index] +#define _gloffset_GetColorTableParameterivSGI driDispatchRemapTable[GetColorTableParameterivSGI_remap_index] +#define _gloffset_PixelTexGenSGIX driDispatchRemapTable[PixelTexGenSGIX_remap_index] +#define _gloffset_PixelTexGenParameteriSGIS driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index] +#define _gloffset_PixelTexGenParameterivSGIS driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index] +#define _gloffset_PixelTexGenParameterfSGIS driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index] +#define _gloffset_PixelTexGenParameterfvSGIS driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index] +#define _gloffset_GetPixelTexGenParameterivSGIS driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index] +#define _gloffset_GetPixelTexGenParameterfvSGIS driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index] +#define _gloffset_TexImage4DSGIS driDispatchRemapTable[TexImage4DSGIS_remap_index] +#define _gloffset_TexSubImage4DSGIS driDispatchRemapTable[TexSubImage4DSGIS_remap_index] +#define _gloffset_AreTexturesResidentEXT driDispatchRemapTable[AreTexturesResidentEXT_remap_index] +#define _gloffset_GenTexturesEXT driDispatchRemapTable[GenTexturesEXT_remap_index] +#define _gloffset_IsTextureEXT driDispatchRemapTable[IsTextureEXT_remap_index] +#define _gloffset_DetailTexFuncSGIS driDispatchRemapTable[DetailTexFuncSGIS_remap_index] +#define _gloffset_GetDetailTexFuncSGIS driDispatchRemapTable[GetDetailTexFuncSGIS_remap_index] +#define _gloffset_SharpenTexFuncSGIS driDispatchRemapTable[SharpenTexFuncSGIS_remap_index] +#define _gloffset_GetSharpenTexFuncSGIS driDispatchRemapTable[GetSharpenTexFuncSGIS_remap_index] +#define _gloffset_SampleMaskSGIS driDispatchRemapTable[SampleMaskSGIS_remap_index] +#define _gloffset_SamplePatternSGIS driDispatchRemapTable[SamplePatternSGIS_remap_index] +#define _gloffset_ColorPointerEXT driDispatchRemapTable[ColorPointerEXT_remap_index] +#define _gloffset_EdgeFlagPointerEXT driDispatchRemapTable[EdgeFlagPointerEXT_remap_index] +#define _gloffset_IndexPointerEXT driDispatchRemapTable[IndexPointerEXT_remap_index] +#define _gloffset_NormalPointerEXT driDispatchRemapTable[NormalPointerEXT_remap_index] +#define _gloffset_TexCoordPointerEXT driDispatchRemapTable[TexCoordPointerEXT_remap_index] +#define _gloffset_VertexPointerEXT driDispatchRemapTable[VertexPointerEXT_remap_index] +#define _gloffset_SpriteParameterfSGIX driDispatchRemapTable[SpriteParameterfSGIX_remap_index] +#define _gloffset_SpriteParameterfvSGIX driDispatchRemapTable[SpriteParameterfvSGIX_remap_index] +#define _gloffset_SpriteParameteriSGIX driDispatchRemapTable[SpriteParameteriSGIX_remap_index] +#define _gloffset_SpriteParameterivSGIX driDispatchRemapTable[SpriteParameterivSGIX_remap_index] +#define _gloffset_PointParameterfEXT driDispatchRemapTable[PointParameterfEXT_remap_index] +#define _gloffset_PointParameterfvEXT driDispatchRemapTable[PointParameterfvEXT_remap_index] +#define _gloffset_GetInstrumentsSGIX driDispatchRemapTable[GetInstrumentsSGIX_remap_index] +#define _gloffset_InstrumentsBufferSGIX driDispatchRemapTable[InstrumentsBufferSGIX_remap_index] +#define _gloffset_PollInstrumentsSGIX driDispatchRemapTable[PollInstrumentsSGIX_remap_index] +#define _gloffset_ReadInstrumentsSGIX driDispatchRemapTable[ReadInstrumentsSGIX_remap_index] +#define _gloffset_StartInstrumentsSGIX driDispatchRemapTable[StartInstrumentsSGIX_remap_index] +#define _gloffset_StopInstrumentsSGIX driDispatchRemapTable[StopInstrumentsSGIX_remap_index] +#define _gloffset_FrameZoomSGIX driDispatchRemapTable[FrameZoomSGIX_remap_index] +#define _gloffset_TagSampleBufferSGIX driDispatchRemapTable[TagSampleBufferSGIX_remap_index] +#define _gloffset_ReferencePlaneSGIX driDispatchRemapTable[ReferencePlaneSGIX_remap_index] +#define _gloffset_FlushRasterSGIX driDispatchRemapTable[FlushRasterSGIX_remap_index] +#define _gloffset_GetListParameterfvSGIX driDispatchRemapTable[GetListParameterfvSGIX_remap_index] +#define _gloffset_GetListParameterivSGIX driDispatchRemapTable[GetListParameterivSGIX_remap_index] +#define _gloffset_ListParameterfSGIX driDispatchRemapTable[ListParameterfSGIX_remap_index] +#define _gloffset_ListParameterfvSGIX driDispatchRemapTable[ListParameterfvSGIX_remap_index] +#define _gloffset_ListParameteriSGIX driDispatchRemapTable[ListParameteriSGIX_remap_index] +#define _gloffset_ListParameterivSGIX driDispatchRemapTable[ListParameterivSGIX_remap_index] +#define _gloffset_FragmentColorMaterialSGIX driDispatchRemapTable[FragmentColorMaterialSGIX_remap_index] +#define _gloffset_FragmentLightfSGIX driDispatchRemapTable[FragmentLightfSGIX_remap_index] +#define _gloffset_FragmentLightfvSGIX driDispatchRemapTable[FragmentLightfvSGIX_remap_index] +#define _gloffset_FragmentLightiSGIX driDispatchRemapTable[FragmentLightiSGIX_remap_index] +#define _gloffset_FragmentLightivSGIX driDispatchRemapTable[FragmentLightivSGIX_remap_index] +#define _gloffset_FragmentLightModelfSGIX driDispatchRemapTable[FragmentLightModelfSGIX_remap_index] +#define _gloffset_FragmentLightModelfvSGIX driDispatchRemapTable[FragmentLightModelfvSGIX_remap_index] +#define _gloffset_FragmentLightModeliSGIX driDispatchRemapTable[FragmentLightModeliSGIX_remap_index] +#define _gloffset_FragmentLightModelivSGIX driDispatchRemapTable[FragmentLightModelivSGIX_remap_index] +#define _gloffset_FragmentMaterialfSGIX driDispatchRemapTable[FragmentMaterialfSGIX_remap_index] +#define _gloffset_FragmentMaterialfvSGIX driDispatchRemapTable[FragmentMaterialfvSGIX_remap_index] +#define _gloffset_FragmentMaterialiSGIX driDispatchRemapTable[FragmentMaterialiSGIX_remap_index] +#define _gloffset_FragmentMaterialivSGIX driDispatchRemapTable[FragmentMaterialivSGIX_remap_index] +#define _gloffset_GetFragmentLightfvSGIX driDispatchRemapTable[GetFragmentLightfvSGIX_remap_index] +#define _gloffset_GetFragmentLightivSGIX driDispatchRemapTable[GetFragmentLightivSGIX_remap_index] +#define _gloffset_GetFragmentMaterialfvSGIX driDispatchRemapTable[GetFragmentMaterialfvSGIX_remap_index] +#define _gloffset_GetFragmentMaterialivSGIX driDispatchRemapTable[GetFragmentMaterialivSGIX_remap_index] +#define _gloffset_LightEnviSGIX driDispatchRemapTable[LightEnviSGIX_remap_index] +#define _gloffset_VertexWeightfEXT driDispatchRemapTable[VertexWeightfEXT_remap_index] +#define _gloffset_VertexWeightfvEXT driDispatchRemapTable[VertexWeightfvEXT_remap_index] +#define _gloffset_VertexWeightPointerEXT driDispatchRemapTable[VertexWeightPointerEXT_remap_index] +#define _gloffset_FlushVertexArrayRangeNV driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index] +#define _gloffset_VertexArrayRangeNV driDispatchRemapTable[VertexArrayRangeNV_remap_index] +#define _gloffset_CombinerParameterfvNV driDispatchRemapTable[CombinerParameterfvNV_remap_index] +#define _gloffset_CombinerParameterfNV driDispatchRemapTable[CombinerParameterfNV_remap_index] +#define _gloffset_CombinerParameterivNV driDispatchRemapTable[CombinerParameterivNV_remap_index] +#define _gloffset_CombinerParameteriNV driDispatchRemapTable[CombinerParameteriNV_remap_index] +#define _gloffset_CombinerInputNV driDispatchRemapTable[CombinerInputNV_remap_index] +#define _gloffset_CombinerOutputNV driDispatchRemapTable[CombinerOutputNV_remap_index] +#define _gloffset_FinalCombinerInputNV driDispatchRemapTable[FinalCombinerInputNV_remap_index] +#define _gloffset_GetCombinerInputParameterfvNV driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index] +#define _gloffset_GetCombinerInputParameterivNV driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index] +#define _gloffset_GetCombinerOutputParameterfvNV driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index] +#define _gloffset_GetCombinerOutputParameterivNV driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index] +#define _gloffset_GetFinalCombinerInputParameterfvNV driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index] +#define _gloffset_GetFinalCombinerInputParameterivNV driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index] +#define _gloffset_ResizeBuffersMESA driDispatchRemapTable[ResizeBuffersMESA_remap_index] +#define _gloffset_WindowPos2dMESA driDispatchRemapTable[WindowPos2dMESA_remap_index] +#define _gloffset_WindowPos2dvMESA driDispatchRemapTable[WindowPos2dvMESA_remap_index] +#define _gloffset_WindowPos2fMESA driDispatchRemapTable[WindowPos2fMESA_remap_index] +#define _gloffset_WindowPos2fvMESA driDispatchRemapTable[WindowPos2fvMESA_remap_index] +#define _gloffset_WindowPos2iMESA driDispatchRemapTable[WindowPos2iMESA_remap_index] +#define _gloffset_WindowPos2ivMESA driDispatchRemapTable[WindowPos2ivMESA_remap_index] +#define _gloffset_WindowPos2sMESA driDispatchRemapTable[WindowPos2sMESA_remap_index] +#define _gloffset_WindowPos2svMESA driDispatchRemapTable[WindowPos2svMESA_remap_index] +#define _gloffset_WindowPos3dMESA driDispatchRemapTable[WindowPos3dMESA_remap_index] +#define _gloffset_WindowPos3dvMESA driDispatchRemapTable[WindowPos3dvMESA_remap_index] +#define _gloffset_WindowPos3fMESA driDispatchRemapTable[WindowPos3fMESA_remap_index] +#define _gloffset_WindowPos3fvMESA driDispatchRemapTable[WindowPos3fvMESA_remap_index] +#define _gloffset_WindowPos3iMESA driDispatchRemapTable[WindowPos3iMESA_remap_index] +#define _gloffset_WindowPos3ivMESA driDispatchRemapTable[WindowPos3ivMESA_remap_index] +#define _gloffset_WindowPos3sMESA driDispatchRemapTable[WindowPos3sMESA_remap_index] +#define _gloffset_WindowPos3svMESA driDispatchRemapTable[WindowPos3svMESA_remap_index] +#define _gloffset_WindowPos4dMESA driDispatchRemapTable[WindowPos4dMESA_remap_index] +#define _gloffset_WindowPos4dvMESA driDispatchRemapTable[WindowPos4dvMESA_remap_index] +#define _gloffset_WindowPos4fMESA driDispatchRemapTable[WindowPos4fMESA_remap_index] +#define _gloffset_WindowPos4fvMESA driDispatchRemapTable[WindowPos4fvMESA_remap_index] +#define _gloffset_WindowPos4iMESA driDispatchRemapTable[WindowPos4iMESA_remap_index] +#define _gloffset_WindowPos4ivMESA driDispatchRemapTable[WindowPos4ivMESA_remap_index] +#define _gloffset_WindowPos4sMESA driDispatchRemapTable[WindowPos4sMESA_remap_index] +#define _gloffset_WindowPos4svMESA driDispatchRemapTable[WindowPos4svMESA_remap_index] +#define _gloffset_BlendFuncSeparateEXT driDispatchRemapTable[BlendFuncSeparateEXT_remap_index] +#define _gloffset_IndexMaterialEXT driDispatchRemapTable[IndexMaterialEXT_remap_index] +#define _gloffset_IndexFuncEXT driDispatchRemapTable[IndexFuncEXT_remap_index] +#define _gloffset_LockArraysEXT driDispatchRemapTable[LockArraysEXT_remap_index] +#define _gloffset_UnlockArraysEXT driDispatchRemapTable[UnlockArraysEXT_remap_index] +#define _gloffset_CullParameterdvEXT driDispatchRemapTable[CullParameterdvEXT_remap_index] +#define _gloffset_CullParameterfvEXT driDispatchRemapTable[CullParameterfvEXT_remap_index] +#define _gloffset_HintPGI driDispatchRemapTable[HintPGI_remap_index] +#define _gloffset_FogCoordfEXT driDispatchRemapTable[FogCoordfEXT_remap_index] +#define _gloffset_FogCoordfvEXT driDispatchRemapTable[FogCoordfvEXT_remap_index] +#define _gloffset_FogCoorddEXT driDispatchRemapTable[FogCoorddEXT_remap_index] +#define _gloffset_FogCoorddvEXT driDispatchRemapTable[FogCoorddvEXT_remap_index] +#define _gloffset_FogCoordPointerEXT driDispatchRemapTable[FogCoordPointerEXT_remap_index] +#define _gloffset_GetColorTableEXT driDispatchRemapTable[GetColorTableEXT_remap_index] +#define _gloffset_GetColorTableParameterivEXT driDispatchRemapTable[GetColorTableParameterivEXT_remap_index] +#define _gloffset_GetColorTableParameterfvEXT driDispatchRemapTable[GetColorTableParameterfvEXT_remap_index] +#define _gloffset_TbufferMask3DFX driDispatchRemapTable[TbufferMask3DFX_remap_index] +#define _gloffset_CompressedTexImage3DARB driDispatchRemapTable[CompressedTexImage3DARB_remap_index] +#define _gloffset_CompressedTexImage2DARB driDispatchRemapTable[CompressedTexImage2DARB_remap_index] +#define _gloffset_CompressedTexImage1DARB driDispatchRemapTable[CompressedTexImage1DARB_remap_index] +#define _gloffset_CompressedTexSubImage3DARB driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index] +#define _gloffset_CompressedTexSubImage2DARB driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index] +#define _gloffset_CompressedTexSubImage1DARB driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index] +#define _gloffset_GetCompressedTexImageARB driDispatchRemapTable[GetCompressedTexImageARB_remap_index] +#define _gloffset_SecondaryColor3bEXT driDispatchRemapTable[SecondaryColor3bEXT_remap_index] +#define _gloffset_SecondaryColor3bvEXT driDispatchRemapTable[SecondaryColor3bvEXT_remap_index] +#define _gloffset_SecondaryColor3dEXT driDispatchRemapTable[SecondaryColor3dEXT_remap_index] +#define _gloffset_SecondaryColor3dvEXT driDispatchRemapTable[SecondaryColor3dvEXT_remap_index] +#define _gloffset_SecondaryColor3fEXT driDispatchRemapTable[SecondaryColor3fEXT_remap_index] +#define _gloffset_SecondaryColor3fvEXT driDispatchRemapTable[SecondaryColor3fvEXT_remap_index] +#define _gloffset_SecondaryColor3iEXT driDispatchRemapTable[SecondaryColor3iEXT_remap_index] +#define _gloffset_SecondaryColor3ivEXT driDispatchRemapTable[SecondaryColor3ivEXT_remap_index] +#define _gloffset_SecondaryColor3sEXT driDispatchRemapTable[SecondaryColor3sEXT_remap_index] +#define _gloffset_SecondaryColor3svEXT driDispatchRemapTable[SecondaryColor3svEXT_remap_index] +#define _gloffset_SecondaryColor3ubEXT driDispatchRemapTable[SecondaryColor3ubEXT_remap_index] +#define _gloffset_SecondaryColor3ubvEXT driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index] +#define _gloffset_SecondaryColor3uiEXT driDispatchRemapTable[SecondaryColor3uiEXT_remap_index] +#define _gloffset_SecondaryColor3uivEXT driDispatchRemapTable[SecondaryColor3uivEXT_remap_index] +#define _gloffset_SecondaryColor3usEXT driDispatchRemapTable[SecondaryColor3usEXT_remap_index] +#define _gloffset_SecondaryColor3usvEXT driDispatchRemapTable[SecondaryColor3usvEXT_remap_index] +#define _gloffset_SecondaryColorPointerEXT driDispatchRemapTable[SecondaryColorPointerEXT_remap_index] +#define _gloffset_AreProgramsResidentNV driDispatchRemapTable[AreProgramsResidentNV_remap_index] +#define _gloffset_BindProgramNV driDispatchRemapTable[BindProgramNV_remap_index] +#define _gloffset_DeleteProgramsNV driDispatchRemapTable[DeleteProgramsNV_remap_index] +#define _gloffset_ExecuteProgramNV driDispatchRemapTable[ExecuteProgramNV_remap_index] +#define _gloffset_GenProgramsNV driDispatchRemapTable[GenProgramsNV_remap_index] +#define _gloffset_GetProgramParameterdvNV driDispatchRemapTable[GetProgramParameterdvNV_remap_index] +#define _gloffset_GetProgramParameterfvNV driDispatchRemapTable[GetProgramParameterfvNV_remap_index] +#define _gloffset_GetProgramivNV driDispatchRemapTable[GetProgramivNV_remap_index] +#define _gloffset_GetProgramStringNV driDispatchRemapTable[GetProgramStringNV_remap_index] +#define _gloffset_GetTrackMatrixivNV driDispatchRemapTable[GetTrackMatrixivNV_remap_index] +#define _gloffset_GetVertexAttribdvARB driDispatchRemapTable[GetVertexAttribdvARB_remap_index] +#define _gloffset_GetVertexAttribfvARB driDispatchRemapTable[GetVertexAttribfvARB_remap_index] +#define _gloffset_GetVertexAttribivARB driDispatchRemapTable[GetVertexAttribivARB_remap_index] +#define _gloffset_GetVertexAttribPointervNV driDispatchRemapTable[GetVertexAttribPointervNV_remap_index] +#define _gloffset_IsProgramNV driDispatchRemapTable[IsProgramNV_remap_index] +#define _gloffset_LoadProgramNV driDispatchRemapTable[LoadProgramNV_remap_index] +#define _gloffset_ProgramParameter4dNV driDispatchRemapTable[ProgramParameter4dNV_remap_index] +#define _gloffset_ProgramParameter4dvNV driDispatchRemapTable[ProgramParameter4dvNV_remap_index] +#define _gloffset_ProgramParameter4fNV driDispatchRemapTable[ProgramParameter4fNV_remap_index] +#define _gloffset_ProgramParameter4fvNV driDispatchRemapTable[ProgramParameter4fvNV_remap_index] +#define _gloffset_ProgramParameters4dvNV driDispatchRemapTable[ProgramParameters4dvNV_remap_index] +#define _gloffset_ProgramParameters4fvNV driDispatchRemapTable[ProgramParameters4fvNV_remap_index] +#define _gloffset_RequestResidentProgramsNV driDispatchRemapTable[RequestResidentProgramsNV_remap_index] +#define _gloffset_TrackMatrixNV driDispatchRemapTable[TrackMatrixNV_remap_index] +#define _gloffset_VertexAttribPointerNV driDispatchRemapTable[VertexAttribPointerNV_remap_index] +#define _gloffset_VertexAttrib1dARB driDispatchRemapTable[VertexAttrib1dARB_remap_index] +#define _gloffset_VertexAttrib1dvARB driDispatchRemapTable[VertexAttrib1dvARB_remap_index] +#define _gloffset_VertexAttrib1fARB driDispatchRemapTable[VertexAttrib1fARB_remap_index] +#define _gloffset_VertexAttrib1fvARB driDispatchRemapTable[VertexAttrib1fvARB_remap_index] +#define _gloffset_VertexAttrib1sARB driDispatchRemapTable[VertexAttrib1sARB_remap_index] +#define _gloffset_VertexAttrib1svARB driDispatchRemapTable[VertexAttrib1svARB_remap_index] +#define _gloffset_VertexAttrib2dARB driDispatchRemapTable[VertexAttrib2dARB_remap_index] +#define _gloffset_VertexAttrib2dvARB driDispatchRemapTable[VertexAttrib2dvARB_remap_index] +#define _gloffset_VertexAttrib2fARB driDispatchRemapTable[VertexAttrib2fARB_remap_index] +#define _gloffset_VertexAttrib2fvARB driDispatchRemapTable[VertexAttrib2fvARB_remap_index] +#define _gloffset_VertexAttrib2sARB driDispatchRemapTable[VertexAttrib2sARB_remap_index] +#define _gloffset_VertexAttrib2svARB driDispatchRemapTable[VertexAttrib2svARB_remap_index] +#define _gloffset_VertexAttrib3dARB driDispatchRemapTable[VertexAttrib3dARB_remap_index] +#define _gloffset_VertexAttrib3dvARB driDispatchRemapTable[VertexAttrib3dvARB_remap_index] +#define _gloffset_VertexAttrib3fARB driDispatchRemapTable[VertexAttrib3fARB_remap_index] +#define _gloffset_VertexAttrib3fvARB driDispatchRemapTable[VertexAttrib3fvARB_remap_index] +#define _gloffset_VertexAttrib3sARB driDispatchRemapTable[VertexAttrib3sARB_remap_index] +#define _gloffset_VertexAttrib3svARB driDispatchRemapTable[VertexAttrib3svARB_remap_index] +#define _gloffset_VertexAttrib4dARB driDispatchRemapTable[VertexAttrib4dARB_remap_index] +#define _gloffset_VertexAttrib4dvARB driDispatchRemapTable[VertexAttrib4dvARB_remap_index] +#define _gloffset_VertexAttrib4fARB driDispatchRemapTable[VertexAttrib4fARB_remap_index] +#define _gloffset_VertexAttrib4fvARB driDispatchRemapTable[VertexAttrib4fvARB_remap_index] +#define _gloffset_VertexAttrib4sARB driDispatchRemapTable[VertexAttrib4sARB_remap_index] +#define _gloffset_VertexAttrib4svARB driDispatchRemapTable[VertexAttrib4svARB_remap_index] +#define _gloffset_VertexAttrib4NubARB driDispatchRemapTable[VertexAttrib4NubARB_remap_index] +#define _gloffset_VertexAttrib4NubvARB driDispatchRemapTable[VertexAttrib4NubvARB_remap_index] +#define _gloffset_VertexAttribs1dvNV driDispatchRemapTable[VertexAttribs1dvNV_remap_index] +#define _gloffset_VertexAttribs1fvNV driDispatchRemapTable[VertexAttribs1fvNV_remap_index] +#define _gloffset_VertexAttribs1svNV driDispatchRemapTable[VertexAttribs1svNV_remap_index] +#define _gloffset_VertexAttribs2dvNV driDispatchRemapTable[VertexAttribs2dvNV_remap_index] +#define _gloffset_VertexAttribs2fvNV driDispatchRemapTable[VertexAttribs2fvNV_remap_index] +#define _gloffset_VertexAttribs2svNV driDispatchRemapTable[VertexAttribs2svNV_remap_index] +#define _gloffset_VertexAttribs3dvNV driDispatchRemapTable[VertexAttribs3dvNV_remap_index] +#define _gloffset_VertexAttribs3fvNV driDispatchRemapTable[VertexAttribs3fvNV_remap_index] +#define _gloffset_VertexAttribs3svNV driDispatchRemapTable[VertexAttribs3svNV_remap_index] +#define _gloffset_VertexAttribs4dvNV driDispatchRemapTable[VertexAttribs4dvNV_remap_index] +#define _gloffset_VertexAttribs4fvNV driDispatchRemapTable[VertexAttribs4fvNV_remap_index] +#define _gloffset_VertexAttribs4svNV driDispatchRemapTable[VertexAttribs4svNV_remap_index] +#define _gloffset_VertexAttribs4ubvNV driDispatchRemapTable[VertexAttribs4ubvNV_remap_index] +#define _gloffset_PointParameteriNV driDispatchRemapTable[PointParameteriNV_remap_index] +#define _gloffset_PointParameterivNV driDispatchRemapTable[PointParameterivNV_remap_index] +#define _gloffset_MultiDrawArraysEXT driDispatchRemapTable[MultiDrawArraysEXT_remap_index] +#define _gloffset_MultiDrawElementsEXT driDispatchRemapTable[MultiDrawElementsEXT_remap_index] +#define _gloffset_ActiveStencilFaceEXT driDispatchRemapTable[ActiveStencilFaceEXT_remap_index] +#define _gloffset_DeleteFencesNV driDispatchRemapTable[DeleteFencesNV_remap_index] +#define _gloffset_GenFencesNV driDispatchRemapTable[GenFencesNV_remap_index] +#define _gloffset_IsFenceNV driDispatchRemapTable[IsFenceNV_remap_index] +#define _gloffset_TestFenceNV driDispatchRemapTable[TestFenceNV_remap_index] +#define _gloffset_GetFenceivNV driDispatchRemapTable[GetFenceivNV_remap_index] +#define _gloffset_FinishFenceNV driDispatchRemapTable[FinishFenceNV_remap_index] +#define _gloffset_SetFenceNV driDispatchRemapTable[SetFenceNV_remap_index] +#define _gloffset_VertexAttrib4bvARB driDispatchRemapTable[VertexAttrib4bvARB_remap_index] +#define _gloffset_VertexAttrib4ivARB driDispatchRemapTable[VertexAttrib4ivARB_remap_index] +#define _gloffset_VertexAttrib4ubvARB driDispatchRemapTable[VertexAttrib4ubvARB_remap_index] +#define _gloffset_VertexAttrib4usvARB driDispatchRemapTable[VertexAttrib4usvARB_remap_index] +#define _gloffset_VertexAttrib4uivARB driDispatchRemapTable[VertexAttrib4uivARB_remap_index] +#define _gloffset_VertexAttrib4NbvARB driDispatchRemapTable[VertexAttrib4NbvARB_remap_index] +#define _gloffset_VertexAttrib4NsvARB driDispatchRemapTable[VertexAttrib4NsvARB_remap_index] +#define _gloffset_VertexAttrib4NivARB driDispatchRemapTable[VertexAttrib4NivARB_remap_index] +#define _gloffset_VertexAttrib4NusvARB driDispatchRemapTable[VertexAttrib4NusvARB_remap_index] +#define _gloffset_VertexAttrib4NuivARB driDispatchRemapTable[VertexAttrib4NuivARB_remap_index] +#define _gloffset_VertexAttribPointerARB driDispatchRemapTable[VertexAttribPointerARB_remap_index] +#define _gloffset_EnableVertexAttribArrayARB driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index] +#define _gloffset_DisableVertexAttribArrayARB driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index] +#define _gloffset_ProgramStringARB driDispatchRemapTable[ProgramStringARB_remap_index] +#define _gloffset_ProgramEnvParameter4dARB driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index] +#define _gloffset_ProgramEnvParameter4dvARB driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index] +#define _gloffset_ProgramEnvParameter4fARB driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index] +#define _gloffset_ProgramEnvParameter4fvARB driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index] +#define _gloffset_ProgramLocalParameter4dARB driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index] +#define _gloffset_ProgramLocalParameter4dvARB driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index] +#define _gloffset_ProgramLocalParameter4fARB driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index] +#define _gloffset_ProgramLocalParameter4fvARB driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index] +#define _gloffset_GetProgramEnvParameterdvARB driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index] +#define _gloffset_GetProgramEnvParameterfvARB driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index] +#define _gloffset_GetProgramLocalParameterdvARB driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index] +#define _gloffset_GetProgramLocalParameterfvARB driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index] +#define _gloffset_GetProgramivARB driDispatchRemapTable[GetProgramivARB_remap_index] +#define _gloffset_GetProgramStringARB driDispatchRemapTable[GetProgramStringARB_remap_index] +#define _gloffset_ProgramNamedParameter4fNV driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index] +#define _gloffset_ProgramNamedParameter4dNV driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index] +#define _gloffset_ProgramNamedParameter4fvNV driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index] +#define _gloffset_ProgramNamedParameter4dvNV driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index] +#define _gloffset_GetProgramNamedParameterfvNV driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index] +#define _gloffset_GetProgramNamedParameterdvNV driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index] +#define _gloffset_BindBufferARB driDispatchRemapTable[BindBufferARB_remap_index] +#define _gloffset_BufferDataARB driDispatchRemapTable[BufferDataARB_remap_index] +#define _gloffset_BufferSubDataARB driDispatchRemapTable[BufferSubDataARB_remap_index] +#define _gloffset_DeleteBuffersARB driDispatchRemapTable[DeleteBuffersARB_remap_index] +#define _gloffset_GenBuffersARB driDispatchRemapTable[GenBuffersARB_remap_index] +#define _gloffset_GetBufferParameterivARB driDispatchRemapTable[GetBufferParameterivARB_remap_index] +#define _gloffset_GetBufferPointervARB driDispatchRemapTable[GetBufferPointervARB_remap_index] +#define _gloffset_GetBufferSubDataARB driDispatchRemapTable[GetBufferSubDataARB_remap_index] +#define _gloffset_IsBufferARB driDispatchRemapTable[IsBufferARB_remap_index] +#define _gloffset_MapBufferARB driDispatchRemapTable[MapBufferARB_remap_index] +#define _gloffset_UnmapBufferARB driDispatchRemapTable[UnmapBufferARB_remap_index] +#define _gloffset_DepthBoundsEXT driDispatchRemapTable[DepthBoundsEXT_remap_index] +#define _gloffset_GenQueriesARB driDispatchRemapTable[GenQueriesARB_remap_index] +#define _gloffset_DeleteQueriesARB driDispatchRemapTable[DeleteQueriesARB_remap_index] +#define _gloffset_IsQueryARB driDispatchRemapTable[IsQueryARB_remap_index] +#define _gloffset_BeginQueryARB driDispatchRemapTable[BeginQueryARB_remap_index] +#define _gloffset_EndQueryARB driDispatchRemapTable[EndQueryARB_remap_index] +#define _gloffset_GetQueryivARB driDispatchRemapTable[GetQueryivARB_remap_index] +#define _gloffset_GetQueryObjectivARB driDispatchRemapTable[GetQueryObjectivARB_remap_index] +#define _gloffset_GetQueryObjectuivARB driDispatchRemapTable[GetQueryObjectuivARB_remap_index] +#define _gloffset_MultiModeDrawArraysIBM driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index] +#define _gloffset_MultiModeDrawElementsIBM driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index] +#define _gloffset_BlendEquationSeparateEXT driDispatchRemapTable[BlendEquationSeparateEXT_remap_index] +#define _gloffset_DeleteObjectARB driDispatchRemapTable[DeleteObjectARB_remap_index] +#define _gloffset_GetHandleARB driDispatchRemapTable[GetHandleARB_remap_index] +#define _gloffset_DetachObjectARB driDispatchRemapTable[DetachObjectARB_remap_index] +#define _gloffset_CreateShaderObjectARB driDispatchRemapTable[CreateShaderObjectARB_remap_index] +#define _gloffset_ShaderSourceARB driDispatchRemapTable[ShaderSourceARB_remap_index] +#define _gloffset_CompileShaderARB driDispatchRemapTable[CompileShaderARB_remap_index] +#define _gloffset_CreateProgramObjectARB driDispatchRemapTable[CreateProgramObjectARB_remap_index] +#define _gloffset_AttachObjectARB driDispatchRemapTable[AttachObjectARB_remap_index] +#define _gloffset_LinkProgramARB driDispatchRemapTable[LinkProgramARB_remap_index] +#define _gloffset_UseProgramObjectARB driDispatchRemapTable[UseProgramObjectARB_remap_index] +#define _gloffset_ValidateProgramARB driDispatchRemapTable[ValidateProgramARB_remap_index] +#define _gloffset_Uniform1fARB driDispatchRemapTable[Uniform1fARB_remap_index] +#define _gloffset_Uniform2fARB driDispatchRemapTable[Uniform2fARB_remap_index] +#define _gloffset_Uniform3fARB driDispatchRemapTable[Uniform3fARB_remap_index] +#define _gloffset_Uniform4fARB driDispatchRemapTable[Uniform4fARB_remap_index] +#define _gloffset_Uniform1iARB driDispatchRemapTable[Uniform1iARB_remap_index] +#define _gloffset_Uniform2iARB driDispatchRemapTable[Uniform2iARB_remap_index] +#define _gloffset_Uniform3iARB driDispatchRemapTable[Uniform3iARB_remap_index] +#define _gloffset_Uniform4iARB driDispatchRemapTable[Uniform4iARB_remap_index] +#define _gloffset_Uniform1fvARB driDispatchRemapTable[Uniform1fvARB_remap_index] +#define _gloffset_Uniform2fvARB driDispatchRemapTable[Uniform2fvARB_remap_index] +#define _gloffset_Uniform3fvARB driDispatchRemapTable[Uniform3fvARB_remap_index] +#define _gloffset_Uniform4fvARB driDispatchRemapTable[Uniform4fvARB_remap_index] +#define _gloffset_Uniform1ivARB driDispatchRemapTable[Uniform1ivARB_remap_index] +#define _gloffset_Uniform2ivARB driDispatchRemapTable[Uniform2ivARB_remap_index] +#define _gloffset_Uniform3ivARB driDispatchRemapTable[Uniform3ivARB_remap_index] +#define _gloffset_Uniform4ivARB driDispatchRemapTable[Uniform4ivARB_remap_index] +#define _gloffset_UniformMatrix2fvARB driDispatchRemapTable[UniformMatrix2fvARB_remap_index] +#define _gloffset_UniformMatrix3fvARB driDispatchRemapTable[UniformMatrix3fvARB_remap_index] +#define _gloffset_UniformMatrix4fvARB driDispatchRemapTable[UniformMatrix4fvARB_remap_index] +#define _gloffset_GetObjectParameterfvARB driDispatchRemapTable[GetObjectParameterfvARB_remap_index] +#define _gloffset_GetObjectParameterivARB driDispatchRemapTable[GetObjectParameterivARB_remap_index] +#define _gloffset_GetInfoLogARB driDispatchRemapTable[GetInfoLogARB_remap_index] +#define _gloffset_GetAttachedObjectsARB driDispatchRemapTable[GetAttachedObjectsARB_remap_index] +#define _gloffset_GetUniformLocationARB driDispatchRemapTable[GetUniformLocationARB_remap_index] +#define _gloffset_GetActiveUniformARB driDispatchRemapTable[GetActiveUniformARB_remap_index] +#define _gloffset_GetUniformfvARB driDispatchRemapTable[GetUniformfvARB_remap_index] +#define _gloffset_GetUniformivARB driDispatchRemapTable[GetUniformivARB_remap_index] +#define _gloffset_GetShaderSourceARB driDispatchRemapTable[GetShaderSourceARB_remap_index] +#define _gloffset_BindAttribLocationARB driDispatchRemapTable[BindAttribLocationARB_remap_index] +#define _gloffset_GetActiveAttribARB driDispatchRemapTable[GetActiveAttribARB_remap_index] +#define _gloffset_GetAttribLocationARB driDispatchRemapTable[GetAttribLocationARB_remap_index] +#define _gloffset_GetVertexAttribdvNV driDispatchRemapTable[GetVertexAttribdvNV_remap_index] +#define _gloffset_GetVertexAttribfvNV driDispatchRemapTable[GetVertexAttribfvNV_remap_index] +#define _gloffset_GetVertexAttribivNV driDispatchRemapTable[GetVertexAttribivNV_remap_index] +#define _gloffset_VertexAttrib1dNV driDispatchRemapTable[VertexAttrib1dNV_remap_index] +#define _gloffset_VertexAttrib1dvNV driDispatchRemapTable[VertexAttrib1dvNV_remap_index] +#define _gloffset_VertexAttrib1fNV driDispatchRemapTable[VertexAttrib1fNV_remap_index] +#define _gloffset_VertexAttrib1fvNV driDispatchRemapTable[VertexAttrib1fvNV_remap_index] +#define _gloffset_VertexAttrib1sNV driDispatchRemapTable[VertexAttrib1sNV_remap_index] +#define _gloffset_VertexAttrib1svNV driDispatchRemapTable[VertexAttrib1svNV_remap_index] +#define _gloffset_VertexAttrib2dNV driDispatchRemapTable[VertexAttrib2dNV_remap_index] +#define _gloffset_VertexAttrib2dvNV driDispatchRemapTable[VertexAttrib2dvNV_remap_index] +#define _gloffset_VertexAttrib2fNV driDispatchRemapTable[VertexAttrib2fNV_remap_index] +#define _gloffset_VertexAttrib2fvNV driDispatchRemapTable[VertexAttrib2fvNV_remap_index] +#define _gloffset_VertexAttrib2sNV driDispatchRemapTable[VertexAttrib2sNV_remap_index] +#define _gloffset_VertexAttrib2svNV driDispatchRemapTable[VertexAttrib2svNV_remap_index] +#define _gloffset_VertexAttrib3dNV driDispatchRemapTable[VertexAttrib3dNV_remap_index] +#define _gloffset_VertexAttrib3dvNV driDispatchRemapTable[VertexAttrib3dvNV_remap_index] +#define _gloffset_VertexAttrib3fNV driDispatchRemapTable[VertexAttrib3fNV_remap_index] +#define _gloffset_VertexAttrib3fvNV driDispatchRemapTable[VertexAttrib3fvNV_remap_index] +#define _gloffset_VertexAttrib3sNV driDispatchRemapTable[VertexAttrib3sNV_remap_index] +#define _gloffset_VertexAttrib3svNV driDispatchRemapTable[VertexAttrib3svNV_remap_index] +#define _gloffset_VertexAttrib4dNV driDispatchRemapTable[VertexAttrib4dNV_remap_index] +#define _gloffset_VertexAttrib4dvNV driDispatchRemapTable[VertexAttrib4dvNV_remap_index] +#define _gloffset_VertexAttrib4fNV driDispatchRemapTable[VertexAttrib4fNV_remap_index] +#define _gloffset_VertexAttrib4fvNV driDispatchRemapTable[VertexAttrib4fvNV_remap_index] +#define _gloffset_VertexAttrib4sNV driDispatchRemapTable[VertexAttrib4sNV_remap_index] +#define _gloffset_VertexAttrib4svNV driDispatchRemapTable[VertexAttrib4svNV_remap_index] +#define _gloffset_VertexAttrib4ubNV driDispatchRemapTable[VertexAttrib4ubNV_remap_index] +#define _gloffset_VertexAttrib4ubvNV driDispatchRemapTable[VertexAttrib4ubvNV_remap_index] +#define _gloffset_GenFragmentShadersATI driDispatchRemapTable[GenFragmentShadersATI_remap_index] +#define _gloffset_BindFragmentShaderATI driDispatchRemapTable[BindFragmentShaderATI_remap_index] +#define _gloffset_DeleteFragmentShaderATI driDispatchRemapTable[DeleteFragmentShaderATI_remap_index] +#define _gloffset_BeginFragmentShaderATI driDispatchRemapTable[BeginFragmentShaderATI_remap_index] +#define _gloffset_EndFragmentShaderATI driDispatchRemapTable[EndFragmentShaderATI_remap_index] +#define _gloffset_PassTexCoordATI driDispatchRemapTable[PassTexCoordATI_remap_index] +#define _gloffset_SampleMapATI driDispatchRemapTable[SampleMapATI_remap_index] +#define _gloffset_ColorFragmentOp1ATI driDispatchRemapTable[ColorFragmentOp1ATI_remap_index] +#define _gloffset_ColorFragmentOp2ATI driDispatchRemapTable[ColorFragmentOp2ATI_remap_index] +#define _gloffset_ColorFragmentOp3ATI driDispatchRemapTable[ColorFragmentOp3ATI_remap_index] +#define _gloffset_AlphaFragmentOp1ATI driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index] +#define _gloffset_AlphaFragmentOp2ATI driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index] +#define _gloffset_AlphaFragmentOp3ATI driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index] +#define _gloffset_SetFragmentShaderConstantATI driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index] +#define _gloffset_IsRenderbufferEXT driDispatchRemapTable[IsRenderbufferEXT_remap_index] +#define _gloffset_BindRenderbufferEXT driDispatchRemapTable[BindRenderbufferEXT_remap_index] +#define _gloffset_DeleteRenderbuffersEXT driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index] +#define _gloffset_GenRenderbuffersEXT driDispatchRemapTable[GenRenderbuffersEXT_remap_index] +#define _gloffset_RenderbufferStorageEXT driDispatchRemapTable[RenderbufferStorageEXT_remap_index] +#define _gloffset_GetRenderbufferParameterivEXT driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index] +#define _gloffset_IsFramebufferEXT driDispatchRemapTable[IsFramebufferEXT_remap_index] +#define _gloffset_BindFramebufferEXT driDispatchRemapTable[BindFramebufferEXT_remap_index] +#define _gloffset_DeleteFramebuffersEXT driDispatchRemapTable[DeleteFramebuffersEXT_remap_index] +#define _gloffset_GenFramebuffersEXT driDispatchRemapTable[GenFramebuffersEXT_remap_index] +#define _gloffset_CheckFramebufferStatusEXT driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index] +#define _gloffset_FramebufferTexture1DEXT driDispatchRemapTable[FramebufferTexture1DEXT_remap_index] +#define _gloffset_FramebufferTexture2DEXT driDispatchRemapTable[FramebufferTexture2DEXT_remap_index] +#define _gloffset_FramebufferTexture3DEXT driDispatchRemapTable[FramebufferTexture3DEXT_remap_index] +#define _gloffset_FramebufferRenderbufferEXT driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index] +#define _gloffset_GetFramebufferAttachmentParameterivEXT driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index] +#define _gloffset_GenerateMipmapEXT driDispatchRemapTable[GenerateMipmapEXT_remap_index] +#define _gloffset_StencilFuncSeparate driDispatchRemapTable[StencilFuncSeparate_remap_index] +#define _gloffset_StencilOpSeparate driDispatchRemapTable[StencilOpSeparate_remap_index] +#define _gloffset_StencilMaskSeparate driDispatchRemapTable[StencilMaskSeparate_remap_index] + +#endif /* !defined(IN_DRI_DRIVER) */ + #endif /* !defined( _GLAPI_OFFSETS_H_ ) */ diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index 71becd3533b..41adc1d1d29 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -145,6 +145,19 @@ static const int NormalFuncs[8] = { _gloffset_Normal3dv, }; +#if defined(IN_DRI_DRIVER) +static int SecondaryColorFuncs[8]; +static int FogCoordFuncs[8] = { + -1, + -1, + -1, + -1, + -1, + -1, + 0, + 0, +}; +#else static const int SecondaryColorFuncs[8] = { _gloffset_SecondaryColor3bvEXT, _gloffset_SecondaryColor3ubvEXT, @@ -166,6 +179,7 @@ static const int FogCoordFuncs[8] = { _gloffset_FogCoordfvEXT, _gloffset_FogCoorddvEXT }; +#endif /**********************************************************************/ @@ -608,6 +622,20 @@ GLboolean _ae_create_context( GLcontext *ctx ) if (ctx->aelt_context) return GL_TRUE; +#if defined(IN_DRI_DRIVER) + SecondaryColorFuncs[0] = _gloffset_SecondaryColor3bvEXT; + SecondaryColorFuncs[1] = _gloffset_SecondaryColor3ubvEXT; + SecondaryColorFuncs[2] = _gloffset_SecondaryColor3svEXT; + SecondaryColorFuncs[3] = _gloffset_SecondaryColor3usvEXT; + SecondaryColorFuncs[4] = _gloffset_SecondaryColor3ivEXT; + SecondaryColorFuncs[5] = _gloffset_SecondaryColor3uivEXT; + SecondaryColorFuncs[6] = _gloffset_SecondaryColor3fvEXT; + SecondaryColorFuncs[7] = _gloffset_SecondaryColor3dvEXT; + + FogCoordFuncs[6] = _gloffset_FogCoordfvEXT; + FogCoordFuncs[7] = _gloffset_FogCoorddvEXT; +#endif + ctx->aelt_context = MALLOC( sizeof(AEcontext) ); if (!ctx->aelt_context) return GL_FALSE; diff --git a/src/mesa/main/vtxfmt.c b/src/mesa/main/vtxfmt.c index dcb684837c8..b3c63982911 100644 --- a/src/mesa/main/vtxfmt.c +++ b/src/mesa/main/vtxfmt.c @@ -48,14 +48,16 @@ #define PRE_LOOPBACK( FUNC ) \ { \ GET_CURRENT_CONTEXT(ctx); \ - struct gl_tnl_module *tnl = &(ctx->TnlModule); \ + struct gl_tnl_module * const tnl = &(ctx->TnlModule); \ + const int tmp_offset = _gloffset_ ## FUNC ; \ \ ASSERT( tnl->Current ); \ ASSERT( tnl->SwapCount < NUM_VERTEX_FORMAT_ENTRIES ); \ + ASSERT( tmp_offset >= 0 ); \ \ /* Save the swapped function's dispatch entry so it can be */ \ /* restored later. */ \ - tnl->Swapped[tnl->SwapCount].location = (_glapi_proc *) & (GET_ ## FUNC (ctx->Exec)); \ + tnl->Swapped[tnl->SwapCount].location = & (((_glapi_proc *)ctx->Exec)[tmp_offset]); \ tnl->Swapped[tnl->SwapCount].function = (_glapi_proc)TAG(FUNC); \ tnl->SwapCount++; \ \ diff --git a/src/mesa/main/vtxfmt_tmp.h b/src/mesa/main/vtxfmt_tmp.h index 4c9691fc0e6..2a0fdde4665 100644 --- a/src/mesa/main/vtxfmt_tmp.h +++ b/src/mesa/main/vtxfmt_tmp.h @@ -30,6 +30,7 @@ #endif #include "dispatch.h" +#include "glapioffsets.h" static void GLAPIENTRY TAG(ArrayElement)( GLint i ) { -- 2.30.2