Mesa (master): aco: parallelcopy exec mask before s_wqm

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 29 18:23:33 UTC 2020


Module: Mesa
Branch: master
Commit: c7d05141686ecd6266683f11fb5423b6545c49a4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c7d05141686ecd6266683f11fb5423b6545c49a4

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Mon Jan 20 16:22:56 2020 +0000

aco: parallelcopy exec mask before s_wqm

It can be used later and we want any uses to not be fixed to exec, so it's
definition can't be fixed to exec because of how exec masks interact with
register demand calculation.

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3257>

---

 src/amd/compiler/aco_insert_exec_mask.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/amd/compiler/aco_insert_exec_mask.cpp b/src/amd/compiler/aco_insert_exec_mask.cpp
index 539d0a2580b..44da289339b 100644
--- a/src/amd/compiler/aco_insert_exec_mask.cpp
+++ b/src/amd/compiler/aco_insert_exec_mask.cpp
@@ -315,6 +315,13 @@ void transition_to_WQM(exec_ctx& ctx, Builder bld, unsigned idx)
       return;
    if (ctx.info[idx].exec.back().second & mask_type_global) {
       Temp exec_mask = ctx.info[idx].exec.back().first;
+      /* TODO: we might generate better code if we pass the uncopied "exec_mask"
+       * directly to the s_wqm (we still need to keep this parallelcopy for
+       * potential later uses of exec_mask though). We currently can't do this
+       * because of a RA bug. */
+      exec_mask = bld.pseudo(aco_opcode::p_parallelcopy, bld.def(bld.lm), bld.exec(exec_mask));
+      ctx.info[idx].exec.back().first = exec_mask;
+
       exec_mask = bld.sop1(Builder::s_wqm, bld.def(bld.lm, exec), bld.def(s1, scc), exec_mask);
       ctx.info[idx].exec.emplace_back(exec_mask, mask_type_global | mask_type_wqm);
       return;



More information about the mesa-commit mailing list