Mesa (master): mesa: Check for OpenGL state change before flushing vertices.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Feb 27 06:52:10 UTC 2020
Module: Mesa
Branch: master
Commit: 4a54f8cd2cf31d0fc952748a998fa63763b3977e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4a54f8cd2cf31d0fc952748a998fa63763b3977e
Author: Mathias Fröhlich <mathias.froehlich at web.de>
Date: Wed Feb 26 07:35:27 2020 +0100
mesa: Check for OpenGL state change before flushing vertices.
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich at web.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3958>
---
src/mesa/main/enable.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index d13a298fb3c..5fc8bdac63c 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -102,8 +102,10 @@ client_state(struct gl_context *ctx, struct gl_vertex_array_object* vao,
break;
case GL_POINT_SIZE_ARRAY_OES:
- FLUSH_VERTICES(ctx, _NEW_PROGRAM);
- ctx->VertexProgram.PointSizeEnabled = state;
+ if (ctx->VertexProgram.PointSizeEnabled != state) {
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+ ctx->VertexProgram.PointSizeEnabled = state;
+ }
vao_state(ctx, vao, VERT_ATTRIB_POINT_SIZE, state);
break;
More information about the mesa-commit
mailing list