summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2005-01-24 20:08:28 +0000
committerIan Romanick <idr@us.ibm.com>2005-01-24 20:08:28 +0000
commit7f958e9e11badab294339c8b83e7b2e58f7dfe21 (patch)
treef8e1b6425343888416f2e4d50763bef96a18dc29 /src
parentf9f2db513211809bd7c6c5c9f5252444f2c5066e (diff)
Make sure that functions added to gl_API.xml that do not have any GLX
section are marked as ignored. Also ignore any functions that don't have assigned dispatch offsets. Fold Adam Jackson's changes to indirect_size.c into the generator scripts so that they don't get lost. "DO NOT EDIT" really means "DO NOT EDIT". ;)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/glapi/glX_XML.py26
-rw-r--r--src/mesa/glapi/glX_proto_send.py2
2 files changed, 28 insertions, 0 deletions
diff --git a/src/mesa/glapi/glX_XML.py b/src/mesa/glapi/glX_XML.py
index 6da454c58c..de854a6ae2 100644
--- a/src/mesa/glapi/glX_XML.py
+++ b/src/mesa/glapi/glX_XML.py
@@ -62,6 +62,10 @@ def printNoinline():
# define NOINLINE
# endif"""
+def printHaveAlias():
+ print """# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+# define HAVE_ALIAS
+# endif"""
class glXItemFactory(gl_XML.glItemFactory):
"""Factory to create GLX protocol oriented objects derived from glItem."""
@@ -371,6 +375,28 @@ class glXFunction(gl_XML.glFunction):
gl_XML.glFunction.startElement(self, name, attrs)
+ def endElement(self, name):
+ if name == "function":
+ # Mark any function that does not have GLX protocol
+ # defined as "ignore". This prevents bad things from
+ # happening when people add new functions to the GL
+ # API XML without adding any GLX section.
+ #
+ # This will also mark functions that don't have a
+ # dispatch offset at ignored.
+
+ if (self.fn_offset == -1 and not self.fn_alias) or not (self.handcode or self.glx_rop or self.glx_sop or self.glx_vendorpriv or self.vectorequiv or self.fn_alias):
+ #if not self.ignore:
+ # if self.fn_offset == -1:
+ # print '/* %s ignored becuase no offset assigned. */' % (self.name)
+ # else:
+ # print '/* %s ignored becuase no GLX opcode assigned. */' % (self.name)
+
+ self.ignore = 1
+
+ return gl_XML.glFunction.endElement(self, name)
+
+
def append(self, tag_name, p):
gl_XML.glFunction.append(self, tag_name, p)
diff --git a/src/mesa/glapi/glX_proto_send.py b/src/mesa/glapi/glX_proto_send.py
index e7cda2f779..32d8d6082e 100644
--- a/src/mesa/glapi/glX_proto_send.py
+++ b/src/mesa/glapi/glX_proto_send.py
@@ -790,6 +790,8 @@ class PrintGlxSizeStubs(glX_XML.GlxProto):
print '#include "indirect_size.h"'
print ''
+ glX_XML.printHaveAlias()
+ print ''
glX_XML.printPure()
print ''
glX_XML.printFastcall()