From a0a5bd4bb30a73c10b02c3c3b914940a03f9b790 Mon Sep 17 00:00:00 2001 From: Yuanhan Liu Date: Wed, 23 Nov 2011 15:59:06 +0800 Subject: 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 Reviewed-by: Brian Paul --- src/mesa/vbo/vbo_save_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/vbo/vbo_save_api.c') diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index 64da7ac4993..9d8bada04cf 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -1119,9 +1119,9 @@ _save_OBE_DrawElements(GLenum mode, GLsizei count, GLenum type, _ae_map_vbos(ctx); - if (_mesa_is_bufferobj(ctx->Array.ElementArrayBufferObj)) + if (_mesa_is_bufferobj(ctx->Array.ArrayObj->ElementArrayBufferObj)) indices = - ADD_POINTERS(ctx->Array.ElementArrayBufferObj->Pointer, indices); + ADD_POINTERS(ctx->Array.ArrayObj->ElementArrayBufferObj->Pointer, indices); vbo_save_NotifyBegin(ctx, (mode | VBO_SAVE_PRIM_WEAK | VBO_SAVE_PRIM_NO_CURRENT_UPDATE)); -- cgit v1.2.3