mesa: only emit _NEW_MULTISAMPLE when sample mask changes
[mesa.git] / src / mesa / main / multisample.c
index f0e7a611805f12399e92c80b86ceb3792ae0a5c0..16fe2b7ced6b5a2f282d7de9cbd7fbeddc980c4d 100644 (file)
@@ -119,6 +119,9 @@ _mesa_SampleMaski(GLuint index, GLbitfield mask)
       return;
    }
 
+   if (ctx->Multisample.SampleMaskValue == mask)
+      return;
+
    FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE);
    ctx->Multisample.SampleMaskValue = mask;
 }