From 1a59f9a131318e1239b47b9ea4fe7c84f461cf37 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 26 Mar 2014 12:57:47 -0700 Subject: [PATCH] mapi_abi: Make ES1 and ES2 static_dispatch=false functions hidden This has been a long standing issue with the ES libraries. Functions marked in the XML with 'static_dispatch=false' were still incorrectly exported. ABI-check is supposed to detect this case, but we have to paper over failures every time a new extension is added. This change will cause a big pile of functions to disappear from libGLESv2 and libGLESv1_CM. libGLESv2 loses (20 functions): glBindVertexArrayOES glCompressedTexImage3DOES glCompressedTexSubImage3DOES glCopyTexSubImage3DOES glDeleteVertexArraysOES glDiscardFramebufferEXT glDrawBuffersNV glFlushMappedBufferRangeEXT glFramebufferTexture3DOES glGenVertexArraysOES glGetBufferPointervOES glGetProgramBinaryOES glIsVertexArrayOES glMapBufferOES glMapBufferRangeEXT glProgramBinaryOES glReadBufferNV glTexImage3DOES glTexSubImage3DOES glUnmapBufferOES libGLESv1_CM loses (88 functions): glAlphaFuncxOES glBindFramebufferOES glBindRenderbufferOES glBlendEquationOES glBlendEquationSeparateOES glBlendFuncSeparateOES glCheckFramebufferStatusOES glClearColorxOES glClearDepthfOES glClearDepthxOES glClipPlanefOES glClipPlanexOES glColor4xOES glDeleteFramebuffersOES glDeleteRenderbuffersOES glDepthRangefOES glDepthRangexOES glDiscardFramebufferEXT glDrawTexfOES glDrawTexfvOES glDrawTexiOES glDrawTexivOES glDrawTexsOES glDrawTexsvOES glDrawTexxOES glDrawTexxvOES glFlushMappedBufferRangeEXT glFogxOES glFogxvOES glFramebufferRenderbufferOES glFramebufferTexture2DOES glFrustumfOES glFrustumxOES glGenerateMipmapOES glGenFramebuffersOES glGenRenderbuffersOES glGetBufferPointervOES glGetClipPlanefOES glGetClipPlanexOES glGetFixedvOES glGetFramebufferAttachmentParameterivOES glGetLightxvOES glGetMaterialxvOES glGetRenderbufferParameterivOES glGetTexEnvxvOES glGetTexGenfvOES glGetTexGenivOES glGetTexGenxvOES glGetTexParameterxvOES glIsFramebufferOES glIsRenderbufferOES glLightModelxOES glLightModelxvOES glLightxOES glLightxvOES glLineWidthxOES glLoadMatrixxOES glMapBufferOES glMapBufferRangeEXT glMaterialxOES glMaterialxvOES glMultiTexCoord4xOES glMultMatrixxOES glNormal3xOES glOrthofOES glOrthoxOES glPointParameterxOES glPointParameterxvOES glPointSizePointerOES glPointSizexOES glPolygonOffsetxOES glQueryMatrixxOES glRenderbufferStorageOES glRotatexOES glSampleCoveragexOES glScalexOES glTexEnvxOES glTexEnvxvOES glTexGenfOES glTexGenfvOES glTexGeniOES glTexGenivOES glTexGenxOES glTexGenxvOES glTexParameterxOES glTexParameterxvOES glTranslatexOES glUnmapBufferOES Signed-off-by: Ian Romanick Reviewed-by: Matt Turner Reviewed-by: Chad Versace Reviewed-by: Chia-I Wu Cc: Paul Berry --- src/mapi/mapi_abi.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mapi/mapi_abi.py b/src/mapi/mapi_abi.py index 48050e8097e..d783ed32f5a 100644 --- a/src/mapi/mapi_abi.py +++ b/src/mapi/mapi_abi.py @@ -744,8 +744,9 @@ class ES1APIPrinter(GLAPIPrinter): def _override_for_api(self, ent): if ent.xml_data is None: raise Exception('ES2 API printer requires XML input') - ent.hidden = ent.name not in \ - ent.xml_data.entry_points_for_api_version('es1') + ent.hidden = (ent.name not in \ + ent.xml_data.entry_points_for_api_version('es1')) \ + or ent.hidden ent.handcode = False def _get_c_header(self): @@ -767,8 +768,9 @@ class ES2APIPrinter(GLAPIPrinter): def _override_for_api(self, ent): if ent.xml_data is None: raise Exception('ES2 API printer requires XML input') - ent.hidden = ent.name not in \ - ent.xml_data.entry_points_for_api_version('es2') + ent.hidden = (ent.name not in \ + ent.xml_data.entry_points_for_api_version('es2')) \ + or ent.hidden # This is hella ugly. The same-named function in desktop OpenGL is # hidden, but it needs to be exposed by libGLESv2 for OpenGL ES 3.0. -- 2.30.2