When compiling the xserver, these warnings appear: glapitemp.h:1884: warning: ‘NoOp_dispatch_stub_339’ defined but not used This is because the UNUSED_TABLE_NAME table doesn't contain all unused symbols. This patch fixes it by using the same logic to generate the actual functions and filling the UNUSED_TABLE_NAME table.
Signed-off-by: Tomas Carnecky <t...@dbservice.com> --- I copied the newly generated glapitemp.h to the xserver source and recompiled. The warnings were fixed. But it seems as some (all?) the offsets were shifted by one, the diff between the old and new glapitemp.h shows hunks like this: -KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_562)(GLenum pname, GLfloat * params); +KEYWORD1_ALT void KEYWORD2 NAME(_dispatch_stub_563)(GLenum pname, GLfloat * params); Furthermore, because some extensions have been promoted from EXT to OpenGL core, several new function stubs appear (BindFramebuffer in addition to BindFramebufferEXT etc). Btw, when is the server-side glx code regenerated? Is that done 'as-needed'? Or when new OpenGL versions or extensions are released? src/mesa/glapi/gl_apitemp.py | 31 +++++++++++++++++++------------ 1 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/mesa/glapi/gl_apitemp.py b/src/mesa/glapi/gl_apitemp.py index a37c08d..174893b 100644 --- a/src/mesa/glapi/gl_apitemp.py +++ b/src/mesa/glapi/gl_apitemp.py @@ -198,18 +198,25 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {""" #ifdef UNUSED_TABLE_NAME static _glapi_proc UNUSED_TABLE_NAME[] = {""" - for f in api.functionIterateByOffset(): - for n in f.entry_points: - if n != f.name: - if f.is_static_entry_point(n): - text = ' TABLE_ENTRY(%s),' % (n) - - if f.has_different_protocol(n): - print '#ifndef GLX_INDIRECT_RENDERING' - print text - print '#endif' - else: - print text + def unusedFunction(func, n): + text = ' TABLE_ENTRY(%s),' % (func.static_name(n)) + if func.has_different_protocol(n): + print '#ifndef GLX_INDIRECT_RENDERING' + print text + print '#endif' + else: + print text + + for func in api.functionIterateByOffset(): + got_stub = 0 + for n in func.entry_points: + if n != func.dispatch_name(): + if func.is_static_entry_point(n): + unusedFunction(func, n) + elif not got_stub: + unusedFunction(func, n) + got_stub = 1 + print '};' print '#endif /*UNUSED_TABLE_NAME*/' print '' -- 1.6.1.3 ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev