diff options
Diffstat (limited to 'src/mapi/glapi')
-rw-r--r-- | src/mapi/glapi/gen/gl_XML.py | 56 |
1 files changed, 1 insertions, 55 deletions
diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py index d2972992d1e..478f82ca314 100644 --- a/src/mapi/glapi/gen/gl_XML.py +++ b/src/mapi/glapi/gen/gl_XML.py @@ -611,21 +611,11 @@ class gl_function( gl_item ): self.deprecated = None self.has_no_error_variant = False - # self.entry_point_api_map[name][api] is a decimal value - # indicating the earliest version of the given API in which - # each entry point exists. Every entry point is included in - # the first level of the map; the second level of the map only - # lists APIs which contain the entry point in at least one - # version. For example, - # self.entry_point_api_map['ClipPlanex'] == { 'es1': - # Decimal('1.1') }. - self.entry_point_api_map = {} - # self.api_map[api] is a decimal value indicating the earliest # version of the given API in which ANY alias for the function # exists. The map only lists APIs which contain the function # in at least one version. For example, for the ClipPlanex - # function, self.entry_point_api_map == { 'es1': + # function, self.api_map == { 'es1': # Decimal('1.1') }. self.api_map = {} @@ -658,13 +648,11 @@ class gl_function( gl_item ): self.entry_points.append( name ) - self.entry_point_api_map[name] = {} for api in ('es1', 'es2'): version_str = element.get(api, 'none') assert version_str is not None if version_str != 'none': version_decimal = Decimal(version_str) - self.entry_point_api_map[name][api] = version_decimal if api not in self.api_map or \ version_decimal < self.api_map[api]: self.api_map[api] = version_decimal @@ -826,23 +814,6 @@ class gl_function( gl_item ): else: return "_dispatch_stub_%u" % (self.offset) - def entry_points_for_api_version(self, api, version = None): - """Return a list of the entry point names for this function - which are supported in the given API (and optionally, version). - - Use the decimal.Decimal type to precisely express non-integer - versions. - """ - result = [] - for entry_point, api_to_ver in self.entry_point_api_map.items(): - if api not in api_to_ver: - continue - if version is not None and version < api_to_ver[api]: - continue - result.append(entry_point) - return result - - class gl_item_factory(object): """Factory to create objects derived from gl_item.""" @@ -878,31 +849,6 @@ class gl_api(object): typeexpr.create_initial_types() return - def filter_functions(self, entry_point_list): - """Filter out entry points not in entry_point_list.""" - functions_by_name = {} - for func in self.functions_by_name.values(): - entry_points = [ent for ent in func.entry_points if ent in entry_point_list] - if entry_points: - func.filter_entry_points(entry_points) - functions_by_name[func.name] = func - - self.functions_by_name = functions_by_name - - def filter_functions_by_api(self, api, version = None): - """Filter out entry points not in the given API (or - optionally, not in the given version of the given API). - """ - functions_by_name = {} - for func in self.functions_by_name.values(): - entry_points = func.entry_points_for_api_version(api, version) - if entry_points: - func.filter_entry_points(entry_points) - functions_by_name[func.name] = func - - self.functions_by_name = functions_by_name - - def parse_file(self, file_name): doc = ET.parse( file_name ) self.process_element(file_name, doc) |