[Mesa-dev] [PATCH 23/23] meta: Don't save or restore the active client texture
Anuj Phogat
anuj.phogat at gmail.com
Fri Nov 13 10:44:48 PST 2015
On Mon, Nov 9, 2015 at 4:56 PM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> This setting is only used by glTexCoordPointer and related glEnable
> calls. Since the preceeding commits removed all of those, it is not
> necessary to save, reset to default, or restore this state.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> src/mesa/drivers/common/meta.c | 3 ---
> src/mesa/drivers/common/meta.h | 1 -
> 2 files changed, 4 deletions(-)
>
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
> index b774d3c..5183648 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
> @@ -650,7 +650,6 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
> GLuint u, tgt;
>
> save->ActiveUnit = ctx->Texture.CurrentUnit;
> - save->ClientActiveUnit = ctx->Array.ActiveTexture;
> save->EnvMode = ctx->Texture.Unit[0].EnvMode;
>
> /* Disable all texture units */
> @@ -683,7 +682,6 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
>
> /* set defaults for unit[0] */
> _mesa_ActiveTexture(GL_TEXTURE0);
> - _mesa_ClientActiveTexture(GL_TEXTURE0);
> _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
> }
>
> @@ -1110,7 +1108,6 @@ _mesa_meta_end(struct gl_context *ctx)
>
> /* restore current unit state */
> _mesa_ActiveTexture(GL_TEXTURE0 + save->ActiveUnit);
> - _mesa_ClientActiveTexture(GL_TEXTURE0 + save->ClientActiveUnit);
> }
>
> if (state & MESA_META_TRANSFORM) {
> diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h
> index 8121ed4..d2c22f0 100644
> --- a/src/mesa/drivers/common/meta.h
> +++ b/src/mesa/drivers/common/meta.h
> @@ -145,7 +145,6 @@ struct save_state
>
> /** MESA_META_TEXTURE */
> GLuint ActiveUnit;
> - GLuint ClientActiveUnit;
> /** for unit[0] only */
> struct gl_texture_object *CurrentTexture[NUM_TEXTURE_TARGETS];
> /** mask of TEXTURE_2D_BIT, etc */
> --
> 2.1.0
>
> _______________________________________________
> 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