From dfc001dccc7a29b1acf8d1ecf8072223aa98bc1b Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 10 Nov 2016 16:08:39 -0500 Subject: [PATCH] freedreno/ir3: fixup ralloc fallout Fixes fallout from acc23b04 ("ralloc: remove memset from ralloc_size"). We were still depending on zero'd allocations in a couple of places. Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/ir3/ir3.c | 2 +- src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/freedreno/ir3/ir3.c b/src/gallium/drivers/freedreno/ir3/ir3.c index 9f2116a520f..c0a39d70def 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3.c +++ b/src/gallium/drivers/freedreno/ir3/ir3.c @@ -46,7 +46,7 @@ void * ir3_alloc(struct ir3 *shader, int sz) struct ir3 * ir3_create(struct ir3_compiler *compiler, unsigned nin, unsigned nout) { - struct ir3 *shader = ralloc(compiler, struct ir3); + struct ir3 *shader = rzalloc(compiler, struct ir3); shader->compiler = compiler; shader->ninputs = nin; diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c index b1b9d6b9734..f4d92650595 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c @@ -235,7 +235,7 @@ static void declare_var(struct ir3_compile *ctx, nir_variable *var) { unsigned length = glsl_get_length(var->type) * 4; /* always vec4, at least with ttn */ - struct ir3_array *arr = ralloc(ctx, struct ir3_array); + struct ir3_array *arr = rzalloc(ctx, struct ir3_array); arr->id = ++ctx->num_arrays; arr->length = length; arr->var = var; -- 2.30.2