mesa: Check for OpenGL state change before flushing vertices.

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>
This commit is contained in:
Mathias Fröhlich 2020-02-26 07:35:27 +01:00
parent 2b155b1086
commit 4a54f8cd2c
1 changed files with 4 additions and 2 deletions

View 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;