From f0074a6f0532196f5d9d2be00a9d884100401816 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Tue, 12 Jan 2021 16:18:47 +0000 Subject: [PATCH] aco: do not flag all blocks WQM to ensure we enter all nested loops in WQM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should no longer be necessary since the mark_block_wqm() we use to flag break conditions as WQM now adds block to the worklist. With them added to the worklist, get_block_needs() will add WQM to block_needs. Adding WQM to block_needs here without adding the block to the worklist (like we do here) can cause issues because it does not ensure that the predecessors' branches are in WQM (needed for it to be possible to transition to WQM in the block). This happened in an Overwatch shader. No fossil-db changes. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Fixes: 661922f6ac9 ("aco: add block to worklist in mark_block_wqm()") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4066 Part-of: --- src/amd/compiler/aco_insert_exec_mask.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/amd/compiler/aco_insert_exec_mask.cpp b/src/amd/compiler/aco_insert_exec_mask.cpp index cdc7a70e6b9..9c184f956ce 100644 --- a/src/amd/compiler/aco_insert_exec_mask.cpp +++ b/src/amd/compiler/aco_insert_exec_mask.cpp @@ -152,8 +152,6 @@ void get_block_needs(wqm_ctx &ctx, exec_ctx &exec_ctx, Block* block) * the conditions might be computed outside the nested CF */ if (ctx.program->blocks[block_idx].kind & block_kind_break) mark_block_wqm(ctx, block_idx); - /* flag all blocks as WQM to ensure we enter all (nested) loops in WQM */ - exec_ctx.info[block_idx].block_needs |= WQM; block_idx++; } } else if (ctx.loop && !ctx.wqm) {