From 258751f4a0ac505e66346d8e6ccaec7c5a585534 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 28 Aug 2006 17:40:45 +0000 Subject: Add two new gl_function methods. dispatch_name returns the name of the true static dispatch name (either the glFooBar name or the gl_dispatch_stub_XXX name). static_name returns the name of the static function for a specific alias of a GL function. Adding (and using) these two functions corrects some problems in the generated code related to functions with multiple aliases where some of the aliases have true static dispatch functions and some don't. I have verified that everything under progs, except xdemos/xdemo, correctly link. I did this by doing 'make linux-dri-x86-64 PROGRAM_DIRS="demos redbook samples xdemos tests"'. --- src/mesa/glapi/gl_XML.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/mesa/glapi/gl_XML.py') diff --git a/src/mesa/glapi/gl_XML.py b/src/mesa/glapi/gl_XML.py index 868a7cd1bd..cde9cf7a43 100644 --- a/src/mesa/glapi/gl_XML.py +++ b/src/mesa/glapi/gl_XML.py @@ -737,6 +737,18 @@ class gl_function( gl_item ): def is_static_entry_point(self, name): return name in self.static_entry_points + def dispatch_name(self): + if self.name in self.static_entry_points: + return self.name + else: + return "_dispatch_stub_%u" % (self.offset) + + def static_name(self, name): + if name in self.static_entry_points: + return name + else: + return "_dispatch_stub_%u" % (self.offset) + class gl_item_factory: """Factory to create objects derived from gl_item.""" -- cgit v1.2.3