[Mesa-dev] [PATCH 26/31] mesa: set driver flags for glPopAttrib(GL_ENABLE_BIT) properly

Marek Olšák maraeo at gmail.com
Mon Jun 12 16:55:51 UTC 2017


From: Marek Olšák <marek.olsak at amd.com>

---
 src/mesa/main/attrib.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 8d4a4f0..43b5856 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1098,20 +1098,34 @@ _mesa_PopAttrib(void)
                   _mesa_DepthBoundsEXT(depth->BoundsMin, depth->BoundsMax);
                }
             }
             break;
          case GL_ENABLE_BIT:
             {
                const struct gl_enable_attrib *enable;
                enable = (const struct gl_enable_attrib *) attr->data;
                pop_enable_group(ctx, enable);
 	       ctx->NewState |= _NEW_ALL;
+               ctx->NewDriverState |= ctx->DriverFlags.NewAlphaTest |
+                                      ctx->DriverFlags.NewBlend |
+                                      ctx->DriverFlags.NewClipPlaneEnable |
+                                      ctx->DriverFlags.NewDepth |
+                                      ctx->DriverFlags.NewDepthClamp |
+                                      ctx->DriverFlags.NewFramebufferSRGB |
+                                      ctx->DriverFlags.NewLineState |
+                                      ctx->DriverFlags.NewLogicOp |
+                                      ctx->DriverFlags.NewMultisampleEnable |
+                                      ctx->DriverFlags.NewPolygonState |
+                                      ctx->DriverFlags.NewSampleAlphaToXEnable |
+                                      ctx->DriverFlags.NewSampleMask |
+                                      ctx->DriverFlags.NewScissorTest |
+                                      ctx->DriverFlags.NewStencil;
             }
             break;
          case GL_EVAL_BIT:
             memcpy( &ctx->Eval, attr->data, sizeof(struct gl_eval_attrib) );
 	    ctx->NewState |= _NEW_EVAL;
             break;
          case GL_FOG_BIT:
             {
                const struct gl_fog_attrib *fog;
                fog = (const struct gl_fog_attrib *) attr->data;
-- 
2.7.4



More information about the mesa-dev mailing list