summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-06-02 17:52:49 +0200
committerSamuel Pitoiset <[email protected]>2017-06-06 11:47:22 +0200
commit11c6aab239fca9bc4e493107fb3c31016b3a28bd (patch)
tree0a61ca708b4839d233b01fd516dcadc53649eb2e /src/mesa/main
parentaf9e537be3df89fef046c827fc83acbe2199107a (diff)
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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/multisample.c9
1 files changed, 6 insertions, 3 deletions
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;
}
/**