summaryrefslogtreecommitdiff
path: root/src/mesa/tnl
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2006-11-16 02:33:38 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2006-11-16 02:33:38 +0000
commitb97947972193b6b004a0ee49da31146230d43dd8 (patch)
treedad15e47c8ceb15776e3295f2a25c097f0d60a45 /src/mesa/tnl
parent82eeb62a31ec96a55ba2349397b8e8549e07a6bb (diff)
Make sure vbo's are mapped before accessing their contents in
api_arrayelt.c. Reported by Haihao Xiang.
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r--src/mesa/tnl/t_save_api.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/tnl/t_save_api.c b/src/mesa/tnl/t_save_api.c
index 11d21301d9..dbbd095fe4 100644
--- a/src/mesa/tnl/t_save_api.c
+++ b/src/mesa/tnl/t_save_api.c
@@ -1413,10 +1413,14 @@ static void GLAPIENTRY _save_OBE_DrawArrays(GLenum mode, GLint start, GLsizei co
if (!_mesa_validate_DrawArrays( ctx, mode, start, count ))
return;
+ _ae_map_vbos( ctx );
+
_save_NotifyBegin( ctx, mode | PRIM_WEAK );
for (i = 0; i < count; i++)
CALL_ArrayElement(GET_DISPATCH(), (start + i));
CALL_End(GET_DISPATCH(), ());
+
+ _ae_unmap_vbos( ctx );
}
@@ -1429,6 +1433,8 @@ static void GLAPIENTRY _save_OBE_DrawElements(GLenum mode, GLsizei count, GLenum
if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices ))
return;
+ _ae_map_vbos( ctx );
+
_save_NotifyBegin( ctx, mode | PRIM_WEAK );
switch (type) {
@@ -1450,6 +1456,8 @@ static void GLAPIENTRY _save_OBE_DrawElements(GLenum mode, GLsizei count, GLenum
}
CALL_End(GET_DISPATCH(), ());
+
+ _ae_unmap_vbos( ctx );
}
static void GLAPIENTRY _save_OBE_DrawRangeElements(GLenum mode,