diff options
author | Ian Romanick <[email protected]> | 2006-08-28 17:40:45 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2006-08-28 17:40:45 +0000 |
commit | 258751f4a0ac505e66346d8e6ccaec7c5a585534 (patch) | |
tree | 4a3f6f693a6bf44b285dbae79d623159e0d0d843 /src/mesa/glapi/gl_procs.py | |
parent | 0bb27c084da7eae0dfe1d858a134bd19b29faa25 (diff) |
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"'.
Diffstat (limited to 'src/mesa/glapi/gl_procs.py')
-rw-r--r-- | src/mesa/glapi/gl_procs.py | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/mesa/glapi/gl_procs.py b/src/mesa/glapi/gl_procs.py index 4a540e2d386..88d99d25a4e 100644 --- a/src/mesa/glapi/gl_procs.py +++ b/src/mesa/glapi/gl_procs.py @@ -87,12 +87,8 @@ class PrintGlProcs(gl_XML.gl_print_base): base_offset = 0 table = [] for func in api.functionIterateByOffset(): - if func.is_static_entry_point(func.name): - name = func.name - else: - name = "_dispatch_stub_%u" % (func.offset) - - self.printFunctionString( func.name ) + name = func.dispatch_name() + self.printFunctionString(func.name) table.append((base_offset, name, func.name)) # The length of the function's name, plus 2 for "gl", @@ -104,11 +100,7 @@ class PrintGlProcs(gl_XML.gl_print_base): for func in api.functionIterateByOffset(): for n in func.entry_points: if n != func.name: - if func.is_static_entry_point(n): - name = n - else: - name = "_dispatch_stub_%u" % (func.offset) - + name = func.dispatch_name() self.printFunctionString( n ) table.append((base_offset, name, func.name)) base_offset += len(n) + 3 @@ -124,7 +116,7 @@ class PrintGlProcs(gl_XML.gl_print_base): print '#ifdef NEED_FUNCTION_POINTER' for func in api.functionIterateByOffset(): for n in func.entry_points: - if not func.is_static_entry_point(n): + if not func.is_static_entry_point(func.name): print 'extern void gl_dispatch_stub_%u(void);' % (func.offset) break |