summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_split_copy.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-06-15 10:58:04 -0600
committerBrian Paul <[email protected]>2009-06-15 10:58:04 -0600
commit01f7bda44c92268fa288bbd8f53af3a3620bd315 (patch)
treef6f2c3ee5509989ebe72ff7a9c2a17c086721584 /src/mesa/vbo/vbo_split_copy.c
parentb0d874bfbec8a323d7a69d98fad875162222a1cb (diff)
mesa: revert some recent VBO buffer object refcounting changes
Reverts part of commit d7ea9ddf5824556e47decac7ba200f37cf1e552f. We were calling _mesa_reference_buffer_object() on some heap-allocated memory that was uninitialized and could trigger an assertion. We can actually go back to "looser" ref counting of the Null/default buffer object in these cases.
Diffstat (limited to 'src/mesa/vbo/vbo_split_copy.c')
-rw-r--r--src/mesa/vbo/vbo_split_copy.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c
index 2725cc82b73..dcb14c868b8 100644
--- a/src/mesa/vbo/vbo_split_copy.c
+++ b/src/mesa/vbo/vbo_split_copy.c
@@ -30,7 +30,6 @@
*/
#include "main/glheader.h"
-#include "main/bufferobj.h"
#include "main/imports.h"
#include "main/image.h"
#include "main/macros.h"
@@ -518,8 +517,7 @@ replay_init( struct copy_context *copy )
dst->Ptr = copy->dstbuf + offset;
dst->Enabled = GL_TRUE;
dst->Normalized = src->Normalized;
- _mesa_reference_buffer_object(ctx, &dst->BufferObj,
- ctx->Shared->NullBufferObj);
+ dst->BufferObj = ctx->Shared->NullBufferObj;
dst->_MaxElement = copy->dstbuf_size; /* may be less! */
offset += copy->varying[i].size;
@@ -539,8 +537,7 @@ replay_init( struct copy_context *copy )
*/
copy->dstib.count = 0; /* duplicates dstelt_nr */
copy->dstib.type = GL_UNSIGNED_INT;
- _mesa_reference_buffer_object(ctx, &copy->dstib.obj,
- ctx->Shared->NullBufferObj);
+ copy->dstib.obj = ctx->Shared->NullBufferObj;
copy->dstib.ptr = copy->dstelt;
}