On 21 May 2012 11:08, Pauli Nieminen <[email protected]> wrote:
> Enums need to have complete name to allow mixing EGL and GL enums. Add
> GL_ prefix to spec enums.
>
Can you update the documentation at the top of parse_glspec.py to reflect
this change? This line needs to change:
# <enum name, without "GL_" prefix>: {
>
> Signed-off-by: Pauli Nieminen <[email protected]>
> ---
> glapi/parse_glspec.py | 4 +++-
> tests/util/gen_dispatch.py | 2 +-
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/glapi/parse_glspec.py b/glapi/parse_glspec.py
> index 9d7d523..16842a6 100644
> --- a/glapi/parse_glspec.py
> +++ b/glapi/parse_glspec.py
> @@ -461,8 +461,10 @@ class Api(object):
> # 'value_str': "0xFFFFFFFF" }
> def parse_enum(self, m):
> name, value = m.groups()
> + if not name.startswith('GL_'):
> + name = 'GL_' + name
> if value.startswith('GL_'):
> - value_rhs = value[3:]
> + value_rhs = value
> value_int = self.enums[value_rhs]['value_int']
> else:
> value_int = decode_enum_value(value)
> diff --git a/tests/util/gen_dispatch.py b/tests/util/gen_dispatch.py
> index 345260a..63649bc 100644
> --- a/tests/util/gen_dispatch.py
> +++ b/tests/util/gen_dispatch.py
> @@ -620,7 +620,7 @@ def generate_code(api):
>
> # Emit enum #defines
> for name, value in api.compute_unique_enums():
> - h_contents.append('#define GL_{0} {1}\n'.format(name, value))
> + h_contents.append('#define {0} {1}\n'.format(name, value))
>
> # Emit extension #defines
> h_contents.append('\n')
> --
> 1.7.5.4
>
> _______________________________________________
> Piglit mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit