mesa: move ElementArrayBufferObj to gl_array_object

According opengl spec 4.2.pdf table 6.12 (Vertex Array Object State) at
page 515, the element buffer object is listed in vertex array object.

So, move the ElementArrayBufferObj inside gl_array_object to make
element buffer object per-vao.

This would fix most of(3 left) intel oglc vao test fail

NOTE: this is a candidate for the 7.11 branch.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Yuanhan Liu
2011-11-23 15:59:06 +08:00
parent 4ff212aac3
commit a0a5bd4bb3
10 changed files with 44 additions and 44 deletions

View File

@@ -133,6 +133,7 @@ _mesa_delete_array_object( struct gl_context *ctx, struct gl_array_object *obj )
{
(void) ctx;
unbind_array_object_vbos(ctx, obj);
_mesa_reference_buffer_object(ctx, &obj->ElementArrayBufferObj, NULL);
_glthread_DESTROY_MUTEX(obj->Mutex);
free(obj);
}
@@ -252,6 +253,9 @@ _mesa_initialize_array_object( struct gl_context *ctx,
#if FEATURE_point_size_array
init_array(ctx, &obj->PointSize, 1, GL_FLOAT);
#endif
_mesa_reference_buffer_object(ctx, &obj->ElementArrayBufferObj,
ctx->Shared->NullBufferObj);
}