From a9299a9b5e6594509f2d2faec7880b46bbf94d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 31 Jan 2021 23:10:26 -0500 Subject: [PATCH] mesa: remove unnecessary NewState flagging for glPopAttrib(GL_ENABLE_BIT) pop_enable_group calls _mesa_set_enable for every state it changes, so we don't need do anything else. Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/mesa/main/attrib.c | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index b48c1185d6c..7c8b93b6ed4 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -919,41 +919,8 @@ _mesa_PopAttrib(void) } } - if (mask & GL_ENABLE_BIT) { + if (mask & GL_ENABLE_BIT) pop_enable_group(ctx, &attr->Enable); - ctx->NewState |= _NEW_COLOR | - _NEW_DEPTH | - _NEW_FOG | - _NEW_LIGHT | - _NEW_LINE | - _NEW_POINT | - _NEW_POLYGON | - _NEW_SCISSOR | - _NEW_TRANSFORM | - _NEW_TEXTURE_STATE | - _NEW_BUFFERS | - _NEW_MULTISAMPLE | - _NEW_PROGRAM | - _NEW_FRAG_CLAMP; - ctx->NewDriverState |= ctx->DriverFlags.NewAlphaTest | - ctx->DriverFlags.NewBlend | - ctx->DriverFlags.NewClipPlaneEnable | - ctx->DriverFlags.NewDepth | - ctx->DriverFlags.NewDepthClamp | - ctx->DriverFlags.NewFragClamp | - ctx->DriverFlags.NewFramebufferSRGB | - ctx->DriverFlags.NewLineState | - ctx->DriverFlags.NewLogicOp | - ctx->DriverFlags.NewMultisampleEnable | - ctx->DriverFlags.NewPolygonState | - ctx->DriverFlags.NewSampleAlphaToXEnable | - ctx->DriverFlags.NewSampleMask | - ctx->DriverFlags.NewSampleShading | - ctx->DriverFlags.NewScissorTest | - ctx->DriverFlags.NewStencil | - ctx->DriverFlags.NewNvConservativeRasterization | - ctx->DriverFlags.NewTileRasterOrder; - } if (mask & GL_EVAL_BIT) { memcpy(&ctx->Eval, &attr->Eval, sizeof(struct gl_eval_attrib));