mesa: Check for OpenGL state change before flushing vertices.
authorMathias Fröhlich <mathias.froehlich@web.de>
Wed, 26 Feb 2020 06:35:27 +0000 (07:35 +0100)
committerMathias Fröhlich <mathias.froehlich@web.de>
Thu, 27 Feb 2020 05:58:49 +0000 (06:58 +0100)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3958>

src/mesa/main/enable.c

index d13a298fb3c97427a7763e1eab4df8ada5184e1f..5fc8bdac63c06f69da4ea8f160bb45538000954f 100644 (file)
@@ -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;