diff options
author | Ian Romanick <[email protected]> | 2015-05-08 19:33:13 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2015-05-15 20:23:24 -0700 |
commit | 2b419e0db92248ca768d2d26aa2f8276c70356e2 (patch) | |
tree | c2395a34335f7de5dfab62b4c281dd36d1fa6cba | |
parent | 0fe7eab8d9a8c984ceb7aa333715799840ea7ec0 (diff) |
glapi: Use the offsets from static_data.py instead of from the XML
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Dylan Baker <[email protected]>
-rw-r--r-- | src/mapi/glapi/gen/gl_XML.py | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py index 89b09f250dc..67aba81a74e 100644 --- a/src/mapi/glapi/gen/gl_XML.py +++ b/src/mapi/glapi/gen/gl_XML.py @@ -626,7 +626,7 @@ class gl_function( gl_item ): # Decimal('1.1') }. self.api_map = {} - self.assign_offset = 0 + self.assign_offset = False self.static_entry_points = [] @@ -685,23 +685,11 @@ class gl_function( gl_item ): # Only try to set the offset when a non-alias entry-point # is being processed. - offset = element.get( "offset" ) - if offset: - try: - o = int( offset ) - self.offset = o - except Exception, e: - self.offset = -1 - 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 + if name in static_data.offsets: + self.offset = static_data.offsets[name] else: - assert name not in static_data.offsets - + self.offset = -1 + self.assign_offset = self.exec_flavor != "skip" or name in static_data.unused_functions if not self.name: self.name = true_name |