Mesa (master): mesa: only emit _NEW_MULTISAMPLE when sample mask changes
Samuel Pitoiset
hakzsam at kemper.freedesktop.org
Tue Jun 6 09:53:23 UTC 2017
Module: Mesa
Branch: master
Commit: af9e537be3df89fef046c827fc83acbe2199107a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=af9e537be3df89fef046c827fc83acbe2199107a
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Fri Jun 2 17:52:48 2017 +0200
mesa: only emit _NEW_MULTISAMPLE when sample mask changes
We usually check that given parameters are different before
updating the state.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
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 f0e7a61180..16fe2b7ced 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;
}
More information about the mesa-commit
mailing list