summaryrefslogtreecommitdiffstats
path: root/src/mesa/glapi/gl_apitemp.py
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2006-08-26 21:26:55 +0000
committerIan Romanick <[email protected]>2006-08-26 21:26:55 +0000
commit7e9737b3704b92865242d7564825cdc57db5c4c9 (patch)
treedc263730d8d7ac5d0e0c21177a7ad52ff3100fcc /src/mesa/glapi/gl_apitemp.py
parent092d14be92259d4210e3a2b5d4b5e18886bb4d4a (diff)
Explicitly store the names for each function that should have a static
entry point generated. This allows us to do things like generate a static entry point for glPointParameterfvARB but not for glPointParameterfvSGIS.
Diffstat (limited to 'src/mesa/glapi/gl_apitemp.py')
-rw-r--r--src/mesa/glapi/gl_apitemp.py24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/mesa/glapi/gl_apitemp.py b/src/mesa/glapi/gl_apitemp.py
index 30ee6596ed3..04a3ff32555 100644
--- a/src/mesa/glapi/gl_apitemp.py
+++ b/src/mesa/glapi/gl_apitemp.py
@@ -55,7 +55,7 @@ class PrintGlOffsets(gl_XML.gl_print_base):
t_string = ""
comma = ""
- if f.static_dispatch:
+ if f.is_static_entry_point(name):
n = name
keyword = "KEYWORD1"
else:
@@ -79,7 +79,7 @@ class PrintGlOffsets(gl_XML.gl_print_base):
else:
dispatch = "DISPATCH"
- if not f.static_dispatch:
+ if not f.is_static_entry_point(name):
print '%s %s KEYWORD2 NAME(%s)(%s);' % (keyword, f.return_type, n, f.get_parameter_string(name))
print ''
@@ -166,7 +166,7 @@ class PrintGlOffsets(gl_XML.gl_print_base):
static _glapi_proc DISPATCH_TABLE_NAME[] = {"""
for f in api.functionIterateByOffset():
- if f.static_dispatch:
+ if f.is_static_entry_point(f.name):
n = f.name
else:
n = "_dispatch_stub_%u" % (f.offset)
@@ -196,9 +196,9 @@ static _glapi_proc DISPATCH_TABLE_NAME[] = {"""
static _glapi_proc UNUSED_TABLE_NAME[] = {"""
for f in api.functionIterateByOffset():
- if f.static_dispatch:
- for n in f.entry_points:
- if n != f.name:
+ for n in f.entry_points:
+ if n != f.name:
+ if f.is_static_entry_point(n):
print ' TABLE_ENTRY(%s),' % (n)
print '};'
@@ -209,11 +209,13 @@ static _glapi_proc UNUSED_TABLE_NAME[] = {"""
def printBody(self, api):
for func in api.functionIterateByOffset():
- if func.static_dispatch:
- for n in func.entry_points:
- self.printFunction( func, n )
- else:
- self.printFunction(func, func.name)
+ got_stub = 0
+ for n in func.entry_points:
+ if func.is_static_entry_point(n):
+ self.printFunction(func, n)
+ elif not got_stub:
+ self.printFunction(func, n)
+ got_stub = 1
self.printInitDispatch(api)
self.printAliasedTable(api)