Mesa (master): mesa: optimize out _NEW_ALL in glPopAttrib(GL_ENABLE_BIT)

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Jan 30 21:52:58 UTC 2021


Module: Mesa
Branch: master
Commit: 807c365c5e3be618c274a52ac6365fe8b8d08256
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=807c365c5e3be618c274a52ac6365fe8b8d08256

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sat Dec 19 02:41:32 2020 -0500

mesa: optimize out _NEW_ALL in glPopAttrib(GL_ENABLE_BIT)

I reviewed all affected states and this if the minimum attrib mask.

Reviewed-by: Zoltán Böszörményi <zboszor at gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8181>

---

 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 4c945c2444c..14c3fd9f5d0 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 |



More information about the mesa-commit mailing list