[Mesa-dev] [PATCH] mesa: remove unused texUnit local in _mesa_BindTextureUnit()

Anuj Phogat anuj.phogat at gmail.com
Wed Oct 14 10:02:20 PDT 2015


On Tue, Oct 13, 2015 at 7:10 PM, Brian Paul <brianp at vmware.com> wrote:
> The texture unit is error-checked before this and the texUnit var
> is unused, so remove it.
> ---
>  src/mesa/main/texobj.c | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
> index b571b1b..3182920 100644
> --- a/src/mesa/main/texobj.c
> +++ b/src/mesa/main/texobj.c
> @@ -1759,19 +1759,12 @@ _mesa_BindTextureUnit(GLuint unit, GLuint texture)
>  {
>     GET_CURRENT_CONTEXT(ctx);
>     struct gl_texture_object *texObj;
> -   struct gl_texture_unit *texUnit;
>
>     if (unit >= _mesa_max_tex_unit(ctx)) {
>        _mesa_error(ctx, GL_INVALID_VALUE, "glBindTextureUnit(unit=%u)", unit);
>        return;
>     }
>
> -   texUnit = _mesa_get_tex_unit(ctx, unit);
> -   assert(texUnit);
> -   if (!texUnit) {
> -      return;
> -   }
> -
>     if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
>        _mesa_debug(ctx, "glBindTextureUnit %s %d\n",
>                    _mesa_enum_to_string(GL_TEXTURE0+unit), (GLint) texture);
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


More information about the mesa-dev mailing list