aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_fbo.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_syncobj.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp16
-rw-r--r--mesalib/src/mesa/state_tracker/st_manager.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c10
-rw-r--r--mesalib/src/mesa/state_tracker/st_program.c12
6 files changed, 23 insertions, 21 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_fbo.c b/mesalib/src/mesa/state_tracker/st_cb_fbo.c
index 40e3677f6..01aba8eaf 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_fbo.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_fbo.c
@@ -232,7 +232,7 @@ st_renderbuffer_delete(struct gl_renderbuffer *rb)
pipe_surface_reference(&strb->surface, NULL);
pipe_resource_reference(&strb->texture, NULL);
free(strb->data);
- free(strb);
+ _mesa_delete_renderbuffer(rb);
}
diff --git a/mesalib/src/mesa/state_tracker/st_cb_syncobj.c b/mesalib/src/mesa/state_tracker/st_cb_syncobj.c
index d575a8497..f9f2348a3 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_syncobj.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_syncobj.c
@@ -60,7 +60,7 @@ static void st_delete_sync_object(struct gl_context *ctx,
struct st_sync_object *so = (struct st_sync_object*)obj;
screen->fence_reference(screen, &so->fence, NULL);
- FREE(so);
+ free(so);
}
static void st_fence_sync(struct gl_context *ctx, struct gl_sync_object *obj,
diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 9146f24f3..852dceaf6 100644
--- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -4680,7 +4680,8 @@ st_translate_program(
* so we put all the translated regs in t->constants.
*/
if (proginfo->Parameters) {
- t->constants = (struct ureg_src *)CALLOC(proginfo->Parameters->NumParameters * sizeof(t->constants[0]));
+ t->constants = (struct ureg_src *)
+ calloc(proginfo->Parameters->NumParameters, sizeof(t->constants[0]));
if (t->constants == NULL) {
ret = PIPE_ERROR_OUT_OF_MEMORY;
goto out;
@@ -4719,7 +4720,8 @@ st_translate_program(
/* Emit immediate values.
*/
- t->immediates = (struct ureg_src *)CALLOC(program->num_immediates * sizeof(struct ureg_src));
+ t->immediates = (struct ureg_src *)
+ calloc(program->num_immediates, sizeof(struct ureg_src));
if (t->immediates == NULL) {
ret = PIPE_ERROR_OUT_OF_MEMORY;
goto out;
@@ -4770,16 +4772,16 @@ st_translate_program(
out:
if (t) {
- FREE(t->insn);
- FREE(t->labels);
- FREE(t->constants);
- FREE(t->immediates);
+ free(t->insn);
+ free(t->labels);
+ free(t->constants);
+ free(t->immediates);
if (t->error) {
debug_printf("%s: translate error flag set\n", __FUNCTION__);
}
- FREE(t);
+ free(t);
}
return ret;
diff --git a/mesalib/src/mesa/state_tracker/st_manager.c b/mesalib/src/mesa/state_tracker/st_manager.c
index df73d0e1b..88b886de8 100644
--- a/mesalib/src/mesa/state_tracker/st_manager.c
+++ b/mesalib/src/mesa/state_tracker/st_manager.c
@@ -430,7 +430,7 @@ st_framebuffer_create(struct st_framebuffer_iface *stfbi)
/* add the color buffer */
idx = stfb->Base._ColorDrawBufferIndexes[0];
if (!st_framebuffer_add_renderbuffer(stfb, idx)) {
- FREE(stfb);
+ free(stfb);
return NULL;
}
diff --git a/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c b/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c
index 4d99b17dd..5f056b9b1 100644
--- a/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/mesalib/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -1198,7 +1198,7 @@ st_translate_mesa_program(
* for these, so we put all the translated regs in t->constants.
*/
if (program->Parameters) {
- t->constants = CALLOC( program->Parameters->NumParameters,
+ t->constants = calloc( program->Parameters->NumParameters,
sizeof t->constants[0] );
if (t->constants == NULL) {
ret = PIPE_ERROR_OUT_OF_MEMORY;
@@ -1259,9 +1259,9 @@ st_translate_mesa_program(
}
out:
- FREE(t->insn);
- FREE(t->labels);
- FREE(t->constants);
+ free(t->insn);
+ free(t->labels);
+ free(t->constants);
if (t->error) {
debug_printf("%s: translate error flag set\n", __FUNCTION__);
@@ -1278,5 +1278,5 @@ out:
void
st_free_tokens(const struct tgsi_token *tokens)
{
- FREE((void *)tokens);
+ free((void *)tokens);
}
diff --git a/mesalib/src/mesa/state_tracker/st_program.c b/mesalib/src/mesa/state_tracker/st_program.c
index 36015f69a..9816e22ac 100644
--- a/mesalib/src/mesa/state_tracker/st_program.c
+++ b/mesalib/src/mesa/state_tracker/st_program.c
@@ -74,7 +74,7 @@ delete_vp_variant(struct st_context *st, struct st_vp_variant *vpv)
if (vpv->tgsi.tokens)
st_free_tokens(vpv->tgsi.tokens);
- FREE( vpv );
+ free( vpv );
}
@@ -112,7 +112,7 @@ delete_fp_variant(struct st_context *st, struct st_fp_variant *fpv)
_mesa_free_parameter_list(fpv->parameters);
if (fpv->tgsi.tokens)
st_free_tokens(fpv->tgsi.tokens);
- FREE(fpv);
+ free(fpv);
}
@@ -144,7 +144,7 @@ delete_gp_variant(struct st_context *st, struct st_gp_variant *gpv)
if (gpv->driver_shader)
cso_delete_geometry_shader(st->cso_context, gpv->driver_shader);
- FREE(gpv);
+ free(gpv);
}
@@ -316,7 +316,7 @@ st_translate_vertex_program(struct st_context *st,
ureg = ureg_create( TGSI_PROCESSOR_VERTEX );
if (ureg == NULL) {
- FREE(vpv);
+ free(vpv);
return NULL;
}
@@ -676,7 +676,7 @@ st_translate_fragment_program(struct st_context *st,
ureg = ureg_create( TGSI_PROCESSOR_FRAGMENT );
if (ureg == NULL) {
- FREE(variant);
+ free(variant);
return NULL;
}
@@ -836,7 +836,7 @@ st_translate_geometry_program(struct st_context *st,
ureg = ureg_create( TGSI_PROCESSOR_GEOMETRY );
if (ureg == NULL) {
- FREE(gpv);
+ free(gpv);
return NULL;
}