summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/multisample.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c
index 5453e38632e..f0e7a611805 100644
--- a/src/mesa/main/multisample.c
+++ b/src/mesa/main/multisample.c
@@ -41,11 +41,15 @@ _mesa_SampleCoverage(GLclampf value, GLboolean invert)
{
GET_CURRENT_CONTEXT(ctx);
- FLUSH_VERTICES(ctx, 0);
+ value = CLAMP(value, 0.0f, 1.0f);
+
+ if (ctx->Multisample.SampleCoverageInvert == invert &&
+ ctx->Multisample.SampleCoverageValue == value)
+ return;
- ctx->Multisample.SampleCoverageValue = CLAMP(value, 0.0f, 1.0f);
+ FLUSH_VERTICES(ctx, _NEW_MULTISAMPLE);
+ ctx->Multisample.SampleCoverageValue = value;
ctx->Multisample.SampleCoverageInvert = invert;
- ctx->NewState |= _NEW_MULTISAMPLE;
}