diff --git a/.pick_status.json b/.pick_status.json index c2f370897a2..90b22fd4ef2 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1714,7 +1714,7 @@ "description": "freedreno/ir3: Fix tess/geom asan error", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "ee0ee2a3174775531dd6cc7663940e2acf48b7b8", "notes": null diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index 1e54e0629b1..4cc32be3848 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -5951,9 +5951,11 @@ ir3_compile_shader_nir(struct ir3_compiler *compiler, */ if (so->type == MESA_SHADER_TESS_CTRL || so->type == MESA_SHADER_GEOMETRY) { struct ir3_block *first_block = ir3_start_block(ir); - struct ir3_instruction *first_instr = list_first_entry( - &first_block->instr_list, struct ir3_instruction, node); - first_instr->flags |= IR3_INSTR_SS | IR3_INSTR_SY; + if (!list_is_empty(&first_block->instr_list)) { + struct ir3_instruction *first_instr = list_first_entry( + &first_block->instr_list, struct ir3_instruction, node); + first_instr->flags |= IR3_INSTR_SS | IR3_INSTR_SY; + } } if (ctx->compiler->gen >= 7 && so->type == MESA_SHADER_COMPUTE) {