[Piglit] [PATCH 09/29] glapi: Make function category list

Paul Berry stereotype441 at gmail.com
Fri May 25 09:01:20 PDT 2012


On 21 May 2012 11:08, Pauli Nieminen <pauli.nieminen at linux.intel.com> wrote:

> 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.
>

Would you mind also changing the documentation at the top of
parse_glspec.py to reflect the new meaning of the 'category' field?

(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 "this script consumes the JSON data that was
output by parse_glspec.py").


>
> 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
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20120525/8d23c8c5/attachment.htm>


More information about the Piglit mailing list