From af9e537be3df89fef046c827fc83acbe2199107a Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 2 Jun 2017 17:52:48 +0200 Subject: [PATCH] mesa: only emit _NEW_MULTISAMPLE when sample mask changes MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We usually check that given parameters are different before updating the state. Signed-off-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- src/mesa/main/multisample.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c index f0e7a611805..16fe2b7ced6 100644 --- a/src/mesa/main/multisample.c +++ b/src/mesa/main/multisample.c @@ -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; } -- 2.30.2