From: Mathias Fröhlich Date: Wed, 26 Feb 2020 06:35:27 +0000 (+0100) Subject: mesa: Check for OpenGL state change before flushing vertices. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a54f8cd2cf31d0fc952748a998fa63763b3977e;p=mesa.git mesa: Check for OpenGL state change before flushing vertices. Reviewed-by: Marek Olšák Signed-off-by: Mathias Fröhlich Part-of: --- 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;