Mesa (7.8): glapi: Correctly generate static disatches for X86.

Chia-I Wu olv at kemper.freedesktop.org
Sat Mar 20 05:03:28 UTC 2010


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

Author: Chia-I Wu <olv at lunarg.com>
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 = "%s@%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 = "%s@%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, BlendColorEXT at 16, BlendColor, BlendColor at 16)
 	GL_STUB_ALIAS(BlendEquationEXT, _gloffset_BlendEquation, BlendEquationEXT at 4, BlendEquation, BlendEquation at 4)
 	GL_STUB_ALIAS(DrawRangeElementsEXT, _gloffset_DrawRangeElements, DrawRangeElementsEXT at 24, DrawRangeElements, DrawRangeElements at 24)
-	GL_STUB_ALIAS(ColorTableSGI, _gloffset_ColorTable, ColorTableSGI at 24, ColorTable, ColorTable at 24)
 	GL_STUB_ALIAS(ColorTableEXT, _gloffset_ColorTable, ColorTableEXT at 24, ColorTable, ColorTable at 24)
-	GL_STUB_ALIAS(ColorTableParameterfvSGI, _gloffset_ColorTableParameterfv, ColorTableParameterfvSGI at 12, ColorTableParameterfv, ColorTableParameterfv at 12)
-	GL_STUB_ALIAS(ColorTableParameterivSGI, _gloffset_ColorTableParameteriv, ColorTableParameterivSGI at 12, ColorTableParameteriv, ColorTableParameteriv at 12)
-	GL_STUB_ALIAS(CopyColorTableSGI, _gloffset_CopyColorTable, CopyColorTableSGI at 20, CopyColorTable, CopyColorTable at 20)
-#ifndef GLX_INDIRECT_RENDERING
-	GL_STUB_ALIAS(GetColorTableSGI, _gloffset_GetColorTable, GetColorTableSGI at 16, GetColorTable, GetColorTable at 16)
-#endif
 #ifndef GLX_INDIRECT_RENDERING
 	GL_STUB_ALIAS(GetColorTableEXT, _gloffset_GetColorTable, GetColorTableEXT at 16, GetColorTable, GetColorTable at 16)
 #endif
 #ifndef GLX_INDIRECT_RENDERING
-	GL_STUB_ALIAS(GetColorTableParameterfvSGI, _gloffset_GetColorTableParameterfv, GetColorTableParameterfvSGI at 12, GetColorTableParameterfv, GetColorTableParameterfv at 12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
 	GL_STUB_ALIAS(GetColorTableParameterfvEXT, _gloffset_GetColorTableParameterfv, GetColorTableParameterfvEXT at 12, GetColorTableParameterfv, GetColorTableParameterfv at 12)
 #endif
 #ifndef GLX_INDIRECT_RENDERING
-	GL_STUB_ALIAS(GetColorTableParameterivSGI, _gloffset_GetColorTableParameteriv, GetColorTableParameterivSGI at 12, GetColorTableParameteriv, GetColorTableParameteriv at 12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
 	GL_STUB_ALIAS(GetColorTableParameterivEXT, _gloffset_GetColorTableParameteriv, GetColorTableParameterivEXT at 12, GetColorTableParameteriv, GetColorTableParameteriv at 12)
 #endif
-	GL_STUB_ALIAS(ColorSubTableEXT, _gloffset_ColorSubTable, ColorSubTableEXT at 24, ColorSubTable, ColorSubTable at 24)
-	GL_STUB_ALIAS(CopyColorSubTableEXT, _gloffset_CopyColorSubTable, CopyColorSubTableEXT at 20, CopyColorSubTable, CopyColorSubTable at 20)
-	GL_STUB_ALIAS(ConvolutionFilter1DEXT, _gloffset_ConvolutionFilter1D, ConvolutionFilter1DEXT at 24, ConvolutionFilter1D, ConvolutionFilter1D at 24)
-	GL_STUB_ALIAS(ConvolutionFilter2DEXT, _gloffset_ConvolutionFilter2D, ConvolutionFilter2DEXT at 28, ConvolutionFilter2D, ConvolutionFilter2D at 28)
-	GL_STUB_ALIAS(ConvolutionParameterfEXT, _gloffset_ConvolutionParameterf, ConvolutionParameterfEXT at 12, ConvolutionParameterf, ConvolutionParameterf at 12)
-	GL_STUB_ALIAS(ConvolutionParameterfvEXT, _gloffset_ConvolutionParameterfv, ConvolutionParameterfvEXT at 12, ConvolutionParameterfv, ConvolutionParameterfv at 12)
-	GL_STUB_ALIAS(ConvolutionParameteriEXT, _gloffset_ConvolutionParameteri, ConvolutionParameteriEXT at 12, ConvolutionParameteri, ConvolutionParameteri at 12)
-	GL_STUB_ALIAS(ConvolutionParameterivEXT, _gloffset_ConvolutionParameteriv, ConvolutionParameterivEXT at 12, ConvolutionParameteriv, ConvolutionParameteriv at 12)
-	GL_STUB_ALIAS(CopyConvolutionFilter1DEXT, _gloffset_CopyConvolutionFilter1D, CopyConvolutionFilter1DEXT at 20, CopyConvolutionFilter1D, CopyConvolutionFilter1D at 20)
-	GL_STUB_ALIAS(CopyConvolutionFilter2DEXT, _gloffset_CopyConvolutionFilter2D, CopyConvolutionFilter2DEXT at 24, CopyConvolutionFilter2D, CopyConvolutionFilter2D at 24)
-#ifndef GLX_INDIRECT_RENDERING
-	GL_STUB_ALIAS(GetConvolutionFilterEXT, _gloffset_GetConvolutionFilter, GetConvolutionFilterEXT at 16, GetConvolutionFilter, GetConvolutionFilter at 16)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-	GL_STUB_ALIAS(GetConvolutionParameterfvEXT, _gloffset_GetConvolutionParameterfv, GetConvolutionParameterfvEXT at 12, GetConvolutionParameterfv, GetConvolutionParameterfv at 12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-	GL_STUB_ALIAS(GetConvolutionParameterivEXT, _gloffset_GetConvolutionParameteriv, GetConvolutionParameterivEXT at 12, GetConvolutionParameteriv, GetConvolutionParameteriv at 12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-	GL_STUB_ALIAS(GetSeparableFilterEXT, _gloffset_GetSeparableFilter, GetSeparableFilterEXT at 24, GetSeparableFilter, GetSeparableFilter at 24)
-#endif
-	GL_STUB_ALIAS(SeparableFilter2DEXT, _gloffset_SeparableFilter2D, SeparableFilter2DEXT at 32, SeparableFilter2D, SeparableFilter2D at 32)
-#ifndef GLX_INDIRECT_RENDERING
-	GL_STUB_ALIAS(GetHistogramEXT, _gloffset_GetHistogram, GetHistogramEXT at 20, GetHistogram, GetHistogram at 20)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-	GL_STUB_ALIAS(GetHistogramParameterfvEXT, _gloffset_GetHistogramParameterfv, GetHistogramParameterfvEXT at 12, GetHistogramParameterfv, GetHistogramParameterfv at 12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-	GL_STUB_ALIAS(GetHistogramParameterivEXT, _gloffset_GetHistogramParameteriv, GetHistogramParameterivEXT at 12, GetHistogramParameteriv, GetHistogramParameteriv at 12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-	GL_STUB_ALIAS(GetMinmaxEXT, _gloffset_GetMinmax, GetMinmaxEXT at 20, GetMinmax, GetMinmax at 20)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-	GL_STUB_ALIAS(GetMinmaxParameterfvEXT, _gloffset_GetMinmaxParameterfv, GetMinmaxParameterfvEXT at 12, GetMinmaxParameterfv, GetMinmaxParameterfv at 12)
-#endif
-#ifndef GLX_INDIRECT_RENDERING
-	GL_STUB_ALIAS(GetMinmaxParameterivEXT, _gloffset_GetMinmaxParameteriv, GetMinmaxParameterivEXT at 12, GetMinmaxParameteriv, GetMinmaxParameteriv at 12)
-#endif
-	GL_STUB_ALIAS(HistogramEXT, _gloffset_Histogram, HistogramEXT at 16, Histogram, Histogram at 16)
-	GL_STUB_ALIAS(MinmaxEXT, _gloffset_Minmax, MinmaxEXT at 12, Minmax, Minmax at 12)
-	GL_STUB_ALIAS(ResetHistogramEXT, _gloffset_ResetHistogram, ResetHistogramEXT at 4, ResetHistogram, ResetHistogram at 4)
-	GL_STUB_ALIAS(ResetMinmaxEXT, _gloffset_ResetMinmax, ResetMinmaxEXT at 4, ResetMinmax, ResetMinmax at 4)
 	GL_STUB_ALIAS(TexImage3DEXT, _gloffset_TexImage3D, TexImage3DEXT at 40, TexImage3D, TexImage3D at 40)
 	GL_STUB_ALIAS(TexSubImage3DEXT, _gloffset_TexSubImage3D, TexSubImage3DEXT at 44, TexSubImage3D, TexSubImage3D at 44)
 	GL_STUB_ALIAS(CopyTexSubImage3DEXT, _gloffset_CopyTexSubImage3D, CopyTexSubImage3DEXT at 36, CopyTexSubImage3D, CopyTexSubImage3D at 36)
@@ -1127,7 +1069,6 @@ GLNAME(gl_dispatch_functions_start):
 	GL_STUB_ALIAS(MultiTexCoord4iv, _gloffset_MultiTexCoord4ivARB, MultiTexCoord4iv at 8, MultiTexCoord4ivARB, MultiTexCoord4ivARB at 8)
 	GL_STUB_ALIAS(MultiTexCoord4s, _gloffset_MultiTexCoord4sARB, MultiTexCoord4s at 20, MultiTexCoord4sARB, MultiTexCoord4sARB at 20)
 	GL_STUB_ALIAS(MultiTexCoord4sv, _gloffset_MultiTexCoord4svARB, MultiTexCoord4sv at 8, MultiTexCoord4svARB, MultiTexCoord4svARB at 8)
-	GL_STUB_ALIAS(StencilOpSeparateATI, _gloffset_StencilOpSeparate, StencilOpSeparateATI at 16, StencilOpSeparate, StencilOpSeparate at 16)
 	GL_STUB_ALIAS(LoadTransposeMatrixd, _gloffset_LoadTransposeMatrixdARB, LoadTransposeMatrixd at 4, LoadTransposeMatrixdARB, LoadTransposeMatrixdARB at 4)
 	GL_STUB_ALIAS(LoadTransposeMatrixf, _gloffset_LoadTransposeMatrixfARB, LoadTransposeMatrixf at 4, LoadTransposeMatrixfARB, LoadTransposeMatrixfARB at 4)
 	GL_STUB_ALIAS(MultTransposeMatrixd, _gloffset_MultTransposeMatrixdARB, MultTransposeMatrixd at 4, MultTransposeMatrixdARB, MultTransposeMatrixdARB at 4)
@@ -1242,10 +1183,8 @@ GLNAME(gl_dispatch_functions_start):
 	GL_STUB_ALIAS(RenderbufferStorageMultisampleEXT, _gloffset_RenderbufferStorageMultisample, RenderbufferStorageMultisampleEXT at 20, RenderbufferStorageMultisample, RenderbufferStorageMultisample at 20)
 	GL_STUB_ALIAS(PointParameterf, _gloffset_PointParameterfEXT, PointParameterf at 8, PointParameterfEXT, PointParameterfEXT at 8)
 	GL_STUB_ALIAS(PointParameterfARB, _gloffset_PointParameterfEXT, PointParameterfARB at 8, PointParameterfEXT, PointParameterfEXT at 8)
-	GL_STUB_ALIAS(PointParameterfSGIS, _gloffset_PointParameterfEXT, PointParameterfSGIS at 8, PointParameterfEXT, PointParameterfEXT at 8)
 	GL_STUB_ALIAS(PointParameterfv, _gloffset_PointParameterfvEXT, PointParameterfv at 8, PointParameterfvEXT, PointParameterfvEXT at 8)
 	GL_STUB_ALIAS(PointParameterfvARB, _gloffset_PointParameterfvEXT, PointParameterfvARB at 8, PointParameterfvEXT, PointParameterfvEXT at 8)
-	GL_STUB_ALIAS(PointParameterfvSGIS, _gloffset_PointParameterfvEXT, PointParameterfvSGIS at 8, PointParameterfvEXT, PointParameterfvEXT at 8)
 	GL_STUB_ALIAS(SecondaryColor3b, _gloffset_SecondaryColor3bEXT, SecondaryColor3b at 12, SecondaryColor3bEXT, SecondaryColor3bEXT at 12)
 	GL_STUB_ALIAS(SecondaryColor3bv, _gloffset_SecondaryColor3bvEXT, SecondaryColor3bv at 4, SecondaryColor3bvEXT, SecondaryColor3bvEXT at 4)
 	GL_STUB_ALIAS(SecondaryColor3d, _gloffset_SecondaryColor3dEXT, SecondaryColor3d at 24, SecondaryColor3dEXT, SecondaryColor3dEXT at 24)
@@ -1271,7 +1210,6 @@ GLNAME(gl_dispatch_functions_start):
 	GL_STUB_ALIAS(FogCoordf, _gloffset_FogCoordfEXT, FogCoordf at 4, FogCoordfEXT, FogCoordfEXT at 4)
 	GL_STUB_ALIAS(FogCoordfv, _gloffset_FogCoordfvEXT, FogCoordfv at 4, FogCoordfvEXT, FogCoordfvEXT at 4)
 	GL_STUB_ALIAS(BlendFuncSeparate, _gloffset_BlendFuncSeparateEXT, BlendFuncSeparate at 16, BlendFuncSeparateEXT, BlendFuncSeparateEXT at 16)
-	GL_STUB_ALIAS(BlendFuncSeparateINGR, _gloffset_BlendFuncSeparateEXT, BlendFuncSeparateINGR at 16, BlendFuncSeparateEXT, BlendFuncSeparateEXT at 16)
 	GL_STUB_ALIAS(WindowPos2d, _gloffset_WindowPos2dMESA, WindowPos2d at 16, WindowPos2dMESA, WindowPos2dMESA at 16)
 	GL_STUB_ALIAS(WindowPos2dARB, _gloffset_WindowPos2dMESA, WindowPos2dARB at 16, WindowPos2dMESA, WindowPos2dMESA at 16)
 	GL_STUB_ALIAS(WindowPos2dv, _gloffset_WindowPos2dvMESA, WindowPos2dv at 4, WindowPos2dvMESA, WindowPos2dvMESA at 4)
@@ -1312,6 +1250,9 @@ GLNAME(gl_dispatch_functions_start):
 	GL_STUB_ALIAS(IsProgramARB, _gloffset_IsProgramNV, IsProgramARB at 4, IsProgramNV, IsProgramNV at 4)
 	GL_STUB_ALIAS(PointParameteri, _gloffset_PointParameteriNV, PointParameteri at 8, PointParameteriNV, PointParameteriNV at 8)
 	GL_STUB_ALIAS(PointParameteriv, _gloffset_PointParameterivNV, PointParameteriv at 8, PointParameterivNV, PointParameterivNV at 8)
+	GL_STUB_ALIAS(DeleteVertexArrays, _gloffset_DeleteVertexArraysAPPLE, DeleteVertexArrays at 8, DeleteVertexArraysAPPLE, _dispatch_stub_755 at 8)
+	GL_STUB_ALIAS(IsVertexArray, _gloffset_IsVertexArrayAPPLE, IsVertexArray at 4, IsVertexArrayAPPLE, _dispatch_stub_757 at 4)
+	GL_STUB_ALIAS(BlendEquationSeparate, _gloffset_BlendEquationSeparateEXT, BlendEquationSeparate at 8, BlendEquationSeparateEXT, _dispatch_stub_765 at 8)
 	GL_STUB_ALIAS(BindFramebuffer, _gloffset_BindFramebufferEXT, BindFramebuffer at 8, BindFramebufferEXT, BindFramebufferEXT at 8)
 	GL_STUB_ALIAS(BindRenderbuffer, _gloffset_BindRenderbufferEXT, BindRenderbuffer at 8, BindRenderbufferEXT, BindRenderbufferEXT at 8)
 	GL_STUB_ALIAS(CheckFramebufferStatus, _gloffset_CheckFramebufferStatusEXT, CheckFramebufferStatus at 4, CheckFramebufferStatusEXT, CheckFramebufferStatusEXT at 4)
@@ -1329,6 +1270,7 @@ GLNAME(gl_dispatch_functions_start):
 	GL_STUB_ALIAS(IsFramebuffer, _gloffset_IsFramebufferEXT, IsFramebuffer at 4, IsFramebufferEXT, IsFramebufferEXT at 4)
 	GL_STUB_ALIAS(IsRenderbuffer, _gloffset_IsRenderbufferEXT, IsRenderbuffer at 4, IsRenderbufferEXT, IsRenderbufferEXT at 4)
 	GL_STUB_ALIAS(RenderbufferStorage, _gloffset_RenderbufferStorageEXT, RenderbufferStorage at 16, RenderbufferStorageEXT, RenderbufferStorageEXT at 16)
+	GL_STUB_ALIAS(BlitFramebuffer, _gloffset_BlitFramebufferEXT, BlitFramebuffer at 40, BlitFramebufferEXT, _dispatch_stub_783 at 40)
 	GL_STUB_ALIAS(FramebufferTextureLayer, _gloffset_FramebufferTextureLayerEXT, FramebufferTextureLayer at 20, FramebufferTextureLayerEXT, FramebufferTextureLayerEXT at 20)
 	GL_STUB_ALIAS(ProvokingVertex, _gloffset_ProvokingVertexEXT, ProvokingVertex at 4, ProvokingVertexEXT, ProvokingVertexEXT at 4)
 




More information about the mesa-commit mailing list