etnaviv: remove extra allocation for shader code
authorJonathan Marek <jonathan@marek.ca>
Thu, 12 Sep 2019 17:17:21 +0000 (13:17 -0400)
committerJonathan Marek <jonathan@marek.ca>
Sat, 28 Sep 2019 04:34:43 +0000 (00:34 -0400)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_compiler_nir.c

index 63a818fb9cb9a99d676c0888bf77d31c538e9f5a..bc8aac03c46f83a5b55d653b16162f25c790f0ec 100644 (file)
@@ -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)