summaryrefslogtreecommitdiff
path: root/src/mesa/vbo
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-02-19 11:58:49 -0500
committerKristian Høgsberg <krh@bitplanet.net>2010-02-19 12:03:01 -0500
commit32f2fd1c5d6088692551c80352b7d6fa35b0cd09 (patch)
tree5c44742f6d4f8711b6d1ca31d68d3245abd0187a /src/mesa/vbo
parent6bf1ea897fa470af58fe8916dff45e2da79634a3 (diff)
Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c4
-rw-r--r--src/mesa/vbo/vbo_rebase.c8
-rw-r--r--src/mesa/vbo/vbo_split_copy.c14
3 files changed, 13 insertions, 13 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index a284e4047f..f2f1674b6a 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -854,7 +854,7 @@ vbo_validated_multidrawelements(GLcontext *ctx, GLenum mode,
return;
}
- prim = _mesa_calloc(primcount * sizeof(*prim));
+ prim = calloc(1, primcount * sizeof(*prim));
if (prim == NULL) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glMultiDrawElements");
return;
@@ -960,7 +960,7 @@ vbo_validated_multidrawelements(GLcontext *ctx, GLenum mode,
}
}
- _mesa_free(prim);
+ free(prim);
}
diff --git a/src/mesa/vbo/vbo_rebase.c b/src/mesa/vbo/vbo_rebase.c
index 55a82ee369..1db36de3de 100644
--- a/src/mesa/vbo/vbo_rebase.c
+++ b/src/mesa/vbo/vbo_rebase.c
@@ -134,7 +134,7 @@ void vbo_rebase_prims( GLcontext *ctx,
/* If we can just tell the hardware or the TNL to interpret our
* indices with a different base, do so.
*/
- tmp_prims = (struct _mesa_prim *)_mesa_malloc(sizeof(*prim) * nr_prims);
+ tmp_prims = (struct _mesa_prim *)malloc(sizeof(*prim) * nr_prims);
for (i = 0; i < nr_prims; i++) {
tmp_prims[i] = prim[i];
@@ -187,7 +187,7 @@ void vbo_rebase_prims( GLcontext *ctx,
else {
/* Otherwise the primitives need adjustment.
*/
- tmp_prims = (struct _mesa_prim *)_mesa_malloc(sizeof(*prim) * nr_prims);
+ tmp_prims = (struct _mesa_prim *)malloc(sizeof(*prim) * nr_prims);
for (i = 0; i < nr_prims; i++) {
/* If this fails, it could indicate an application error:
@@ -229,10 +229,10 @@ void vbo_rebase_prims( GLcontext *ctx,
max_index - min_index );
if (tmp_indices)
- _mesa_free(tmp_indices);
+ free(tmp_indices);
if (tmp_prims)
- _mesa_free(tmp_prims);
+ free(tmp_prims);
}
diff --git a/src/mesa/vbo/vbo_split_copy.c b/src/mesa/vbo/vbo_split_copy.c
index 2ca111217c..2fae267ff5 100644
--- a/src/mesa/vbo/vbo_split_copy.c
+++ b/src/mesa/vbo/vbo_split_copy.c
@@ -466,7 +466,7 @@ replay_init( struct copy_context *copy )
switch (copy->ib->type) {
case GL_UNSIGNED_BYTE:
- copy->translated_elt_buf = _mesa_malloc(sizeof(GLuint) * copy->ib->count);
+ copy->translated_elt_buf = malloc(sizeof(GLuint) * copy->ib->count);
copy->srcelt = copy->translated_elt_buf;
for (i = 0; i < copy->ib->count; i++)
@@ -474,7 +474,7 @@ replay_init( struct copy_context *copy )
break;
case GL_UNSIGNED_SHORT:
- copy->translated_elt_buf = _mesa_malloc(sizeof(GLuint) * copy->ib->count);
+ copy->translated_elt_buf = malloc(sizeof(GLuint) * copy->ib->count);
copy->srcelt = copy->translated_elt_buf;
for (i = 0; i < copy->ib->count; i++)
@@ -500,7 +500,7 @@ replay_init( struct copy_context *copy )
*
* XXX: This should be a VBO!
*/
- copy->dstbuf = _mesa_malloc(copy->dstbuf_size * copy->vertex_size);
+ copy->dstbuf = malloc(copy->dstbuf_size * copy->vertex_size);
copy->dstptr = copy->dstbuf;
/* Setup new vertex arrays to point into the output buffer:
@@ -529,7 +529,7 @@ replay_init( struct copy_context *copy )
copy->ib->count * 2 + 3);
copy->dstelt_size = MIN2(copy->dstelt_size,
copy->limits->max_indices);
- copy->dstelt = _mesa_malloc(sizeof(GLuint) * copy->dstelt_size);
+ copy->dstelt = malloc(sizeof(GLuint) * copy->dstelt_size);
copy->dstelt_nr = 0;
/* Setup the new index buffer to point to the allocated element
@@ -553,9 +553,9 @@ replay_finish( struct copy_context *copy )
/* Free our vertex and index buffers:
*/
- _mesa_free(copy->translated_elt_buf);
- _mesa_free(copy->dstbuf);
- _mesa_free(copy->dstelt);
+ free(copy->translated_elt_buf);
+ free(copy->dstbuf);
+ free(copy->dstelt);
/* Unmap VBO's
*/