summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_accum.c12
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c2
-rw-r--r--src/mesa/state_tracker/st_cb_bufferobjects.c2
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c12
-rw-r--r--src/mesa/state_tracker/st_cb_fbo.c10
-rw-r--r--src/mesa/state_tracker/st_cb_queryobj.c2
-rw-r--r--src/mesa/state_tracker/st_cb_rasterpos.c2
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c4
-rw-r--r--src/mesa/state_tracker/st_context.c4
-rw-r--r--src/mesa/state_tracker/st_context.h2
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c2
11 files changed, 27 insertions, 27 deletions
diff --git a/src/mesa/state_tracker/st_cb_accum.c b/src/mesa/state_tracker/st_cb_accum.c
index 1be72e729e..33e43ddcc4 100644
--- a/src/mesa/state_tracker/st_cb_accum.c
+++ b/src/mesa/state_tracker/st_cb_accum.c
@@ -143,7 +143,7 @@ accum_accum(struct st_context *st, GLfloat value,
PIPE_TRANSFER_READ, xpos, ypos,
width, height);
- buf = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat));
+ buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
pipe_get_tile_rgba(color_trans, 0, 0, width, height, buf);
@@ -165,7 +165,7 @@ accum_accum(struct st_context *st, GLfloat value,
_mesa_problem(NULL, "unexpected format in st_clear_accum_buffer()");
}
- _mesa_free(buf);
+ free(buf);
screen->tex_transfer_destroy(color_trans);
}
@@ -192,7 +192,7 @@ accum_load(struct st_context *st, GLfloat value,
PIPE_TRANSFER_READ, xpos, ypos,
width, height);
- buf = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat));
+ buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
pipe_get_tile_rgba(color_trans, 0, 0, width, height, buf);
@@ -214,7 +214,7 @@ accum_load(struct st_context *st, GLfloat value,
_mesa_problem(NULL, "unexpected format in st_clear_accum_buffer()");
}
- _mesa_free(buf);
+ free(buf);
screen->tex_transfer_destroy(color_trans);
}
@@ -237,7 +237,7 @@ accum_return(GLcontext *ctx, GLfloat value,
if (ST_DEBUG & DEBUG_FALLBACK)
debug_printf("%s: fallback processing\n", __FUNCTION__);
- buf = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat));
+ buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
if (!colormask[0] || !colormask[1] || !colormask[2] || !colormask[3])
usage = PIPE_TRANSFER_READ_WRITE;
@@ -282,7 +282,7 @@ accum_return(GLcontext *ctx, GLfloat value,
pipe_put_tile_rgba(color_trans, 0, 0, width, height, buf);
- _mesa_free(buf);
+ free(buf);
screen->tex_transfer_destroy(color_trans);
}
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index e029ea7ffc..5968426a1d 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -837,7 +837,7 @@ st_destroy_bitmap(struct st_context *st)
screen->tex_transfer_destroy(cache->trans);
}
pipe_texture_reference(&st->bitmap.cache->texture, NULL);
- _mesa_free(st->bitmap.cache);
+ free(st->bitmap.cache);
st->bitmap.cache = NULL;
}
}
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index c92af34378..b55a085cc7 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -80,7 +80,7 @@ st_bufferobj_free(GLcontext *ctx, struct gl_buffer_object *obj)
if (st_obj->buffer)
pipe_buffer_reference(&st_obj->buffer, NULL);
- _mesa_free(st_obj);
+ free(st_obj);
}
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 36c0a2b0e1..4e86450edf 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -828,7 +828,7 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
ubyte *buffer;
int i;
- buffer = _mesa_malloc(width * height * sizeof(ubyte));
+ buffer = malloc(width * height * sizeof(ubyte));
if (!buffer) {
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyPixels(stencil)");
return;
@@ -907,7 +907,7 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
}
}
- _mesa_free(buffer);
+ free(buffer);
/* unmap the stencil buffer */
screen->transfer_unmap(screen, ptDraw);
@@ -1089,19 +1089,19 @@ st_CopyPixels(GLcontext *ctx, GLint srcx, GLint srcy,
if (type == GL_COLOR) {
/* alternate path using get/put_tile() */
- GLfloat *buf = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat));
+ GLfloat *buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
pipe_get_tile_rgba(ptRead, 0, 0, width, height, buf);
pipe_put_tile_rgba(ptTex, 0, 0, width, height, buf);
- _mesa_free(buf);
+ free(buf);
}
else {
/* GL_DEPTH */
- GLuint *buf = (GLuint *) _mesa_malloc(width * height * sizeof(GLuint));
+ GLuint *buf = (GLuint *) malloc(width * height * sizeof(GLuint));
pipe_get_tile_z(ptRead, 0, 0, width, height, buf);
pipe_put_tile_z(ptTex, 0, 0, width, height, buf);
- _mesa_free(buf);
+ free(buf);
}
screen->tex_transfer_destroy(ptRead);
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 4638879fc2..bfa8e21095 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -102,14 +102,14 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
if(strb->software) {
size_t size;
- _mesa_free(strb->data);
+ free(strb->data);
assert(strb->format != PIPE_FORMAT_NONE);
strb->stride = util_format_get_stride(strb->format, width);
size = util_format_get_2d_size(strb->format, strb->stride, height);
- strb->data = _mesa_malloc(size);
+ strb->data = malloc(size);
return strb->data != NULL;
}
@@ -181,8 +181,8 @@ st_renderbuffer_delete(struct gl_renderbuffer *rb)
ASSERT(strb);
pipe_surface_reference(&strb->surface, NULL);
pipe_texture_reference(&strb->texture, NULL);
- _mesa_free(strb->data);
- _mesa_free(strb);
+ free(strb->data);
+ free(strb);
}
@@ -286,7 +286,7 @@ st_new_renderbuffer_fb(enum pipe_format format, int samples, boolean sw)
default:
_mesa_problem(NULL,
"Unexpected format in st_new_renderbuffer_fb");
- _mesa_free(strb);
+ free(strb);
return NULL;
}
diff --git a/src/mesa/state_tracker/st_cb_queryobj.c b/src/mesa/state_tracker/st_cb_queryobj.c
index dc40c5d269..c66729b124 100644
--- a/src/mesa/state_tracker/st_cb_queryobj.c
+++ b/src/mesa/state_tracker/st_cb_queryobj.c
@@ -69,7 +69,7 @@ st_DeleteQuery(GLcontext *ctx, struct gl_query_object *q)
stq->pq = NULL;
}
- _mesa_free(stq);
+ free(stq);
}
diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c
index 4692891c8a..752b411b5f 100644
--- a/src/mesa/state_tracker/st_cb_rasterpos.c
+++ b/src/mesa/state_tracker/st_cb_rasterpos.c
@@ -101,7 +101,7 @@ rastpos_line( struct draw_stage *stage, struct prim_header *prim )
static void
rastpos_destroy(struct draw_stage *stage)
{
- _mesa_free(stage);
+ free(stage);
}
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 13f050900a..7e50e2ab2d 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -1319,7 +1319,7 @@ fallback_copy_texsubimage(GLcontext *ctx, GLenum target, GLint level,
else {
/* RGBA format */
GLfloat *tempSrc =
- (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat));
+ (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
if (tempSrc && texDest) {
const GLint dims = 2;
@@ -1359,7 +1359,7 @@ fallback_copy_texsubimage(GLcontext *ctx, GLenum target, GLint level,
}
if (tempSrc)
- _mesa_free(tempSrc);
+ free(tempSrc);
}
st_texture_image_unmap(ctx->st, stImage);
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 5b3987d73a..de8beaf5e2 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -222,7 +222,7 @@ static void st_destroy_context_priv( struct st_context *st )
st->default_texture = NULL;
}
- _mesa_free( st );
+ free( st );
}
@@ -257,7 +257,7 @@ void st_destroy_context( struct st_context *st )
pipe->destroy( pipe );
- _mesa_free(ctx);
+ free(ctx);
}
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index 50e98d7146..13b7b0e22d 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -239,7 +239,7 @@ st_fb_orientation(const struct gl_framebuffer *fb)
/** clear-alloc a struct-sized object, with casting */
-#define ST_CALLOC_STRUCT(T) (struct T *) _mesa_calloc(sizeof(struct T))
+#define ST_CALLOC_STRUCT(T) (struct T *) calloc(1, sizeof(struct T))
extern int
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 537a6a8648..807d21a719 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -1055,7 +1055,7 @@ out:
/**
- * Tokens cannot be free with _mesa_free otherwise the builtin gallium
+ * Tokens cannot be free with free otherwise the builtin gallium
* malloc debugging will get confused.
*/
void