Module: Mesa
Branch: 7.8
Commit: 41a87a43e11c664935349f938022d58d3e22da4e
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=41a87a43e11c664935349f938022d58d3e22da4e

Author: Chia-I Wu <[email protected]>
Date:   Thu Mar 18 11:36:57 2010 +0800

glapi: Correctly generate static disatches for X86.

The entry point names, instead of the function name, should be used to
test if the entry point should be statically dispatched.

---

 src/mesa/glapi/gen/gl_x86_asm.py |    4 +-
 src/mesa/x86/glapi_x86.S         |   66 ++-----------------------------------
 2 files changed, 6 insertions(+), 64 deletions(-)

diff --git a/src/mesa/glapi/gen/gl_x86_asm.py b/src/mesa/glapi/gen/gl_x86_asm.py
index a48724e..7fb7af5 100644
--- a/src/mesa/glapi/gen/gl_x86_asm.py
+++ b/src/mesa/glapi/gen/gl_x86_asm.py
@@ -226,8 +226,8 @@ class PrintGenericStubs(gl_XML.gl_print_base):
                        stack = self.get_stack_size(f)
                        alt = "%...@%u" % (name, stack)
 
-                       if f.is_static_entry_point(f.name):
-                               for n in f.entry_points:
+                       for n in f.entry_points:
+                               if f.is_static_entry_point(n):
                                        if n != f.name:
                                                alt2 = "%...@%u" % (n, stack)
                                                text = '\tGL_STUB_ALIAS(%s, 
_gloffset_%s, %s, %s, %s)' % (n, f.name, alt2, f.name, alt)
diff --git a/src/mesa/x86/glapi_x86.S b/src/mesa/x86/glapi_x86.S
index a7dd8d7..26c1ce4 100644
--- a/src/mesa/x86/glapi_x86.S
+++ b/src/mesa/x86/glapi_x86.S
@@ -1022,74 +1022,16 @@ GLNAME(gl_dispatch_functions_start):
        GL_STUB_ALIAS(BlendColorEXT, _gloffset_BlendColor, blendcolor...@16, 
BlendColor, blendco...@16)
        GL_STUB_ALIAS(BlendEquationEXT, _gloffset_BlendEquation, 
blendequation...@4, BlendEquation, blendequat...@4)
        GL_STUB_ALIAS(DrawRangeElementsEXT, _gloffset_DrawRangeElements, 
drawrangeelements...@24, DrawRangeElements, drawrangeeleme...@24)
-       GL_STUB_ALIAS(ColorTableSGI, _gloffset_ColorTable, colortable...@24, 
ColorTable, colorta...@24)
        GL_STUB_ALIAS(ColorTableEXT, _gloffset_ColorTable, colortable...@24, 
ColorTable, colorta...@24)
-       GL_STUB_ALIAS(ColorTableParameterfvSGI, 
_gloffset_ColorTableParameterfv, colortableparameterfv...@12, 
ColorTableParameterfv, colortableparamete...@12)
-       GL_STUB_ALIAS(ColorTableParameterivSGI, 
_gloffset_ColorTableParameteriv, colortableparameteriv...@12, 
ColorTableParameteriv, colortableparamete...@12)
-       GL_STUB_ALIAS(CopyColorTableSGI, _gloffset_CopyColorTable, 
copycolortable...@20, CopyColorTable, copycolorta...@20)
-#ifndef GLX_INDIRECT_RENDERING
-       GL_STUB_ALIAS(GetColorTableSGI, _gloffset_GetColorTable, 
getcolortable...@16, GetColorTable, getcolorta...@16)
-#endif
 #ifndef GLX_INDIRECT_RENDERING
        GL_STUB_ALIAS(GetColorTableEXT, _gloffset_GetColorTable, 
getcolortable...@16, GetColorTable, getcolorta...@16)
 #endif
 #ifndef GLX_INDIRECT_RENDERING
-       GL_STUB_ALIAS(GetColorTableParameterfvSGI, 
_gloffset_GetColorTableParameterfv, getcolortableparameterfv...@12, 
GetColorTableParameterfv, getcolortableparamete...@12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
        GL_STUB_ALIAS(GetColorTableParameterfvEXT, 
_gloffset_GetColorTableParameterfv, getcolortableparameterfv...@12, 
GetColorTableParameterfv, getcolortableparamete...@12)
 #endif
 #ifndef GLX_INDIRECT_RENDERING
-       GL_STUB_ALIAS(GetColorTableParameterivSGI, 
_gloffset_GetColorTableParameteriv, getcolortableparameteriv...@12, 
GetColorTableParameteriv, getcolortableparamete...@12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
        GL_STUB_ALIAS(GetColorTableParameterivEXT, 
_gloffset_GetColorTableParameteriv, getcolortableparameteriv...@12, 
GetColorTableParameteriv, getcolortableparamete...@12)
 #endif
-       GL_STUB_ALIAS(ColorSubTableEXT, _gloffset_ColorSubTable, 
colorsubtable...@24, ColorSubTable, colorsubta...@24)
-       GL_STUB_ALIAS(CopyColorSubTableEXT, _gloffset_CopyColorSubTable, 
copycolorsubtable...@20, CopyColorSubTable, copycolorsubta...@20)
-       GL_STUB_ALIAS(ConvolutionFilter1DEXT, _gloffset_ConvolutionFilter1D, 
convolutionfilter1d...@24, ConvolutionFilter1D, convolutionfilte...@24)
-       GL_STUB_ALIAS(ConvolutionFilter2DEXT, _gloffset_ConvolutionFilter2D, 
convolutionfilter2d...@28, ConvolutionFilter2D, convolutionfilte...@28)
-       GL_STUB_ALIAS(ConvolutionParameterfEXT, 
_gloffset_ConvolutionParameterf, convolutionparameterf...@12, 
ConvolutionParameterf, convolutionparamet...@12)
-       GL_STUB_ALIAS(ConvolutionParameterfvEXT, 
_gloffset_ConvolutionParameterfv, convolutionparameterfv...@12, 
ConvolutionParameterfv, convolutionparamete...@12)
-       GL_STUB_ALIAS(ConvolutionParameteriEXT, 
_gloffset_ConvolutionParameteri, convolutionparameteri...@12, 
ConvolutionParameteri, convolutionparamet...@12)
-       GL_STUB_ALIAS(ConvolutionParameterivEXT, 
_gloffset_ConvolutionParameteriv, convolutionparameteriv...@12, 
ConvolutionParameteriv, convolutionparamete...@12)
-       GL_STUB_ALIAS(CopyConvolutionFilter1DEXT, 
_gloffset_CopyConvolutionFilter1D, copyconvolutionfilter1d...@20, 
CopyConvolutionFilter1D, copyconvolutionfilte...@20)
-       GL_STUB_ALIAS(CopyConvolutionFilter2DEXT, 
_gloffset_CopyConvolutionFilter2D, copyconvolutionfilter2d...@24, 
CopyConvolutionFilter2D, copyconvolutionfilte...@24)
-#ifndef GLX_INDIRECT_RENDERING
-       GL_STUB_ALIAS(GetConvolutionFilterEXT, _gloffset_GetConvolutionFilter, 
getconvolutionfilter...@16, GetConvolutionFilter, getconvolutionfil...@16)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-       GL_STUB_ALIAS(GetConvolutionParameterfvEXT, 
_gloffset_GetConvolutionParameterfv, getconvolutionparameterfv...@12, 
GetConvolutionParameterfv, getconvolutionparamete...@12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-       GL_STUB_ALIAS(GetConvolutionParameterivEXT, 
_gloffset_GetConvolutionParameteriv, getconvolutionparameteriv...@12, 
GetConvolutionParameteriv, getconvolutionparamete...@12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-       GL_STUB_ALIAS(GetSeparableFilterEXT, _gloffset_GetSeparableFilter, 
getseparablefilter...@24, GetSeparableFilter, getseparablefil...@24)
-#endif
-       GL_STUB_ALIAS(SeparableFilter2DEXT, _gloffset_SeparableFilter2D, 
separablefilter2d...@32, SeparableFilter2D, separablefilte...@32)
-#ifndef GLX_INDIRECT_RENDERING
-       GL_STUB_ALIAS(GetHistogramEXT, _gloffset_GetHistogram, 
gethistogram...@20, GetHistogram, gethistog...@20)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-       GL_STUB_ALIAS(GetHistogramParameterfvEXT, 
_gloffset_GetHistogramParameterfv, gethistogramparameterfv...@12, 
GetHistogramParameterfv, gethistogramparamete...@12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-       GL_STUB_ALIAS(GetHistogramParameterivEXT, 
_gloffset_GetHistogramParameteriv, gethistogramparameteriv...@12, 
GetHistogramParameteriv, gethistogramparamete...@12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-       GL_STUB_ALIAS(GetMinmaxEXT, _gloffset_GetMinmax, getminmax...@20, 
GetMinmax, getmin...@20)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-       GL_STUB_ALIAS(GetMinmaxParameterfvEXT, _gloffset_GetMinmaxParameterfv, 
getminmaxparameterfv...@12, GetMinmaxParameterfv, getminmaxparamete...@12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-       GL_STUB_ALIAS(GetMinmaxParameterivEXT, _gloffset_GetMinmaxParameteriv, 
getminmaxparameteriv...@12, GetMinmaxParameteriv, getminmaxparamete...@12)
-#endif
-       GL_STUB_ALIAS(HistogramEXT, _gloffset_Histogram, histogram...@16, 
Histogram, histog...@16)
-       GL_STUB_ALIAS(MinmaxEXT, _gloffset_Minmax, minmax...@12, Minmax, 
min...@12)
-       GL_STUB_ALIAS(ResetHistogramEXT, _gloffset_ResetHistogram, 
resethistogram...@4, ResetHistogram, resethistog...@4)
-       GL_STUB_ALIAS(ResetMinmaxEXT, _gloffset_ResetMinmax, resetminmax...@4, 
ResetMinmax, resetmin...@4)
        GL_STUB_ALIAS(TexImage3DEXT, _gloffset_TexImage3D, teximage3d...@40, 
TexImage3D, teximag...@40)
        GL_STUB_ALIAS(TexSubImage3DEXT, _gloffset_TexSubImage3D, 
texsubimage3d...@44, TexSubImage3D, texsubimag...@44)
        GL_STUB_ALIAS(CopyTexSubImage3DEXT, _gloffset_CopyTexSubImage3D, 
copytexsubimage3d...@36, CopyTexSubImage3D, copytexsubimag...@36)
@@ -1127,7 +1069,6 @@ GLNAME(gl_dispatch_functions_start):
        GL_STUB_ALIAS(MultiTexCoord4iv, _gloffset_MultiTexCoord4ivARB, 
multitexcoord...@8, MultiTexCoord4ivARB, multitexcoord4iv...@8)
        GL_STUB_ALIAS(MultiTexCoord4s, _gloffset_MultiTexCoord4sARB, 
multitexcoor...@20, MultiTexCoord4sARB, multitexcoord4s...@20)
        GL_STUB_ALIAS(MultiTexCoord4sv, _gloffset_MultiTexCoord4svARB, 
multitexcoord...@8, MultiTexCoord4svARB, multitexcoord4sv...@8)
-       GL_STUB_ALIAS(StencilOpSeparateATI, _gloffset_StencilOpSeparate, 
stencilopseparate...@16, StencilOpSeparate, stencilopsepar...@16)
        GL_STUB_ALIAS(LoadTransposeMatrixd, _gloffset_LoadTransposeMatrixdARB, 
loadtransposematr...@4, LoadTransposeMatrixdARB, loadtransposematrixd...@4)
        GL_STUB_ALIAS(LoadTransposeMatrixf, _gloffset_LoadTransposeMatrixfARB, 
loadtransposematr...@4, LoadTransposeMatrixfARB, loadtransposematrixf...@4)
        GL_STUB_ALIAS(MultTransposeMatrixd, _gloffset_MultTransposeMatrixdARB, 
multtransposematr...@4, MultTransposeMatrixdARB, multtransposematrixd...@4)
@@ -1242,10 +1183,8 @@ GLNAME(gl_dispatch_functions_start):
        GL_STUB_ALIAS(RenderbufferStorageMultisampleEXT, 
_gloffset_RenderbufferStorageMultisample, renderbufferstoragemultisample...@20, 
RenderbufferStorageMultisample, renderbufferstoragemultisam...@20)
        GL_STUB_ALIAS(PointParameterf, _gloffset_PointParameterfEXT, 
pointparamet...@8, PointParameterfEXT, pointparameterf...@8)
        GL_STUB_ALIAS(PointParameterfARB, _gloffset_PointParameterfEXT, 
pointparameterf...@8, PointParameterfEXT, pointparameterf...@8)
-       GL_STUB_ALIAS(PointParameterfSGIS, _gloffset_PointParameterfEXT, 
pointparameterfs...@8, PointParameterfEXT, pointparameterf...@8)
        GL_STUB_ALIAS(PointParameterfv, _gloffset_PointParameterfvEXT, 
pointparamete...@8, PointParameterfvEXT, pointparameterfv...@8)
        GL_STUB_ALIAS(PointParameterfvARB, _gloffset_PointParameterfvEXT, 
pointparameterfv...@8, PointParameterfvEXT, pointparameterfv...@8)
-       GL_STUB_ALIAS(PointParameterfvSGIS, _gloffset_PointParameterfvEXT, 
pointparameterfvs...@8, PointParameterfvEXT, pointparameterfv...@8)
        GL_STUB_ALIAS(SecondaryColor3b, _gloffset_SecondaryColor3bEXT, 
secondarycolo...@12, SecondaryColor3bEXT, secondarycolor3b...@12)
        GL_STUB_ALIAS(SecondaryColor3bv, _gloffset_SecondaryColor3bvEXT, 
secondarycolor...@4, SecondaryColor3bvEXT, secondarycolor3bv...@4)
        GL_STUB_ALIAS(SecondaryColor3d, _gloffset_SecondaryColor3dEXT, 
secondarycolo...@24, SecondaryColor3dEXT, secondarycolor3d...@24)
@@ -1271,7 +1210,6 @@ GLNAME(gl_dispatch_functions_start):
        GL_STUB_ALIAS(FogCoordf, _gloffset_FogCoordfEXT, fogcoo...@4, 
FogCoordfEXT, fogcoordf...@4)
        GL_STUB_ALIAS(FogCoordfv, _gloffset_FogCoordfvEXT, fogcoor...@4, 
FogCoordfvEXT, fogcoordfv...@4)
        GL_STUB_ALIAS(BlendFuncSeparate, _gloffset_BlendFuncSeparateEXT, 
blendfuncsepar...@16, BlendFuncSeparateEXT, blendfuncseparate...@16)
-       GL_STUB_ALIAS(BlendFuncSeparateINGR, _gloffset_BlendFuncSeparateEXT, 
blendfuncseparatei...@16, BlendFuncSeparateEXT, blendfuncseparate...@16)
        GL_STUB_ALIAS(WindowPos2d, _gloffset_WindowPos2dMESA, windowpo...@16, 
WindowPos2dMESA, windowpos2dm...@16)
        GL_STUB_ALIAS(WindowPos2dARB, _gloffset_WindowPos2dMESA, 
windowpos2d...@16, WindowPos2dMESA, windowpos2dm...@16)
        GL_STUB_ALIAS(WindowPos2dv, _gloffset_WindowPos2dvMESA, windowpos...@4, 
WindowPos2dvMESA, windowpos2dvm...@4)
@@ -1312,6 +1250,9 @@ GLNAME(gl_dispatch_functions_start):
        GL_STUB_ALIAS(IsProgramARB, _gloffset_IsProgramNV, isprogram...@4, 
IsProgramNV, isprogra...@4)
        GL_STUB_ALIAS(PointParameteri, _gloffset_PointParameteriNV, 
pointparamet...@8, PointParameteriNV, pointparameter...@8)
        GL_STUB_ALIAS(PointParameteriv, _gloffset_PointParameterivNV, 
pointparamete...@8, PointParameterivNV, pointparameteri...@8)
+       GL_STUB_ALIAS(DeleteVertexArrays, _gloffset_DeleteVertexArraysAPPLE, 
deletevertexarr...@8, DeleteVertexArraysAPPLE, _dispatch_stub_...@8)
+       GL_STUB_ALIAS(IsVertexArray, _gloffset_IsVertexArrayAPPLE, 
isvertexar...@4, IsVertexArrayAPPLE, _dispatch_stub_...@4)
+       GL_STUB_ALIAS(BlendEquationSeparate, 
_gloffset_BlendEquationSeparateEXT, blendequationsepar...@8, 
BlendEquationSeparateEXT, _dispatch_stub_...@8)
        GL_STUB_ALIAS(BindFramebuffer, _gloffset_BindFramebufferEXT, 
bindframebuf...@8, BindFramebufferEXT, bindframebuffer...@8)
        GL_STUB_ALIAS(BindRenderbuffer, _gloffset_BindRenderbufferEXT, 
bindrenderbuf...@8, BindRenderbufferEXT, bindrenderbuffer...@8)
        GL_STUB_ALIAS(CheckFramebufferStatus, 
_gloffset_CheckFramebufferStatusEXT, checkframebuffersta...@4, 
CheckFramebufferStatusEXT, checkframebufferstatus...@4)
@@ -1329,6 +1270,7 @@ GLNAME(gl_dispatch_functions_start):
        GL_STUB_ALIAS(IsFramebuffer, _gloffset_IsFramebufferEXT, 
isframebuf...@4, IsFramebufferEXT, isframebuffer...@4)
        GL_STUB_ALIAS(IsRenderbuffer, _gloffset_IsRenderbufferEXT, 
isrenderbuf...@4, IsRenderbufferEXT, isrenderbuffer...@4)
        GL_STUB_ALIAS(RenderbufferStorage, _gloffset_RenderbufferStorageEXT, 
renderbufferstor...@16, RenderbufferStorageEXT, renderbufferstorage...@16)
+       GL_STUB_ALIAS(BlitFramebuffer, _gloffset_BlitFramebufferEXT, 
blitframebuf...@40, BlitFramebufferEXT, _dispatch_stub_...@40)
        GL_STUB_ALIAS(FramebufferTextureLayer, 
_gloffset_FramebufferTextureLayerEXT, framebuffertexturela...@20, 
FramebufferTextureLayerEXT, framebuffertexturelayer...@20)
        GL_STUB_ALIAS(ProvokingVertex, _gloffset_ProvokingVertexEXT, 
provokingver...@4, ProvokingVertexEXT, provokingvertex...@4)
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to