summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/attrib.c
diff options
context:
space:
mode:
authorYuanhan Liu <[email protected]>2011-11-23 15:59:06 +0800
committerYuanhan Liu <[email protected]>2011-11-29 09:48:50 +0800
commita0a5bd4bb30a73c10b02c3c3b914940a03f9b790 (patch)
treebb5dccc34cb8b0a0d97b2164cb8bff1c61a185d0 /src/mesa/main/attrib.c
parent4ff212aac3764565675c9c83af378671162bc4f2 (diff)
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 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/attrib.c')
-rw-r--r--src/mesa/main/attrib.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index f368eecc1b2..30297de1912 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1385,8 +1385,8 @@ save_array_attrib(struct gl_context *ctx,
/* Just reference them here */
_mesa_reference_buffer_object(ctx, &dest->ArrayBufferObj,
src->ArrayBufferObj);
- _mesa_reference_buffer_object(ctx, &dest->ElementArrayBufferObj,
- src->ElementArrayBufferObj);
+ _mesa_reference_buffer_object(ctx, &dest->ArrayObj->ElementArrayBufferObj,
+ src->ArrayObj->ElementArrayBufferObj);
}
/**
@@ -1407,7 +1407,7 @@ restore_array_attrib(struct gl_context *ctx,
_mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB,
src->ArrayBufferObj->Name);
_mesa_BindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB,
- src->ElementArrayBufferObj->Name);
+ src->ArrayObj->ElementArrayBufferObj->Name);
/* Better safe than sorry?! */
dest->RebindArrays = GL_TRUE;
@@ -1447,7 +1447,6 @@ free_array_attrib_data(struct gl_context *ctx,
_mesa_delete_array_object(ctx, attrib->ArrayObj);
attrib->ArrayObj = 0;
_mesa_reference_buffer_object(ctx, &attrib->ArrayBufferObj, NULL);
- _mesa_reference_buffer_object(ctx, &attrib->ElementArrayBufferObj, NULL);
}