mesa: add & use a new driver flag for UBO updates instead of _NEW_BUFFER_OBJECT
[mesa.git] / src / mesa / state_tracker / st_cb_bufferobjects.c
index 8ff32c8429186dd250866ea0a7b3691236bf6deb..d166fe644148d7af8996216b3e73f80c24f8e467 100644 (file)
@@ -247,9 +247,11 @@ st_bufferobj_data(struct gl_context *ctx,
 
       if (data)
          pipe_buffer_write(pipe, st_obj->buffer, 0, size, data);
-      return GL_TRUE;
    }
 
+   /* BufferData may change a uniform buffer, need to update it */
+   st->dirty.st |= ST_NEW_UNIFORM_BUFFER;
+
    return GL_TRUE;
 }