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_x86-64_asm.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/mesa/glapi/gl_x86-64_asm.py') diff --git a/src/mesa/glapi/gl_x86-64_asm.py b/src/mesa/glapi/gl_x86-64_asm.py index 33943bc..d06e533 100644 --- a/src/mesa/glapi/gl_x86-64_asm.py +++ b/src/mesa/glapi/gl_x86-64_asm.py @@ -236,10 +236,7 @@ class PrintGenericStubs(gl_XML.gl_print_base): registers.append( ["%rbp", 0] ) - if f.is_static_entry_point(f.name): - name = f.name - else: - name = "_dispatch_stub_%u" % (f.offset) + name = f.dispatch_name() print '\t.p2align\t4,,15' print '\t.globl\tGL_PREFIX(%s)' % (name) @@ -291,10 +288,11 @@ class PrintGenericStubs(gl_XML.gl_print_base): for f in api.functionIterateByOffset(): + dispatch = f.dispatch_name() for n in f.entry_points: if n != f.name: if f.is_static_entry_point(n): - print '\t.globl GL_PREFIX(%s) ; .set GL_PREFIX(%s), GL_PREFIX(%s)' % (n, n, f.name) + print '\t.globl GL_PREFIX(%s) ; .set GL_PREFIX(%s), GL_PREFIX(%s)' % (n, n, dispatch) return -- cgit v1.1