summaryrefslogtreecommitdiff
path: root/src/mesa/vbo/vbo_exec_api.c
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-09-04 15:25:45 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-09-04 15:25:45 -0600
commita69fc5129bdf2f245c5bf2e0fe7b542caf7809a9 (patch)
treebd6af433f80000dd97513781276ca7d0a9671a5a /src/mesa/vbo/vbo_exec_api.c
parent9a64440154319738445e203339156e54232908ee (diff)
mesa: improved gl_buffer_object reference counting
Use new _mesa_reference_buffer_object() function wherever possible. Fixes buffer object/display list crash reported in ParaView.
Diffstat (limited to 'src/mesa/vbo/vbo_exec_api.c')
-rw-r--r--src/mesa/vbo/vbo_exec_api.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 579bbeb4f3..d70b4bb1a1 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -1,6 +1,6 @@
/**************************************************************************
-Copyright 2002 Tungsten Graphics Inc., Cedar Park, Texas.
+Copyright 2002-2008 Tungsten Graphics Inc., Cedar Park, Texas.
All Rights Reserved.
@@ -31,6 +31,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "main/glheader.h"
+#include "main/bufferobj.h"
#include "main/context.h"
#include "main/macros.h"
#include "main/vtxfmt.h"
@@ -695,7 +696,10 @@ void vbo_exec_vtx_init( struct vbo_exec_context *exec )
* continuously, unless vbo_use_buffer_objects() is called to enable
* use of real VBOs.
*/
- exec->vtx.bufferobj = ctx->Array.NullBufferObj;
+ _mesa_reference_buffer_object(ctx,
+ &exec->vtx.bufferobj,
+ ctx->Array.NullBufferObj);
+
exec->vtx.buffer_map = ALIGN_MALLOC(VBO_VERT_BUFFER_SIZE * sizeof(GLfloat), 64);
vbo_exec_vtxfmt_init( exec );