On 21 May 2012 11:08, Pauli Nieminen <span dir="ltr">&lt;<a href="mailto:pauli.nieminen@linux.intel.com" target="_blank">pauli.nieminen@linux.intel.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Same function name can be shared between GL, GLES and ARB extension. To<br>
allow stub functions to figure out if function is supported in current<br>
context in any of categories.<br></blockquote><div><br>Would you mind also changing the documentation at the top of parse_glspec.py to reflect the new meaning of the &#39;category&#39; field?<br><br>(Note: I also put a copy of this documentation in gen_dispatch.py, but in hindsight that was silly--I would be happy to remove the copy and have gen_dispatch.py just say &quot;this script consumes the JSON data that was output by parse_glspec.py&quot;).<br>
 </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Signed-off-by: Pauli Nieminen &lt;<a href="mailto:pauli.nieminen@linux.intel.com">pauli.nieminen@linux.intel.com</a>&gt;<br>
---<br>
 glapi/parse_glspec.py      |    2 +-<br>
 tests/util/gen_dispatch.py |    6 +++---<br>
 2 files changed, 4 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/glapi/parse_glspec.py b/glapi/parse_glspec.py<br>
index 3a1c848..f513164 100644<br>
--- a/glapi/parse_glspec.py<br>
+++ b/glapi/parse_glspec.py<br>
@@ -413,7 +413,7 @@ class Api(object):<br>
                 &#39;return_type&#39;: self.type_translation[attributes[&#39;return&#39;][0]],<br>
                 &#39;param_names&#39;: param_names,<br>
                 &#39;param_types&#39;: param_types,<br>
-               &#39;category&#39;: category,<br>
+               &#39;category&#39;: [category],<br>
                 }<br>
             self.synonyms.add_singleton(name)<br>
             for alias in attributes[&#39;alias&#39;]:<br>
diff --git a/tests/util/gen_dispatch.py b/tests/util/gen_dispatch.py<br>
index 96a7f77..345260a 100644<br>
--- a/tests/util/gen_dispatch.py<br>
+++ b/tests/util/gen_dispatch.py<br>
@@ -314,9 +314,9 @@ class DispatchSet(object):<br>
        self.cat_fn_pairs = []<br>
        for function_name in synonym_set:<br>
            function = all_functions[function_name]<br>
-           category_name = function.category<br>
-           category = all_categories[category_name]<br>
-           self.cat_fn_pairs.append((category, function))<br>
+           for category_name in function.category:<br>
+               category = all_categories[category_name]<br>
+               self.cat_fn_pairs.append((category, function))<br>
        # Sort by category, with GL categories preceding extensions.<br>
        self.cat_fn_pairs.sort(key = self.__sort_key)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
1.7.5.4<br>
<br>
_______________________________________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</font></span></blockquote></div><br>