st/mesa: remove dependency on _NEW_BUFFER_OBJECT for vertex arrays
authorMarek Olšák <maraeo@gmail.com>
Fri, 26 Apr 2013 12:45:06 +0000 (14:45 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sat, 11 May 2013 21:59:20 +0000 (23:59 +0200)
_NEW_BUFFER_OBJECT means glBufferData was called. We can just set our own
flag in BufferData.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_atom_array.c
src/mesa/state_tracker/st_cb_bufferobjects.c

index 2437245bd25496308526511933c9401e3563a6bc..87a0a17f1b9db8ae6667529ec298c4e6ca5e6b83 100644 (file)
@@ -589,7 +589,7 @@ static void update_array(struct st_context *st)
 const struct st_tracked_state st_update_array = {
    "st_update_array",                                  /* name */
    {                                                   /* dirty */
-      _NEW_BUFFER_OBJECT,                               /* mesa */
+      0,                                                /* mesa */
       ST_NEW_VERTEX_ARRAYS | ST_NEW_VERTEX_PROGRAM,     /* st */
    },
    update_array                                                /* update */
index c868d5e163e46ee5f0d11643fd33262658453781..2e5e253a41fcd0f4a32b2739be1f3a197c57fba2 100644 (file)
@@ -264,8 +264,8 @@ st_bufferobj_data(struct gl_context *ctx,
          pipe_buffer_write(pipe, st_obj->buffer, 0, size, data);
    }
 
-   /* BufferData may change a uniform buffer, need to update it */
-   st->dirty.st |= ST_NEW_UNIFORM_BUFFER;
+   /* BufferData may change an array or uniform buffer, need to update it */
+   st->dirty.st |= ST_NEW_VERTEX_ARRAYS | ST_NEW_UNIFORM_BUFFER;
 
    return GL_TRUE;
 }