summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_cb_accum.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-02-12 10:08:25 -0700
committerBrian Paul <brianp@vmware.com>2009-02-12 10:11:55 -0700
commit1a2f4dd8768703fbc1b2a0d5be342345644805b4 (patch)
tree4b3015001998370edd8df9dcd3c7eaed6f2f7f42 /src/mesa/state_tracker/st_cb_accum.c
parent19dff5efc1e348d037b1b3cdfb9ac91020ecde4d (diff)
mesa: consistantly use mesa memory-functions in gallium state tracker
Use _mesa_malloc(), _mesa_free(), etc everywhere, not malloc(), free(), etc. Still using CALLOC_STRUCT() at this point.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_accum.c')
-rw-r--r--src/mesa/state_tracker/st_cb_accum.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_cb_accum.c b/src/mesa/state_tracker/st_cb_accum.c
index a4e72b48ed..2fc37343bd 100644
--- a/src/mesa/state_tracker/st_cb_accum.c
+++ b/src/mesa/state_tracker/st_cb_accum.c
@@ -206,8 +206,8 @@ accum_accum(struct pipe_context *pipe, GLfloat value,
color_surf = screen->get_tex_surface(screen, color_strb->texture, 0, 0, 0,
PIPE_BUFFER_USAGE_CPU_READ);
- colorBuf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
- accBuf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
+ colorBuf = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat));
+ accBuf = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat));
pipe_get_tile_rgba(color_surf, xpos, ypos, width, height, colorBuf);
acc_get_tile_rgba(pipe, acc_surf, xpos, ypos, width, height, accBuf);
@@ -218,8 +218,8 @@ accum_accum(struct pipe_context *pipe, GLfloat value,
acc_put_tile_rgba(pipe, acc_surf, xpos, ypos, width, height, accBuf);
- free(colorBuf);
- free(accBuf);
+ _mesa_free(colorBuf);
+ _mesa_free(accBuf);
pipe_surface_reference(&acc_surf, NULL);
pipe_surface_reference(&color_surf, NULL);
}
@@ -242,7 +242,7 @@ accum_load(struct pipe_context *pipe, GLfloat value,
color_surf = screen->get_tex_surface(screen, color_strb->texture, 0, 0, 0,
PIPE_BUFFER_USAGE_CPU_READ);
- buf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
+ buf = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat));
pipe_get_tile_rgba(color_surf, xpos, ypos, width, height, buf);
@@ -252,7 +252,7 @@ accum_load(struct pipe_context *pipe, GLfloat value,
acc_put_tile_rgba(pipe, acc_surf, xpos, ypos, width, height, buf);
- free(buf);
+ _mesa_free(buf);
pipe_surface_reference(&acc_surf, NULL);
pipe_surface_reference(&color_surf, NULL);
}
@@ -271,7 +271,7 @@ accum_return(GLcontext *ctx, GLfloat value,
GLfloat *abuf, *cbuf = NULL;
GLint i, ch;
- abuf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
+ abuf = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat));
acc_surf = screen->get_tex_surface(screen, acc_strb->texture, 0, 0, 0,
PIPE_BUFFER_USAGE_CPU_READ);
@@ -283,7 +283,7 @@ accum_return(GLcontext *ctx, GLfloat value,
acc_get_tile_rgba(pipe, acc_surf, xpos, ypos, width, height, abuf);
if (!colormask[0] || !colormask[1] || !colormask[2] || !colormask[3]) {
- cbuf = (GLfloat *) malloc(width * height * 4 * sizeof(GLfloat));
+ cbuf = (GLfloat *) _mesa_malloc(width * height * 4 * sizeof(GLfloat));
pipe_get_tile_rgba(color_surf, xpos, ypos, width, height, cbuf);
}
@@ -301,9 +301,9 @@ accum_return(GLcontext *ctx, GLfloat value,
pipe_put_tile_rgba(color_surf, xpos, ypos, width, height, abuf);
- free(abuf);
+ _mesa_free(abuf);
if (cbuf)
- free(cbuf);
+ _mesa_free(cbuf);
pipe_surface_reference(&acc_surf, NULL);
pipe_surface_reference(&color_surf, NULL);
}