aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mapi/glapi/gen/gl_XML.py56
-rw-r--r--src/mapi/mapi_abi.py58
2 files changed, 1 insertions, 113 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)
diff --git a/src/mapi/mapi_abi.py b/src/mapi/mapi_abi.py
index 1ce3fd3f1e6..e4142a23f64 100644
--- a/src/mapi/mapi_abi.py
+++ b/src/mapi/mapi_abi.py
@@ -685,62 +685,6 @@ typedef int GLclampx;
return header
-class ES1APIPrinter(GLAPIPrinter):
- """OpenGL ES 1.x API Printer"""
-
- def __init__(self, entries):
- super(ES1APIPrinter, self).__init__(entries)
- self.prefix_lib = 'gl'
- self.prefix_warn = 'gl'
-
- def _override_for_api(self, ent):
- if ent.xml_data is None:
- raise Exception('ES2 API printer requires XML input')
- ent.hidden = (ent.name not in \
- ent.xml_data.entry_points_for_api_version('es1')) \
- or ent.hidden
- ent.handcode = False
-
- def _get_c_header(self):
- header = """#ifndef _GLAPI_TMP_H_
-#define _GLAPI_TMP_H_
-typedef int GLclampx;
-#endif /* _GLAPI_TMP_H_ */"""
-
- return header
-
-class ES2APIPrinter(GLAPIPrinter):
- """OpenGL ES 2.x API Printer"""
-
- def __init__(self, entries):
- super(ES2APIPrinter, self).__init__(entries)
- self.prefix_lib = 'gl'
- self.prefix_warn = 'gl'
-
- def _override_for_api(self, ent):
- if ent.xml_data is None:
- raise Exception('ES2 API printer requires XML input')
- ent.hidden = (ent.name not in \
- ent.xml_data.entry_points_for_api_version('es2')) \
- or ent.hidden
-
- # This is hella ugly. The same-named function in desktop OpenGL is
- # hidden, but it needs to be exposed by libGLESv2 for OpenGL ES 3.0.
- # There's no way to express in the XML that a function should be be
- # hidden in one API but exposed in another.
- if ent.name == 'GetInternalformativ':
- ent.hidden = False
-
- ent.handcode = False
-
- def _get_c_header(self):
- header = """#ifndef _GLAPI_TMP_H_
-#define _GLAPI_TMP_H_
-typedef int GLclampx;
-#endif /* _GLAPI_TMP_H_ */"""
-
- return header
-
class SharedGLAPIPrinter(GLAPIPrinter):
"""Shared GLAPI API Printer"""
@@ -785,8 +729,6 @@ def parse_args():
def main():
printers = {
'glapi': GLAPIPrinter,
- 'es1api': ES1APIPrinter,
- 'es2api': ES2APIPrinter,
'shared-glapi': SharedGLAPIPrinter,
}