[Mesa-dev] [PATCH] mesa: Use _mesa_lookup_enum_by_nr in tex*_error_check

Matt Turner mattst88 at gmail.com
Fri Nov 30 11:43:35 PST 2012


On Fri, Nov 30, 2012 at 11:26 AM, Matt Turner <mattst88 at gmail.com> wrote:
> ---
>  src/mesa/main/teximage.c |    9 ++++++---
>  1 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index 347b3e2..6401824 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -1949,7 +1949,8 @@ texture_error_check( struct gl_context *ctx,
>     if (err != GL_NO_ERROR) {
>        _mesa_error(ctx, err,
>                    "glTexImage%dD(incompatible format 0x%x, type 0x%x)",
> -                  dimensions, format, type);
> +                  dimensions, _mesa_lookup_enum_by_nr(format),
> +                 _mesa_lookup_enum_by_nr(type));
>        return GL_TRUE;
>     }
>
> @@ -1962,7 +1963,8 @@ texture_error_check( struct gl_context *ctx,
>         (_mesa_is_dudv_format(internalFormat) != _mesa_is_dudv_format(format))) {
>        _mesa_error(ctx, GL_INVALID_OPERATION,
>                    "glTexImage%dD(incompatible internalFormat 0x%x, format 0x%x)",
> -                  dimensions, internalFormat, format);
> +                  dimensions, _mesa_lookup_enum_by_nr(internalFormat),
> +                 _mesa_lookup_enum_by_nr(format));
>        return GL_TRUE;
>     }
>
> @@ -2265,7 +2267,8 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
>     if (err != GL_NO_ERROR) {
>        _mesa_error(ctx, err,
>                    "glTexSubImage%dD(incompatible format 0x%x, type 0x%x)",
> -                  dimensions, format, type);
> +                  dimensions, _mesa_lookup_enum_by_nr(format),
> +                 _mesa_lookup_enum_by_nr(type));
>        return GL_TRUE;
>     }
>
> --
> 1.7.8.6
>

Whoops, didn't s/%x/%s/. Consider that fixed.


More information about the mesa-dev mailing list