From 06a8f852f71368f2019fa1141ba48cf27fa1a387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 3 Feb 2021 13:54:34 -0500 Subject: [PATCH] mesa: don't push/pop ctx->Texture._* derived states MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They are always recomputed by _mesa_update_state, which will need the old values, so that it can update other dependent states if needed. Reviewed-by: Zoltán Böszörményi Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/mesa/main/attrib.c | 7 ------- src/mesa/main/mtypes.h | 2 -- src/mesa/main/texstate.c | 3 --- 3 files changed, 12 deletions(-) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 5a6ee46af71..3a211dc9950 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -257,8 +257,6 @@ _mesa_PushAttrib(GLbitfield mask) /* copy/save the bulk of texture state here */ head->Texture.CurrentUnit = ctx->Texture.CurrentUnit; - head->Texture._TexGenEnabled = ctx->Texture._TexGenEnabled; - head->Texture._GenFlags = ctx->Texture._GenFlags; memcpy(&head->Texture.FixedFuncUnit, &ctx->Texture.FixedFuncUnit, sizeof(ctx->Texture.FixedFuncUnit)); @@ -700,11 +698,6 @@ pop_texture_group(struct gl_context *ctx, struct gl_texture_attrib_node *texstat copy_texture_attribs(dst, src, tex); } - if (!ctx->Driver.TexEnv && !ctx->Driver.TexGen) { - ctx->Texture._TexGenEnabled = texstate->_TexGenEnabled; - ctx->Texture._GenFlags = texstate->_GenFlags; - } - _mesa_ActiveTexture(GL_TEXTURE0_ARB + texstate->CurrentUnit); _mesa_unlock_context_textures(ctx); } diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 70b896fd3ce..7b8ecbb9649 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -5107,8 +5107,6 @@ struct gl_texture_attrib_node { GLuint CurrentUnit; /**< GL_ACTIVE_TEXTURE */ GLuint NumTexSaved; - GLbitfield8 _TexGenEnabled; - GLbitfield8 _GenFlags; struct gl_fixedfunc_texture_unit FixedFuncUnit[MAX_TEXTURE_COORD_UNITS]; GLfloat LodBias[MAX_TEXTURE_UNITS]; diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index b5803a05b4a..63a0f4a56d1 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -72,9 +72,6 @@ _mesa_copy_texture_state( const struct gl_context *src, struct gl_context *dst ) assert(dst); dst->Texture.CurrentUnit = src->Texture.CurrentUnit; - dst->Texture._GenFlags = src->Texture._GenFlags; - dst->Texture._TexGenEnabled = src->Texture._TexGenEnabled; - dst->Texture._TexMatEnabled = src->Texture._TexMatEnabled; /* per-unit state */ for (u = 0; u < src->Const.MaxCombinedTextureImageUnits; u++) {