From ded57b5a4131a213d57f5a20d50b819b7a8924df Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 17 Oct 2012 08:04:15 +0200 Subject: pixman mesa git update 17 oct 2012 pixman: 6e56098c0338ce74228187e4c96fed1a66cb0956 mesa: 0199ff7fe323cf527ffacfdef3258ab85799dd13 --- .../src/mapi/glapi/gen/ARB_ES2_compatibility.xml | 10 +- mesalib/src/mapi/glapi/gen/ARB_copy_buffer.xml | 2 +- .../src/mapi/glapi/gen/ARB_framebuffer_object.xml | 44 +- .../src/mapi/glapi/gen/ARB_get_program_binary.xml | 6 +- .../src/mapi/glapi/gen/ARB_invalidate_subdata.xml | 4 +- .../src/mapi/glapi/gen/ARB_map_buffer_range.xml | 4 +- mesalib/src/mapi/glapi/gen/ARB_sampler_objects.xml | 20 +- mesalib/src/mapi/glapi/gen/ARB_sync.xml | 14 +- mesalib/src/mapi/glapi/gen/ARB_texture_storage.xml | 4 +- .../mapi/glapi/gen/ARB_uniform_buffer_object.xml | 12 +- .../src/mapi/glapi/gen/ARB_vertex_array_object.xml | 8 +- .../src/mapi/glapi/gen/EXT_transform_feedback.xml | 12 +- mesalib/src/mapi/glapi/gen/GL3x.xml | 68 +-- mesalib/src/mapi/glapi/gen/OES_EGL_image.xml | 6 +- mesalib/src/mapi/glapi/gen/OES_fixed_point.xml | 125 ++++-- .../src/mapi/glapi/gen/OES_single_precision.xml | 18 +- mesalib/src/mapi/glapi/gen/es_EXT.xml | 179 +++++--- mesalib/src/mapi/glapi/gen/glX_XML.py | 2 +- mesalib/src/mapi/glapi/gen/glX_proto_size.py | 2 +- mesalib/src/mapi/glapi/gen/gl_API.dtd | 4 +- mesalib/src/mapi/glapi/gen/gl_API.xml | 395 +++++++++--------- mesalib/src/mapi/glapi/gen/gl_XML.py | 58 ++- mesalib/src/mapi/glapi/gen/gl_and_es_API.xml | 132 +++--- mesalib/src/mapi/glapi/gen/gl_table.py | 9 +- mesalib/src/mapi/glapi/gen/gles_api.py | 461 --------------------- mesalib/src/mapi/glapi/gen/remap_helper.py | 9 +- mesalib/src/mapi/glapi/gen/typeexpr.py | 6 +- 27 files changed, 687 insertions(+), 927 deletions(-) delete mode 100644 mesalib/src/mapi/glapi/gen/gles_api.py (limited to 'mesalib/src/mapi/glapi/gen') diff --git a/mesalib/src/mapi/glapi/gen/ARB_ES2_compatibility.xml b/mesalib/src/mapi/glapi/gen/ARB_ES2_compatibility.xml index d52a88c60..d15736612 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_ES2_compatibility.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_ES2_compatibility.xml @@ -18,17 +18,17 @@ - + - + - + @@ -45,11 +45,11 @@ - + - + diff --git a/mesalib/src/mapi/glapi/gen/ARB_copy_buffer.xml b/mesalib/src/mapi/glapi/gen/ARB_copy_buffer.xml index 719816d81..6982ed1d2 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_copy_buffer.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_copy_buffer.xml @@ -11,7 +11,7 @@ - + diff --git a/mesalib/src/mapi/glapi/gen/ARB_framebuffer_object.xml b/mesalib/src/mapi/glapi/gen/ARB_framebuffer_object.xml index e6bdcd6e5..c9649aced 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_framebuffer_object.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_framebuffer_object.xml @@ -140,34 +140,36 @@ - + - + - + - + - + - + @@ -176,33 +178,36 @@ - + - + - + - + - + - + @@ -215,7 +220,8 @@ - + @@ -232,7 +238,7 @@ - + @@ -240,21 +246,23 @@ - + - + - + @@ -267,7 +275,7 @@ - + diff --git a/mesalib/src/mapi/glapi/gen/ARB_get_program_binary.xml b/mesalib/src/mapi/glapi/gen/ARB_get_program_binary.xml index a3665e540..8da5c41e8 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_get_program_binary.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_get_program_binary.xml @@ -11,7 +11,7 @@ - + @@ -19,14 +19,14 @@ - + - + diff --git a/mesalib/src/mapi/glapi/gen/ARB_invalidate_subdata.xml b/mesalib/src/mapi/glapi/gen/ARB_invalidate_subdata.xml index 3e4ffc300..31b515cdb 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_invalidate_subdata.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_invalidate_subdata.xml @@ -29,7 +29,7 @@ - + @@ -39,7 +39,7 @@ - + diff --git a/mesalib/src/mapi/glapi/gen/ARB_map_buffer_range.xml b/mesalib/src/mapi/glapi/gen/ARB_map_buffer_range.xml index afcb9b6ba..d87450446 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_map_buffer_range.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_map_buffer_range.xml @@ -15,7 +15,7 @@ - + @@ -23,7 +23,7 @@ - + diff --git a/mesalib/src/mapi/glapi/gen/ARB_sampler_objects.xml b/mesalib/src/mapi/glapi/gen/ARB_sampler_objects.xml index 0d39db4d3..9173dee5c 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_sampler_objects.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_sampler_objects.xml @@ -7,45 +7,45 @@ - + - + - + - + - + - + - + - + @@ -63,13 +63,13 @@ - + - + diff --git a/mesalib/src/mapi/glapi/gen/ARB_sync.xml b/mesalib/src/mapi/glapi/gen/ARB_sync.xml index 4e4eebac3..58f1639c4 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_sync.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_sync.xml @@ -39,40 +39,40 @@ --> - + - + - + - + - + - + - + diff --git a/mesalib/src/mapi/glapi/gen/ARB_texture_storage.xml b/mesalib/src/mapi/glapi/gen/ARB_texture_storage.xml index 045913806..1d63e7ce3 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_texture_storage.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_texture_storage.xml @@ -17,7 +17,7 @@ - + @@ -25,7 +25,7 @@ - + diff --git a/mesalib/src/mapi/glapi/gen/ARB_uniform_buffer_object.xml b/mesalib/src/mapi/glapi/gen/ARB_uniform_buffer_object.xml index 80541a821..11aacb033 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_uniform_buffer_object.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_uniform_buffer_object.xml @@ -39,14 +39,14 @@ - + - + @@ -62,20 +62,20 @@ - + - + - + @@ -86,7 +86,7 @@ - + diff --git a/mesalib/src/mapi/glapi/gen/ARB_vertex_array_object.xml b/mesalib/src/mapi/glapi/gen/ARB_vertex_array_object.xml index 3b4ab64f5..872548d1a 100644 --- a/mesalib/src/mapi/glapi/gen/ARB_vertex_array_object.xml +++ b/mesalib/src/mapi/glapi/gen/ARB_vertex_array_object.xml @@ -10,21 +10,21 @@ - + - + - + - + diff --git a/mesalib/src/mapi/glapi/gen/EXT_transform_feedback.xml b/mesalib/src/mapi/glapi/gen/EXT_transform_feedback.xml index 051f1e0cc..dbd7513c7 100644 --- a/mesalib/src/mapi/glapi/gen/EXT_transform_feedback.xml +++ b/mesalib/src/mapi/glapi/gen/EXT_transform_feedback.xml @@ -82,30 +82,30 @@ - + - + - + - + - + - + diff --git a/mesalib/src/mapi/glapi/gen/GL3x.xml b/mesalib/src/mapi/glapi/gen/GL3x.xml index d287ac2b0..7642a27c4 100644 --- a/mesalib/src/mapi/glapi/gen/GL3x.xml +++ b/mesalib/src/mapi/glapi/gen/GL3x.xml @@ -119,32 +119,32 @@ - + - + - + - + - + @@ -171,7 +171,7 @@ - + @@ -195,7 +195,7 @@ - + @@ -207,14 +207,14 @@ - + - + - + @@ -222,20 +222,20 @@ - + - + - + @@ -257,7 +257,7 @@ - + @@ -265,13 +265,13 @@ - + - + @@ -295,7 +295,7 @@ - + @@ -321,7 +321,7 @@ - + @@ -344,7 +344,7 @@ - + @@ -364,7 +364,7 @@ - + @@ -389,31 +389,31 @@ - + - + - + - + - + @@ -421,25 +421,25 @@ - + - + - + - + @@ -541,14 +541,14 @@ - + - + @@ -594,13 +594,13 @@ - + - + @@ -624,7 +624,7 @@ - + diff --git a/mesalib/src/mapi/glapi/gen/OES_EGL_image.xml b/mesalib/src/mapi/glapi/gen/OES_EGL_image.xml index 1cb43d49a..a995cad6c 100644 --- a/mesalib/src/mapi/glapi/gen/OES_EGL_image.xml +++ b/mesalib/src/mapi/glapi/gen/OES_EGL_image.xml @@ -5,12 +5,14 @@ - + - + diff --git a/mesalib/src/mapi/glapi/gen/OES_fixed_point.xml b/mesalib/src/mapi/glapi/gen/OES_fixed_point.xml index ee408f4f1..974240c49 100644 --- a/mesalib/src/mapi/glapi/gen/OES_fixed_point.xml +++ b/mesalib/src/mapi/glapi/gen/OES_fixed_point.xml @@ -13,45 +13,52 @@ - + - + - + - + - + - + - + - + @@ -60,53 +67,63 @@ - + - + - + - + - + - + - + - + - + - + @@ -114,13 +131,15 @@ - + - + @@ -129,127 +148,149 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/mesalib/src/mapi/glapi/gen/OES_single_precision.xml b/mesalib/src/mapi/glapi/gen/OES_single_precision.xml index df8efc8f8..7d4744159 100644 --- a/mesalib/src/mapi/glapi/gen/OES_single_precision.xml +++ b/mesalib/src/mapi/glapi/gen/OES_single_precision.xml @@ -6,26 +6,31 @@ - + - + - + - + - + @@ -34,7 +39,8 @@ - + diff --git a/mesalib/src/mapi/glapi/gen/es_EXT.xml b/mesalib/src/mapi/glapi/gen/es_EXT.xml index 9e735834d..1fdb4d591 100644 --- a/mesalib/src/mapi/glapi/gen/es_EXT.xml +++ b/mesalib/src/mapi/glapi/gen/es_EXT.xml @@ -10,7 +10,8 @@ - + @@ -23,7 +24,8 @@ - + @@ -38,7 +40,8 @@ - + @@ -69,7 +72,8 @@ - + @@ -77,11 +81,13 @@ - + - + @@ -89,11 +95,13 @@ - + - + @@ -101,11 +109,13 @@ - + - + @@ -113,7 +123,8 @@ - + @@ -166,39 +177,48 @@ - + - + - + - + - + - + - + @@ -206,44 +226,54 @@ - + - + - + - + - + - + - + - + @@ -308,7 +338,8 @@ - + @@ -323,7 +354,8 @@ - + @@ -352,37 +384,43 @@ - + - + - + - + - + - + @@ -417,19 +455,22 @@ - + - + - + @@ -460,7 +501,8 @@ - + @@ -472,7 +514,9 @@ - + @@ -486,7 +530,8 @@ - + @@ -498,7 +543,8 @@ - + @@ -507,7 +553,8 @@ - + @@ -520,7 +567,8 @@ - + @@ -578,7 +626,8 @@ - + @@ -586,7 +635,8 @@ - + @@ -621,21 +671,22 @@ - + - + - + - + @@ -710,7 +761,7 @@ - + @@ -718,7 +769,7 @@ - + @@ -737,4 +788,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mesalib/src/mapi/glapi/gen/glX_XML.py b/mesalib/src/mapi/glapi/gen/glX_XML.py index 975321a76..03a35b740 100644 --- a/mesalib/src/mapi/glapi/gen/glX_XML.py +++ b/mesalib/src/mapi/glapi/gen/glX_XML.py @@ -543,7 +543,7 @@ class glx_function(gl_XML.gl_function): return not self.ignore and (self.offset != -1) and (self.glx_rop or self.glx_sop or self.glx_vendorpriv or self.vectorequiv or self.client_handcode) -class glx_function_iterator: +class glx_function_iterator(object): """Class to iterate over a list of glXFunctions""" def __init__(self, context): diff --git a/mesalib/src/mapi/glapi/gen/glX_proto_size.py b/mesalib/src/mapi/glapi/gen/glX_proto_size.py index 7db816b2c..fdb355d4d 100644 --- a/mesalib/src/mapi/glapi/gen/glX_proto_size.py +++ b/mesalib/src/mapi/glapi/gen/glX_proto_size.py @@ -30,7 +30,7 @@ import license import sys, getopt, copy, string -class glx_enum_function: +class glx_enum_function(object): def __init__(self, func_name, enum_dict): self.name = func_name self.mode = 1 diff --git a/mesalib/src/mapi/glapi/gen/gl_API.dtd b/mesalib/src/mapi/glapi/gen/gl_API.dtd index 149a433ca..db33500c0 100644 --- a/mesalib/src/mapi/glapi/gen/gl_API.dtd +++ b/mesalib/src/mapi/glapi/gen/gl_API.dtd @@ -35,7 +35,9 @@ alias NMTOKEN #IMPLIED offset CDATA #IMPLIED static_dispatch (true | false) "true" - vectorequiv NMTOKEN #IMPLIED> + vectorequiv NMTOKEN #IMPLIED + es1 CDATA "none" + es2 CDATA "none"> diff --git a/mesalib/src/mapi/glapi/gen/gl_API.xml b/mesalib/src/mapi/glapi/gen/gl_API.xml index f83a7a718..a46d6131c 100644 --- a/mesalib/src/mapi/glapi/gen/gl_API.xml +++ b/mesalib/src/mapi/glapi/gen/gl_API.xml @@ -1275,7 +1275,7 @@ - + @@ -1311,7 +1311,7 @@ - + @@ -1418,7 +1418,7 @@ - + @@ -1947,18 +1947,18 @@ - + - + - + @@ -1976,25 +1976,25 @@ - + - + - + - + @@ -2015,13 +2015,13 @@ - + - + @@ -2045,19 +2045,19 @@ - + - + - + @@ -2078,7 +2078,7 @@ - + @@ -2094,7 +2094,7 @@ - + @@ -2102,33 +2102,33 @@ - + - + - + - + - + @@ -2147,7 +2147,7 @@ - + @@ -2160,28 +2160,28 @@ - + - + - + - + @@ -2277,7 +2277,7 @@ - + @@ -2295,7 +2295,7 @@ - + @@ -2303,7 +2303,7 @@ - + @@ -2313,12 +2313,12 @@ - + - + @@ -2326,7 +2326,7 @@ - + @@ -2342,21 +2342,21 @@ - + - + - + - + @@ -2516,38 +2516,38 @@ - + - + - + - + - + - + @@ -2576,7 +2576,7 @@ - + @@ -2603,7 +2603,7 @@ - + @@ -2617,7 +2617,7 @@ - + @@ -2637,7 +2637,7 @@ - + @@ -2655,24 +2655,24 @@ - + - + - + - + @@ -2707,7 +2707,7 @@ - + @@ -2744,20 +2744,20 @@ - + - + - + @@ -2794,14 +2794,14 @@ - + - + @@ -2824,7 +2824,7 @@ - + @@ -2852,11 +2852,11 @@ - + - + @@ -2866,12 +2866,12 @@ - + - + @@ -2891,11 +2891,11 @@ - + - + @@ -2907,7 +2907,7 @@ - + @@ -2922,7 +2922,7 @@ - + @@ -2936,14 +2936,14 @@ - + - + @@ -3131,7 +3131,7 @@ - + @@ -3139,19 +3139,19 @@ - + - + - + @@ -3165,12 +3165,12 @@ - + - + @@ -3190,14 +3190,14 @@ - + - + @@ -3205,7 +3205,7 @@ - + @@ -3213,7 +3213,7 @@ - + @@ -3230,7 +3230,7 @@ - + @@ -3252,7 +3252,7 @@ - + @@ -3276,7 +3276,7 @@ - + @@ -3298,25 +3298,25 @@ - + - + - + - + @@ -3695,7 +3695,7 @@ - + @@ -3703,12 +3703,12 @@ - + - + @@ -3975,7 +3975,7 @@ - + @@ -3989,7 +3989,7 @@ - + @@ -4005,7 +4005,7 @@ - + @@ -4232,11 +4232,13 @@ - + - + @@ -4385,7 +4387,7 @@ - + @@ -4440,12 +4442,13 @@ - + - + @@ -4457,7 +4460,8 @@ - + @@ -4478,7 +4482,7 @@ - + @@ -4492,7 +4496,8 @@ - + @@ -4636,7 +4641,7 @@ - + @@ -4680,12 +4685,12 @@ - + - + @@ -4929,42 +4934,45 @@ - + - + - + - + - + - + - + @@ -4977,7 +4985,7 @@ - + @@ -4988,36 +4996,36 @@ - + - + - + - + - + - + - + @@ -5029,7 +5037,7 @@ - + @@ -5131,17 +5139,18 @@ - + - + - + @@ -5149,7 +5158,7 @@ - + @@ -5157,68 +5166,71 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -5229,7 +5241,7 @@ - + @@ -5240,7 +5252,7 @@ - + @@ -5248,21 +5260,21 @@ - + - + - + @@ -5270,14 +5282,14 @@ - + - + @@ -5285,7 +5297,7 @@ - + @@ -5293,21 +5305,22 @@ - + - + - + @@ -5321,45 +5334,46 @@ - + - + - + - + - + - + - + @@ -5367,30 +5381,30 @@ - + - + - + - + - + @@ -5399,25 +5413,25 @@ - + - + - + - + @@ -5426,71 +5440,71 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -5498,7 +5512,7 @@ - + @@ -5511,11 +5525,11 @@ - + - + @@ -5537,12 +5551,12 @@ - + - + @@ -5566,13 +5580,13 @@ - + - + @@ -5633,14 +5647,14 @@ - + - + @@ -5672,7 +5686,8 @@ - + @@ -5712,42 +5727,42 @@ - + - + - + - + - + - + @@ -9900,7 +9915,7 @@ - + @@ -9908,7 +9923,7 @@ - + diff --git a/mesalib/src/mapi/glapi/gen/gl_XML.py b/mesalib/src/mapi/glapi/gen/gl_XML.py index ce14a416d..ef7ed519b 100644 --- a/mesalib/src/mapi/glapi/gen/gl_XML.py +++ b/mesalib/src/mapi/glapi/gen/gl_XML.py @@ -25,6 +25,7 @@ # Authors: # Ian Romanick +from decimal import Decimal import libxml2 import re, sys, string import typeexpr @@ -72,7 +73,7 @@ def is_attr_true( element, name ): raise RuntimeError('Invalid value "%s" for boolean "%s".' % (value, name)) -class gl_print_base: +class gl_print_base(object): """Base class of all API pretty-printers. In the model-view-controller pattern, this is the view. Any derived @@ -322,7 +323,7 @@ def create_parameter_string(parameters, include_names): return string.join(list, ", ") -class gl_item: +class gl_item(object): def __init__(self, element, context): self.context = context self.name = element.nsProp( "name", None ) @@ -401,7 +402,7 @@ class gl_enum( gl_item ): -class gl_parameter: +class gl_parameter(object): def __init__(self, element, context): self.name = element.nsProp( "name", None ) @@ -606,6 +607,16 @@ class gl_function( gl_item ): self.initialized = 0 self.images = [] + # 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_gles_map['ClipPlanex'] == { 'es1': + # Decimal('1.1') }. + self.entry_point_api_map = {} + self.assign_offset = 0 self.static_entry_points = [] @@ -634,6 +645,14 @@ class gl_function( gl_item ): self.static_entry_points.append(name) self.entry_points.append( name ) + + self.entry_point_api_map[name] = {} + for api in ('es1', 'es2'): + version_str = element.nsProp(api, None) + assert version_str is not None + if version_str != 'none': + self.entry_point_api_map[name][api] = Decimal(version_str) + if alias: true_name = alias else: @@ -779,8 +798,24 @@ 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.iteritems(): + 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: +class gl_item_factory(object): """Factory to create objects derived from gl_item.""" def create_item(self, item_name, element, context): @@ -798,7 +833,7 @@ class gl_item_factory: return None -class gl_api: +class gl_api(object): def __init__(self, factory): self.functions_by_name = {} self.enums_by_name = {} @@ -825,6 +860,19 @@ class gl_api: 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.itervalues(): + 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 process_element(self, doc): element = doc.children while element.type != "element" or element.name != "OpenGLAPI": diff --git a/mesalib/src/mapi/glapi/gen/gl_and_es_API.xml b/mesalib/src/mapi/glapi/gen/gl_and_es_API.xml index 1313da0f5..8e000a8bc 100644 --- a/mesalib/src/mapi/glapi/gen/gl_and_es_API.xml +++ b/mesalib/src/mapi/glapi/gen/gl_and_es_API.xml @@ -3,11 +3,6 @@ - - @@ -24,45 +19,51 @@ - + - + - + - + - + - + - + - + @@ -71,53 +72,63 @@ - + - + - + - + - + - + - + - + - + - + @@ -125,13 +136,15 @@ - + - + @@ -140,59 +153,69 @@ - + - + - + - + - + - + - + - + - + - + @@ -201,7 +224,8 @@ - + @@ -213,68 +237,80 @@ - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/mesalib/src/mapi/glapi/gen/gl_table.py b/mesalib/src/mapi/glapi/gen/gl_table.py index 856aedb4f..382eaafd9 100644 --- a/mesalib/src/mapi/glapi/gen/gl_table.py +++ b/mesalib/src/mapi/glapi/gen/gl_table.py @@ -254,13 +254,6 @@ if __name__ == '__main__': api = gl_XML.parse_GL_API( file_name ) if es is not None: - import gles_api - - api_map = { - 'es1': gles_api.es1_api, - 'es2': gles_api.es2_api, - } - - api.filter_functions(api_map[es]) + api.filter_functions_by_api(es) printer.Print( api ) diff --git a/mesalib/src/mapi/glapi/gen/gles_api.py b/mesalib/src/mapi/glapi/gen/gles_api.py deleted file mode 100644 index 8dfef655a..000000000 --- a/mesalib/src/mapi/glapi/gen/gles_api.py +++ /dev/null @@ -1,461 +0,0 @@ -#!/usr/bin/env python - -# Mesa 3-D graphics library -# Version: 7.12 -# -# Copyright (C) 2011 LunarG Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the "Software"), -# to deal in the Software without restriction, including without limitation -# the rights to use, copy, modify, merge, publish, distribute, sublicense, -# and/or sell copies of the Software, and to permit persons to whom the -# Software is furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -# DEALINGS IN THE SOFTWARE. -# -# Authors: -# Chia-I Wu - -# These info should be part of GLAPI XML. Until that is possible, scripts have -# to use tables here to filter gl_api. - -es1_core = ( - # OpenGL ES 1.1 - 'ActiveTexture', - 'AlphaFunc', - 'AlphaFuncx', - 'BindBuffer', - 'BindTexture', - 'BlendFunc', - 'BufferData', - 'BufferSubData', - 'Clear', - 'ClearColor', - 'ClearColorx', - 'ClearDepthf', - 'ClearDepthx', - 'ClearStencil', - 'ClientActiveTexture', - 'ClipPlanef', - 'ClipPlanex', - 'Color4f', - 'Color4ub', - 'Color4x', - 'ColorMask', - 'ColorPointer', - 'CompressedTexImage2D', - 'CompressedTexSubImage2D', - 'CopyTexImage2D', - 'CopyTexSubImage2D', - 'CullFace', - 'DeleteBuffers', - 'DeleteTextures', - 'DepthFunc', - 'DepthMask', - 'DepthRangef', - 'DepthRangex', - 'Disable', - 'DisableClientState', - 'DrawArrays', - 'DrawElements', - 'Enable', - 'EnableClientState', - 'Finish', - 'Flush', - 'Fogf', - 'Fogfv', - 'Fogx', - 'Fogxv', - 'FrontFace', - 'Frustumf', - 'Frustumx', - 'GenBuffers', - 'GenTextures', - 'GetBooleanv', - 'GetBufferParameteriv', - 'GetClipPlanef', - 'GetClipPlanex', - 'GetError', - 'GetFixedv', - 'GetFloatv', - 'GetIntegerv', - 'GetLightfv', - 'GetLightxv', - 'GetMaterialfv', - 'GetMaterialxv', - 'GetPointerv', - 'GetString', - 'GetTexEnvfv', - 'GetTexEnviv', - 'GetTexEnvxv', - 'GetTexParameterfv', - 'GetTexParameteriv', - 'GetTexParameterxv', - 'Hint', - 'IsBuffer', - 'IsEnabled', - 'IsTexture', - 'Lightf', - 'Lightfv', - 'LightModelf', - 'LightModelfv', - 'LightModelx', - 'LightModelxv', - 'Lightx', - 'Lightxv', - 'LineWidth', - 'LineWidthx', - 'LoadIdentity', - 'LoadMatrixf', - 'LoadMatrixx', - 'LogicOp', - 'Materialf', - 'Materialfv', - 'Materialx', - 'Materialxv', - 'MatrixMode', - 'MultiTexCoord4f', - 'MultiTexCoord4x', - 'MultMatrixf', - 'MultMatrixx', - 'Normal3f', - 'Normal3x', - 'NormalPointer', - 'Orthof', - 'Orthox', - 'PixelStorei', - 'PointParameterf', - 'PointParameterfv', - 'PointParameterx', - 'PointParameterxv', - 'PointSize', - 'PointSizex', - 'PolygonOffset', - 'PolygonOffsetx', - 'PopMatrix', - 'PushMatrix', - 'ReadPixels', - 'Rotatef', - 'Rotatex', - 'SampleCoverage', - 'SampleCoveragex', - 'Scalef', - 'Scalex', - 'Scissor', - 'ShadeModel', - 'StencilFunc', - 'StencilMask', - 'StencilOp', - 'TexCoordPointer', - 'TexEnvf', - 'TexEnvfv', - 'TexEnvi', - 'TexEnviv', - 'TexEnvx', - 'TexEnvxv', - 'TexImage2D', - 'TexParameterf', - 'TexParameterfv', - 'TexParameteri', - 'TexParameteriv', - 'TexParameterx', - 'TexParameterxv', - 'TexSubImage2D', - 'Translatef', - 'Translatex', - 'VertexPointer', - 'Viewport', -) - -es1_api = es1_core + ( - # GL_OES_EGL_image - 'EGLImageTargetTexture2DOES', - 'EGLImageTargetRenderbufferStorageOES', - # GL_OES_mapbuffer - 'GetBufferPointervOES', - 'MapBufferOES', - 'UnmapBufferOES', - # GL_EXT_multi_draw_arrays - 'MultiDrawArraysEXT', - 'MultiDrawElementsEXT', - # GL_OES_blend_equation_separate - 'BlendEquationSeparateOES', - # GL_OES_blend_func_separate - 'BlendFuncSeparateOES', - # GL_OES_blend_subtract - 'BlendEquationOES', - # GL_OES_draw_texture - 'DrawTexiOES', - 'DrawTexivOES', - 'DrawTexfOES', - 'DrawTexfvOES', - 'DrawTexsOES', - 'DrawTexsvOES', - 'DrawTexxOES', - 'DrawTexxvOES', - # GL_OES_fixed_point - 'AlphaFuncxOES', - 'ClearColorxOES', - 'ClearDepthxOES', - 'Color4xOES', - 'DepthRangexOES', - 'FogxOES', - 'FogxvOES', - 'FrustumxOES', - 'LightModelxOES', - 'LightModelxvOES', - 'LightxOES', - 'LightxvOES', - 'LineWidthxOES', - 'LoadMatrixxOES', - 'MaterialxOES', - 'MaterialxvOES', - 'MultiTexCoord4xOES', - 'MultMatrixxOES', - 'Normal3xOES', - 'OrthoxOES', - 'PointSizexOES', - 'PolygonOffsetxOES', - 'RotatexOES', - 'SampleCoveragexOES', - 'ScalexOES', - 'TexEnvxOES', - 'TexEnvxvOES', - 'TexParameterxOES', - 'TranslatexOES', - 'ClipPlanexOES', - 'GetClipPlanexOES', - 'GetFixedvOES', - 'GetLightxvOES', - 'GetMaterialxvOES', - 'GetTexEnvxvOES', - 'GetTexParameterxvOES', - 'PointParameterxOES', - 'PointParameterxvOES', - 'TexParameterxvOES', - # GL_OES_framebuffer_object - 'BindFramebufferOES', - 'BindRenderbufferOES', - 'CheckFramebufferStatusOES', - 'DeleteFramebuffersOES', - 'DeleteRenderbuffersOES', - 'FramebufferRenderbufferOES', - 'FramebufferTexture2DOES', - 'GenerateMipmapOES', - 'GenFramebuffersOES', - 'GenRenderbuffersOES', - 'GetFramebufferAttachmentParameterivOES', - 'GetRenderbufferParameterivOES', - 'IsFramebufferOES', - 'IsRenderbufferOES', - 'RenderbufferStorageOES', - # GL_OES_point_size_array - 'PointSizePointerOES', - # GL_OES_query_matrix - 'QueryMatrixxOES', - # GL_OES_single_precision - 'ClearDepthfOES', - 'DepthRangefOES', - 'FrustumfOES', - 'OrthofOES', - 'ClipPlanefOES', - 'GetClipPlanefOES', - # GL_OES_texture_cube_map - 'GetTexGenfvOES', - 'GetTexGenivOES', - 'GetTexGenxvOES', - 'TexGenfOES', - 'TexGenfvOES', - 'TexGeniOES', - 'TexGenivOES', - 'TexGenxOES', - 'TexGenxvOES', -) - -es2_core = ( - # OpenGL ES 2.0 - "ActiveTexture", - "AttachShader", - "BindAttribLocation", - "BindBuffer", - "BindFramebuffer", - "BindRenderbuffer", - "BindTexture", - "BlendColor", - "BlendEquation", - "BlendEquationSeparate", - "BlendFunc", - "BlendFuncSeparate", - "BufferData", - "BufferSubData", - "CheckFramebufferStatus", - "Clear", - "ClearColor", - "ClearDepthf", - "ClearStencil", - "ColorMask", - "CompileShader", - "CompressedTexImage2D", - "CompressedTexSubImage2D", - "CopyTexImage2D", - "CopyTexSubImage2D", - "CreateProgram", - "CreateShader", - "CullFace", - "DeleteBuffers", - "DeleteFramebuffers", - "DeleteProgram", - "DeleteRenderbuffers", - "DeleteShader", - "DeleteTextures", - "DepthFunc", - "DepthMask", - "DepthRangef", - "DetachShader", - "Disable", - "DisableVertexAttribArray", - "DrawArrays", - "DrawElements", - "Enable", - "EnableVertexAttribArray", - "Finish", - "Flush", - "FramebufferRenderbuffer", - "FramebufferTexture2D", - "FrontFace", - "GenBuffers", - "GenerateMipmap", - "GenFramebuffers", - "GenRenderbuffers", - "GenTextures", - "GetActiveAttrib", - "GetActiveUniform", - "GetAttachedShaders", - "GetAttribLocation", - "GetBooleanv", - "GetBufferParameteriv", - "GetError", - "GetFloatv", - "GetFramebufferAttachmentParameteriv", - "GetIntegerv", - "GetProgramInfoLog", - "GetProgramiv", - "GetRenderbufferParameteriv", - "GetShaderInfoLog", - "GetShaderiv", - "GetShaderPrecisionFormat", - "GetShaderSource", - "GetString", - "GetTexParameterfv", - "GetTexParameteriv", - "GetUniformfv", - "GetUniformiv", - "GetUniformLocation", - "GetVertexAttribfv", - "GetVertexAttribiv", - "GetVertexAttribPointerv", - "Hint", - "IsBuffer", - "IsEnabled", - "IsFramebuffer", - "IsProgram", - "IsRenderbuffer", - "IsShader", - "IsTexture", - "LineWidth", - "LinkProgram", - "PixelStorei", - "PolygonOffset", - "ReadPixels", - "ReleaseShaderCompiler", - "RenderbufferStorage", - "SampleCoverage", - "Scissor", - "ShaderBinary", - "ShaderSource", - "StencilFunc", - "StencilFuncSeparate", - "StencilMask", - "StencilMaskSeparate", - "StencilOp", - "StencilOpSeparate", - "TexImage2D", - "TexParameterf", - "TexParameterfv", - "TexParameteri", - "TexParameteriv", - "TexSubImage2D", - "Uniform1f", - "Uniform1fv", - "Uniform1i", - "Uniform1iv", - "Uniform2f", - "Uniform2fv", - "Uniform2i", - "Uniform2iv", - "Uniform3f", - "Uniform3fv", - "Uniform3i", - "Uniform3iv", - "Uniform4f", - "Uniform4fv", - "Uniform4i", - "Uniform4iv", - "UniformMatrix2fv", - "UniformMatrix3fv", - "UniformMatrix4fv", - "UseProgram", - "ValidateProgram", - "VertexAttrib1f", - "VertexAttrib1fv", - "VertexAttrib2f", - "VertexAttrib2fv", - "VertexAttrib3f", - "VertexAttrib3fv", - "VertexAttrib4f", - "VertexAttrib4fv", - "VertexAttribPointer", - "Viewport", -) - -es2_api = es2_core + ( - # GL_OES_EGL_image - 'EGLImageTargetTexture2DOES', - 'EGLImageTargetRenderbufferStorageOES', - # GL_OES_mapbuffer - 'GetBufferPointervOES', - 'MapBufferOES', - 'UnmapBufferOES', - # GL_EXT_multi_draw_arrays - 'MultiDrawArraysEXT', - 'MultiDrawElementsEXT', - # GL_OES_texture_3D - 'CompressedTexImage3DOES', - 'CompressedTexSubImage3DOES', - 'CopyTexSubImage3DOES', - 'FramebufferTexture3DOES', - 'TexImage3DOES', - 'TexSubImage3DOES', - # GL_OES_get_program_binary - 'GetProgramBinaryOES', - 'ProgramBinaryOES', - # GL_OES_vertex_array_object - 'BindVertexArrayOES', - 'DeleteVertexArraysOES', - 'GenVertexArraysOES', - 'IsVertexArrayOES', - # GL_NV_draw_buffers - 'DrawBuffersNV', - # GL_NV_read_buffer - 'ReadBufferNV', -) diff --git a/mesalib/src/mapi/glapi/gen/remap_helper.py b/mesalib/src/mapi/glapi/gen/remap_helper.py index eae1cf3e5..e1a13d0b3 100644 --- a/mesalib/src/mapi/glapi/gen/remap_helper.py +++ b/mesalib/src/mapi/glapi/gen/remap_helper.py @@ -186,14 +186,7 @@ if __name__ == '__main__': api = gl_XML.parse_GL_API( file_name ) if es is not None: - import gles_api - - api_map = { - 'es1': gles_api.es1_api, - 'es2': gles_api.es2_api, - } - - api.filter_functions(api_map[es]) + api.filter_functions_by_api(es) printer = PrintGlRemap() printer.Print( api ) diff --git a/mesalib/src/mapi/glapi/gen/typeexpr.py b/mesalib/src/mapi/glapi/gen/typeexpr.py index 6cc71cbf9..ed23d23ff 100644 --- a/mesalib/src/mapi/glapi/gen/typeexpr.py +++ b/mesalib/src/mapi/glapi/gen/typeexpr.py @@ -27,7 +27,7 @@ import string, copy -class type_node: +class type_node(object): def __init__(self): self.pointer = 0 # bool self.const = 0 # bool @@ -65,7 +65,7 @@ class type_node: return s -class type_table: +class type_table(object): def __init__(self): self.types_by_name = {} return @@ -109,7 +109,7 @@ def create_initial_types(): return -class type_expression: +class type_expression(object): built_in_types = None def __init__(self, type_string, extra_types = None): -- cgit v1.2.3