From 8cfa60eab85bfe08098ddd014da861b9e3f6aca3 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Tue, 21 Apr 2020 11:27:46 +0200 Subject: [PATCH] ir3: Don't double-insert the first block The first block was being added to the list twice, once here and once in emit_block(), leading to list corruption and infinite loops when trying to traverse the list of blocks backwards. Part-of: --- src/freedreno/ir3/ir3_compiler_nir.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index a82faee998e..fad611c9b5f 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -3262,7 +3262,6 @@ emit_instructions(struct ir3_context *ctx) /* Create inputs in first block: */ ctx->block = get_block(ctx, nir_start_block(fxn)); ctx->in_block = ctx->block; - list_addtail(&ctx->block->node, &ctx->ir->block_list); /* for fragment shader, the vcoord input register is used as the * base for bary.f varying fetch instrs: -- 2.30.2