From: Rhys Perry Date: Wed, 23 Feb 2022 17:21:42 +0000 (+0000) Subject: aco/insert_exec_mask: fix top-level to-exact with non-global exact mask X-Git-Tag: upstream/22.3.5~11971 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa55ecc2961523cde276f556f6d8fa523bbbabfe;p=platform%2Fupstream%2Fmesa.git aco/insert_exec_mask: fix top-level to-exact with non-global exact mask After transitioning to exact after a discard, the exec stack might be: [exact|global, wqm, exact] Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- diff --git a/src/amd/compiler/aco_insert_exec_mask.cpp b/src/amd/compiler/aco_insert_exec_mask.cpp index 62db890..5638b4e 100644 --- a/src/amd/compiler/aco_insert_exec_mask.cpp +++ b/src/amd/compiler/aco_insert_exec_mask.cpp @@ -522,11 +522,13 @@ process_instructions(exec_ctx& ctx, Block* block, std::vectorindex].exec.size() >= 2) { if (needs == WQM) { /* Preserve the WQM mask */ - ctx.info[block->index].exec[1].second &= ~mask_type_global; + ctx.info[block->index].exec[1].second &= ~mask_type_global; } else if (block->kind & block_kind_top_level) { - assert(state == WQM); - /* Transition to Exact without extra instruction */ - ctx.info[block->index].exec.pop_back(); + /* Transition to Exact without extra instruction. Since needs != WQM, we won't need + * WQM again. + */ + ctx.info[block->index].exec.resize(1); + assert(ctx.info[block->index].exec[0].second == (mask_type_exact | mask_type_global)); current_exec = get_exec_op(ctx.info[block->index].exec.back().first); ctx.info[block->index].exec[0].first = Operand(bld.lm); }