[Mesa-dev] [PATCH] mesa: minor simplification in _mesa_es3_error_check_format_and_type()

Ian Romanick idr at freedesktop.org
Fri Dec 20 13:30:13 PST 2013


On 12/17/2013 03:35 PM, Brian Paul wrote:
> The type_valid local was set to true and never changed.

Right... I think I just copy-and-paste
_mesa_es_error_check_format_and_type, which does change the value of
type_valid.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

> ---
>  src/mesa/main/glformats.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
> index 740faa8..1ab8b23 100644
> --- a/src/mesa/main/glformats.c
> +++ b/src/mesa/main/glformats.c
> @@ -1694,8 +1694,6 @@ GLenum
>  _mesa_es3_error_check_format_and_type(GLenum format, GLenum type,
>                                        GLenum internalFormat)
>  {
> -   GLboolean type_valid = GL_TRUE;
> -
>     switch (format) {
>     case GL_RGBA:
>        switch (type) {
> @@ -2116,5 +2114,5 @@ _mesa_es3_error_check_format_and_type(GLenum format, GLenum type,
>        break;
>     }
>  
> -   return type_valid ? GL_NO_ERROR : GL_INVALID_OPERATION;
> +   return GL_NO_ERROR;
>  }
> 



More information about the mesa-dev mailing list