[Piglit] [PATCH 09/29] glapi: Make function category list
Pauli Nieminen
pauli.nieminen at linux.intel.com
Mon May 21 11:08:44 PDT 2012
Same function name can be shared between GL, GLES and ARB extension. To
allow stub functions to figure out if function is supported in current
context in any of categories.
Signed-off-by: Pauli Nieminen <pauli.nieminen at linux.intel.com>
---
glapi/parse_glspec.py | 2 +-
tests/util/gen_dispatch.py | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/glapi/parse_glspec.py b/glapi/parse_glspec.py
index 3a1c848..f513164 100644
--- a/glapi/parse_glspec.py
+++ b/glapi/parse_glspec.py
@@ -413,7 +413,7 @@ class Api(object):
'return_type': self.type_translation[attributes['return'][0]],
'param_names': param_names,
'param_types': param_types,
- 'category': category,
+ 'category': [category],
}
self.synonyms.add_singleton(name)
for alias in attributes['alias']:
diff --git a/tests/util/gen_dispatch.py b/tests/util/gen_dispatch.py
index 96a7f77..345260a 100644
--- a/tests/util/gen_dispatch.py
+++ b/tests/util/gen_dispatch.py
@@ -314,9 +314,9 @@ class DispatchSet(object):
self.cat_fn_pairs = []
for function_name in synonym_set:
function = all_functions[function_name]
- category_name = function.category
- category = all_categories[category_name]
- self.cat_fn_pairs.append((category, function))
+ for category_name in function.category:
+ category = all_categories[category_name]
+ self.cat_fn_pairs.append((category, function))
# Sort by category, with GL categories preceding extensions.
self.cat_fn_pairs.sort(key = self.__sort_key)
--
1.7.5.4
More information about the Piglit
mailing list