Mesa (staging/20.3): aco: add block to worklist in mark_block_wqm()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Dec 17 21:21:47 UTC 2020


Module: Mesa
Branch: staging/20.3
Commit: 4ba1dba7acb703ac5a6a0105ed88de6c693d4e53
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4ba1dba7acb703ac5a6a0105ed88de6c693d4e53

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Thu Dec 17 16:52:24 2020 +0000

aco: add block to worklist in mark_block_wqm()

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 <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3863
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8145>
(cherry picked from commit 661922f6ac9576fc2077c5d50b53ef7edf9e8a18)

---

 .pick_status.json                         | 2 +-
 src/amd/compiler/aco_insert_exec_mask.cpp | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index fc5b20fa924..d128047acd7 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -4,7 +4,7 @@
         "description": "aco: add block to worklist in mark_block_wqm()",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/amd/compiler/aco_insert_exec_mask.cpp b/src/amd/compiler/aco_insert_exec_mask.cpp
index 638157ccf2f..8a13564ab2d 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



More information about the mesa-commit mailing list