summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv50/nv50_context.c2
-rw-r--r--src/gallium/drivers/nv50/nv50_draw.c2
-rw-r--r--src/gallium/drivers/nv50/nv50_program.c14
3 files changed, 9 insertions, 9 deletions
diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
index a225c4bf72..2494784a94 100644
--- a/src/gallium/drivers/nv50/nv50_context.c
+++ b/src/gallium/drivers/nv50/nv50_context.c
@@ -21,7 +21,7 @@ nv50_destroy(struct pipe_context *pipe)
struct nv50_context *nv50 = (struct nv50_context *)pipe;
draw_destroy(nv50->draw);
- free(nv50);
+ FREE(nv50);
}
diff --git a/src/gallium/drivers/nv50/nv50_draw.c b/src/gallium/drivers/nv50/nv50_draw.c
index d185d99950..2b0c0384a3 100644
--- a/src/gallium/drivers/nv50/nv50_draw.c
+++ b/src/gallium/drivers/nv50/nv50_draw.c
@@ -46,7 +46,7 @@ nv50_render_reset_stipple_counter(struct draw_stage *stage)
static void
nv50_render_destroy(struct draw_stage *stage)
{
- free(stage);
+ FREE(stage);
}
struct draw_stage *
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index cd6967b366..ff81719f03 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -180,8 +180,8 @@ kill_temp_temp(struct nv50_pc *pc)
static int
ctor_immd(struct nv50_pc *pc, float x, float y, float z, float w)
{
- pc->immd_buf = realloc(pc->immd_buf, (pc->immd_nr + 1) * 4 *
- sizeof(float));
+ pc->immd_buf = REALLOC(pc->immd_buf, (pc->immd_nr * r * sizeof(float)),
+ (pc->immd_nr + 1) * 4 * sizeof(float));
pc->immd_buf[(pc->immd_nr * 4) + 0] = x;
pc->immd_buf[(pc->immd_nr * 4) + 1] = y;
pc->immd_buf[(pc->immd_nr * 4) + 2] = z;
@@ -1276,7 +1276,7 @@ nv50_program_tx_prep(struct nv50_pc *pc)
}
if (pc->temp_nr) {
- pc->temp = calloc(pc->temp_nr * 4, sizeof(struct nv50_reg));
+ pc->temp = CALLOC(pc->temp_nr * 4, sizeof(struct nv50_reg));
if (!pc->temp)
goto out_err;
@@ -1293,7 +1293,7 @@ nv50_program_tx_prep(struct nv50_pc *pc)
struct nv50_reg *iv = NULL;
int aid = 0;
- pc->attr = calloc(pc->attr_nr * 4, sizeof(struct nv50_reg));
+ pc->attr = CALLOC(pc->attr_nr * 4, sizeof(struct nv50_reg));
if (!pc->attr)
goto out_err;
@@ -1339,7 +1339,7 @@ nv50_program_tx_prep(struct nv50_pc *pc)
if (pc->result_nr) {
int rid = 0;
- pc->result = calloc(pc->result_nr * 4, sizeof(struct nv50_reg));
+ pc->result = CALLOC(pc->result_nr * 4, sizeof(struct nv50_reg));
if (!pc->result)
goto out_err;
@@ -1360,7 +1360,7 @@ nv50_program_tx_prep(struct nv50_pc *pc)
if (pc->param_nr) {
int rid = 0;
- pc->param = calloc(pc->param_nr * 4, sizeof(struct nv50_reg));
+ pc->param = CALLOC(pc->param_nr * 4, sizeof(struct nv50_reg));
if (!pc->param)
goto out_err;
@@ -1376,7 +1376,7 @@ nv50_program_tx_prep(struct nv50_pc *pc)
if (pc->immd_nr) {
int rid = pc->param_nr * 4;
- pc->immd = calloc(pc->immd_nr * 4, sizeof(struct nv50_reg));
+ pc->immd = CALLOC(pc->immd_nr * 4, sizeof(struct nv50_reg));
if (!pc->immd)
goto out_err;