From 661922f6ac9576fc2077c5d50b53ef7edf9e8a18 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Thu, 17 Dec 2020 16:52:24 +0000 Subject: [PATCH] aco: add block to worklist in mark_block_wqm() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since we're requiring the branch condition to be in WQM, we have to ensure that the block is in the worklist. Fixes Trials Fusion hang at 4K and High settings. fossil-db (Sienna): Totals from 216 (0.15% of 139391) affected shaders: SGPRs: 13392 -> 13360 (-0.24%) CodeSize: 1321184 -> 1318592 (-0.20%) Instrs: 255310 -> 254662 (-0.25%) Cycles: 2178360 -> 2174652 (-0.17%) Affected fossils in fossil-db are dirt4, nier and youngblood. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3863 Cc: mesa-stable Part-of: --- src/amd/compiler/aco_insert_exec_mask.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/amd/compiler/aco_insert_exec_mask.cpp b/src/amd/compiler/aco_insert_exec_mask.cpp index 6bb5c831cf6..ff89fbfc02f 100644 --- a/src/amd/compiler/aco_insert_exec_mask.cpp +++ b/src/amd/compiler/aco_insert_exec_mask.cpp @@ -165,6 +165,8 @@ void mark_block_wqm(wqm_ctx &ctx, unsigned block_idx) return; ctx.branch_wqm[block_idx] = true; + ctx.worklist.insert(block_idx); + Block& block = ctx.program->blocks[block_idx]; /* TODO: this sets more branch conditions to WQM than it needs to