<p dir="ltr">I was planning to do this too.</p>
<p dir="ltr">Reviewed-by: Dylan Baker <<a href="mailto:baker.dylan.c@gmail.com">baker.dylan.c@gmail.com</a>></p>
<div class="gmail_quote">On Jun 19, 2015 5:17 AM, "Emil Velikov" <<a href="mailto:emil.l.velikov@gmail.com">emil.l.velikov@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">None of the three build systems ever set it, as such we can clear things<br>
up a bit.<br>
<br>
Cc: Dylan Baker <<a href="mailto:dylanx.c.baker@intel.com">dylanx.c.baker@intel.com</a>><br>
Cc: Jose Fonseca <<a href="mailto:jfonseca@vmware.com">jfonseca@vmware.com</a>><br>
Signed-off-by: Emil Velikov <<a href="mailto:emil.l.velikov@gmail.com">emil.l.velikov@gmail.com</a>><br>
---<br>
src/mapi/glapi/gen/gl_table.py | 57 ++++++------------------------------------<br>
1 file changed, 8 insertions(+), 49 deletions(-)<br>
<br>
diff --git a/src/mapi/glapi/gen/gl_table.py b/src/mapi/glapi/gen/gl_table.py<br>
index 3f02902..e25971a 100644<br>
--- a/src/mapi/glapi/gen/gl_table.py<br>
+++ b/src/mapi/glapi/gen/gl_table.py<br>
@@ -33,10 +33,9 @@ import license<br>
<br>
<br>
class PrintGlTable(gl_XML.gl_print_base):<br>
- def __init__(self, es=False):<br>
+ def __init__(self):<br>
gl_XML.gl_print_base.__init__(self)<br>
<br>
- <a href="http://self.es" rel="noreferrer" target="_blank">self.es</a> = es<br>
self.header_tag = '_GLAPI_TABLE_H_'<br>
<a href="http://self.name" rel="noreferrer" target="_blank">self.name</a> = "gl_table.py (from Mesa)"<br>
self.license = license.bsd_license_template % ( \<br>
@@ -76,10 +75,9 @@ class PrintGlTable(gl_XML.gl_print_base):<br>
<br>
<br>
class PrintRemapTable(gl_XML.gl_print_base):<br>
- def __init__(self, es=False):<br>
+ def __init__(self):<br>
gl_XML.gl_print_base.__init__(self)<br>
<br>
- <a href="http://self.es" rel="noreferrer" target="_blank">self.es</a> = es<br>
self.header_tag = '_DISPATCH_H_'<br>
<a href="http://self.name" rel="noreferrer" target="_blank">self.name</a> = "gl_table.py (from Mesa)"<br>
self.license = license.bsd_license_template % (<br>
@@ -123,7 +121,6 @@ class PrintRemapTable(gl_XML.gl_print_base):<br>
<br>
functions = []<br>
abi_functions = []<br>
- alias_functions = []<br>
count = 0<br>
for f in api.functionIterateByOffset():<br>
if not f.is_abi():<br>
@@ -132,11 +129,6 @@ class PrintRemapTable(gl_XML.gl_print_base):<br>
else:<br>
abi_functions.append([f, -1])<br>
<br>
- if <a href="http://self.es" rel="noreferrer" target="_blank">self.es</a>:<br>
- # remember functions with aliases<br>
- if len(f.entry_points) > 1:<br>
- alias_functions.append(f)<br>
-<br>
print '/* total number of offsets below */'<br>
print '#define _gloffset_COUNT %d' % (len(abi_functions + functions))<br>
print ''<br>
@@ -144,18 +136,11 @@ class PrintRemapTable(gl_XML.gl_print_base):<br>
for f, index in abi_functions:<br>
print '#define _gloffset_%s %d' % (<a href="http://f.name" rel="noreferrer" target="_blank">f.name</a>, f.offset)<br>
<br>
- if <a href="http://self.es" rel="noreferrer" target="_blank">self.es</a>:<br>
- remap_table = "esLocalRemapTable"<br>
-<br>
- print '#define %s_size %u' % (remap_table, count)<br>
- print 'static int %s[ %s_size ];' % (remap_table, remap_table)<br>
- print ''<br>
- else:<br>
- remap_table = "driDispatchRemapTable"<br>
+ remap_table = "driDispatchRemapTable"<br>
<br>
- print '#define %s_size %u' % (remap_table, count)<br>
- print 'extern int %s[ %s_size ];' % (remap_table, remap_table)<br>
- print ''<br>
+ print '#define %s_size %u' % (remap_table, count)<br>
+ print 'extern int %s[ %s_size ];' % (remap_table, remap_table)<br>
+ print ''<br>
<br>
for f, index in functions:<br>
print '#define %s_remap_index %u' % (<a href="http://f.name" rel="noreferrer" target="_blank">f.name</a>, index)<br>
@@ -182,23 +167,6 @@ class PrintRemapTable(gl_XML.gl_print_base):<br>
print '}'<br>
print<br>
<br>
- if alias_functions:<br>
- print ''<br>
- print '/* define aliases for compatibility */'<br>
- for f in alias_functions:<br>
- for name in f.entry_points:<br>
- if name != <a href="http://f.name" rel="noreferrer" target="_blank">f.name</a>:<br>
- print '#define CALL_%s(disp, parameters) CALL_%s(disp, parameters)' % (name, <a href="http://f.name" rel="noreferrer" target="_blank">f.name</a>)<br>
- print '#define GET_%s(disp) GET_%s(disp)' % (name, <a href="http://f.name" rel="noreferrer" target="_blank">f.name</a>)<br>
- print '#define SET_%s(disp, fn) SET_%s(disp, fn)' % (name, <a href="http://f.name" rel="noreferrer" target="_blank">f.name</a>)<br>
- print ''<br>
-<br>
- for f in alias_functions:<br>
- for name in f.entry_points:<br>
- if name != <a href="http://f.name" rel="noreferrer" target="_blank">f.name</a>:<br>
- print '#define %s_remap_index %s_remap_index' % (name, <a href="http://f.name" rel="noreferrer" target="_blank">f.name</a>)<br>
- print ''<br>
-<br>
return<br>
<br>
<br>
@@ -215,12 +183,6 @@ def _parser():<br>
default='table',<br>
metavar="mode",<br>
help="Generate either a table or a remap_table")<br>
- parser.add_argument('-c', '--es-version',<br>
- choices=[None, 'es1', 'es2'],<br>
- default=None,<br>
- metavar="ver",<br>
- dest='es',<br>
- help="filter functions for es")<br>
return parser.parse_args()<br>
<br>
<br>
@@ -231,12 +193,9 @@ def main():<br>
api = gl_XML.parse_GL_API(args.file_name)<br>
<br>
if args.mode == "table":<br>
- printer = PrintGlTable(<a href="http://args.es" rel="noreferrer" target="_blank">args.es</a>)<br>
+ printer = PrintGlTable()<br>
elif args.mode == "remap_table":<br>
- printer = PrintRemapTable(<a href="http://args.es" rel="noreferrer" target="_blank">args.es</a>)<br>
-<br>
- if <a href="http://args.es" rel="noreferrer" target="_blank">args.es</a> is not None:<br>
- api.filter_functions_by_api(<a href="http://args.es" rel="noreferrer" target="_blank">args.es</a>)<br>
+ printer = PrintRemapTable()<br>
<br>
printer.Print(api)<br>
<br>
--<br>
2.4.2<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>