From: Jonathan Marek Date: Thu, 12 Sep 2019 17:17:21 +0000 (-0400) Subject: etnaviv: remove extra allocation for shader code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c4f63be5a6d04721b21ff7937900ca6699fbf1d7;p=mesa.git etnaviv: remove extra allocation for shader code Signed-off-by: Jonathan Marek Reviewed-by: Christian Gmeiner --- diff --git a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c index 63a818fb9cb..bc8aac03c46 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c +++ b/src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c @@ -805,7 +805,7 @@ etna_compile_shader_nir(struct etna_shader_variant *v) emit_inst(c, &(struct etna_inst) { .opcode = INST_OPCODE_NOP }); /* assemble instructions, fixing up labels */ - uint32_t *code = MALLOC(c->inst_ptr * 16 + 1024); + uint32_t *code = MALLOC(c->inst_ptr * 16); for (unsigned i = 0; i < c->inst_ptr; i++) { struct etna_inst *inst = &c->code[i]; if (inst->opcode == INST_OPCODE_BRANCH)