diff options
author | Mathias Fröhlich <[email protected]> | 2020-02-26 07:35:27 +0100 |
---|---|---|
committer | Mathias Fröhlich <[email protected]> | 2020-02-27 06:58:49 +0100 |
commit | 4a54f8cd2cf31d0fc952748a998fa63763b3977e (patch) | |
tree | 590d32c456f31bdf096c38701cd09492047bd4fd | |
parent | 2b155b1086121ec1d6bcd3598a835c68617d9aca (diff) |
mesa: Check for OpenGL state change before flushing vertices.
Reviewed-by: Marek Olšák <[email protected]>
Signed-off-by: Mathias Fröhlich <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3958>
-rw-r--r-- | src/mesa/main/enable.c | 6 |
1 files 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; |