diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2007-07-31 00:11:22 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2007-07-31 00:11:22 +0800 |
commit | 982dcb74fd19b88208d127b8019e2a2af979cac2 (patch) | |
tree | 19429ca2a35033a0ce6eb818abfc30fcc1a59088 /src/mesa | |
parent | 2394d20dafdfa308d494fc739c63c6a4e91c8185 (diff) |
Fix an error in _save_OBE_DrawElements
In the case that a buffer object is bound to
ELEMENT_ARRARY_BUFFER, it is invalid to directly
dereference indices passed to glDrawElements.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/vbo/vbo_save_api.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c index aded738143..f62be5c14c 100644 --- a/src/mesa/vbo/vbo_save_api.c +++ b/src/mesa/vbo/vbo_save_api.c @@ -864,6 +864,9 @@ static void GLAPIENTRY _save_OBE_DrawElements(GLenum mode, GLsizei count, GLenum _ae_map_vbos( ctx ); + if (ctx->Array.ElementArrayBufferObj->Name) + indices = ADD_POINTERS(ctx->Array.ElementArrayBufferObj->Pointer, indices); + vbo_save_NotifyBegin( ctx, mode | VBO_SAVE_PRIM_WEAK ); switch (type) { |