mesa: don't flag _NEW_ARRAY for GL_PRIMITIVE_RESTART_NV
authorMarek Olšák <marek.olsak@amd.com>
Tue, 20 Jun 2017 00:20:52 +0000 (02:20 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 23 Jun 2017 17:50:20 +0000 (19:50 +0200)
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/enable.c

index f1a9c7b7db67cb7bdce73ce433c0494431195779..e1293f9bf1e129e31045a411042ff187b66ac3b3 100644 (file)
@@ -66,6 +66,7 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
    struct gl_vertex_array_object *vao = ctx->Array.VAO;
    GLbitfield64 flag;
    GLboolean *var;
+   uint64_t new_state = _NEW_ARRAY;
 
    switch (cap) {
       case GL_VERTEX_ARRAY:
@@ -115,6 +116,7 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
          }
          var = &ctx->Array.PrimitiveRestart;
          flag = 0;
+         new_state = 0; /* primitive restart is not a vertex array state */
          break;
 
       default:
@@ -124,7 +126,7 @@ client_state(struct gl_context *ctx, GLenum cap, GLboolean state)
    if (*var == state)
       return;
 
-   FLUSH_VERTICES(ctx, _NEW_ARRAY);
+   FLUSH_VERTICES(ctx, new_state);
 
    *var = state;