diff options
Diffstat (limited to 'src/mesa/vbo/vbo_exec_draw.c')
-rw-r--r-- | src/mesa/vbo/vbo_exec_draw.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c index 38b6c56f479..4b44b30b325 100644 --- a/src/mesa/vbo/vbo_exec_draw.c +++ b/src/mesa/vbo/vbo_exec_draw.c @@ -243,7 +243,10 @@ static void vbo_exec_vtx_unmap( struct vbo_exec_context *exec ) exec->vtx.buffer_used += (exec->vtx.buffer_ptr - exec->vtx.buffer_map) * sizeof(float); - + + + assert(exec->vtx.buffer_ptr != NULL); + ctx->Driver.UnmapBuffer(ctx, target, exec->vtx.bufferobj); exec->vtx.buffer_map = NULL; exec->vtx.buffer_ptr = NULL; @@ -296,6 +299,7 @@ void vbo_exec_vtx_map( struct vbo_exec_context *exec ) (GLfloat *)ctx->Driver.MapBuffer(ctx, target, access, exec->vtx.bufferobj); } + exec->vtx.buffer_ptr = exec->vtx.buffer_map; if (0) _mesa_printf("map %d..\n", exec->vtx.buffer_used); } |