From: Samuel Pitoiset Date: Fri, 2 Jun 2017 15:52:49 +0000 (+0200) Subject: mesa: only emit _NEW_MULTISAMPLE when min sample shading changes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=11c6aab239fca9bc4e493107fb3c31016b3a28bd;p=mesa.git mesa: only emit _NEW_MULTISAMPLE when min sample shading changes We usually check that given parameters are different before updating the state. Signed-off-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c index 16fe2b7ced6..07786130d51 100644 --- a/src/mesa/main/multisample.c +++ b/src/mesa/main/multisample.c @@ -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; } /**