From 807c365c5e3be618c274a52ac6365fe8b8d08256 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 19 Dec 2020 02:41:32 -0500 Subject: [PATCH] mesa: optimize out _NEW_ALL in glPopAttrib(GL_ENABLE_BIT) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit I reviewed all affected states and this if the minimum attrib mask. Reviewed-by: Zoltán Böszörményi Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/mesa/main/attrib.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 4c945c2..14c3fd9 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -826,7 +826,20 @@ _mesa_PopAttrib(void) if (mask & GL_ENABLE_BIT) { pop_enable_group(ctx, &attr->Enable); - ctx->NewState |= _NEW_ALL; + 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 | -- 2.7.4