diff options
author | Keith Whitwell <[email protected]> | 2009-03-04 17:01:47 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2009-03-04 17:01:47 +0000 |
commit | 368ca83a3fdfbe8dfe591ab73d29c500d1a91c0a (patch) | |
tree | 8110070eeb63858e4f916bdbf3da63cfb24da939 /src/mesa/vbo/vbo_exec_api.c | |
parent | 89f1f8f0b8fb684a7b1fce5bfbb961e4521745d7 (diff) |
vbo: second attempt - avoid getting buffer_ptr and buffer_map out of sync
Diffstat (limited to 'src/mesa/vbo/vbo_exec_api.c')
-rw-r--r-- | src/mesa/vbo/vbo_exec_api.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c index 9c2d0659139..a1e66aec63d 100644 --- a/src/mesa/vbo/vbo_exec_api.c +++ b/src/mesa/vbo/vbo_exec_api.c @@ -675,6 +675,7 @@ void vbo_use_buffer_objects(GLcontext *ctx) if (exec->vtx.buffer_map) { _mesa_align_free(exec->vtx.buffer_map); exec->vtx.buffer_map = NULL; + exec->vtx.buffer_ptr = NULL; } /* Allocate a real buffer object now */ @@ -700,6 +701,7 @@ void vbo_exec_vtx_init( struct vbo_exec_context *exec ) ASSERT(!exec->vtx.buffer_map); exec->vtx.buffer_map = (GLfloat *)ALIGN_MALLOC(VBO_VERT_BUFFER_SIZE, 64); + exec->vtx.buffer_ptr = exec->vtx.buffer_map; vbo_exec_vtxfmt_init( exec ); @@ -735,6 +737,7 @@ void vbo_exec_vtx_destroy( struct vbo_exec_context *exec ) if (exec->vtx.buffer_map) { ALIGN_FREE(exec->vtx.buffer_map); exec->vtx.buffer_map = NULL; + exec->vtx.buffer_ptr = NULL; } } } |