mesa: only emit _NEW_MULTISAMPLE when min sample shading changes
[mesa.git] / src / mesa / main / multisample.c
index 16fe2b7ced6b5a2f282d7de9cbd7fbeddc980c4d..07786130d51bba42380d322f863d429f3033488d 100644 (file)
@@ -140,10 +140,13 @@ _mesa_MinSampleShading(GLclampf value)
       return;
    }
 
-   FLUSH_VERTICES(ctx, 0);
+   value = CLAMP(value, 0.0f, 1.0f);
+
+   if (ctx->Multisample.MinSampleShadingValue == value)
+      return;
 
-   ctx->Multisample.MinSampleShadingValue = CLAMP(value, 0.0f, 1.0f);
-   ctx->NewState |= _NEW_MULTISAMPLE;
+   FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE);
+   ctx->Multisample.MinSampleShadingValue = value;
 }
 
 /**