diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2015-05-08 18:50:11 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2015-05-15 20:22:26 -0700 |
commit | d649fcf727bffa11a5426ebcf38f51f478664b17 (patch) | |
tree | a9d96cab5b6f615ae296cce8ce945ef60c8ec7d6 /src/mapi/glapi/gen/gl_XML.py | |
parent | 5aaabd7630ca6fd72a3333687249574e6fcbe663 (diff) |
glapi: Store static dispatch offsets in a separate table
Since the set of functions with static will never change, there is no
reason to store it in the XML. It's just one of those fields that
confuses people adding new functions.
This is split out from the rest of the series so that in-code assertions
can be used to verify that the data in the Python code matches the XML.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Diffstat (limited to 'src/mapi/glapi/gen/gl_XML.py')
-rw-r--r-- | src/mapi/glapi/gen/gl_XML.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py index 1a2bc2b911..0695f845e4 100644 --- a/src/mapi/glapi/gen/gl_XML.py +++ b/src/mapi/glapi/gen/gl_XML.py @@ -30,6 +30,7 @@ import xml.etree.ElementTree as ET import re, sys, string import os.path import typeexpr +import static_data def parse_GL_API( file_name, factory = None ): @@ -694,6 +695,13 @@ class gl_function( gl_item ): if offset == "assign": self.assign_offset = 1 + if self.offset == -1: + assert name not in static_data.offsets + else: + assert static_data.offsets[name] == self.offset + else: + assert name not in static_data.offsets + if not self.name: self.name = true_name |