diff options
author | Rhys Perry <pendingchaos02@gmail.com> | 2020-01-20 16:22:56 +0000 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2020-01-29 18:02:27 +0000 |
commit | c7d05141686ecd6266683f11fb5423b6545c49a4 (patch) | |
tree | 26113642467c85a972c45d0f27035d7e8dd8ae15 /src/amd | |
parent | 517fc3abc44734d56c6aec96cd95b1404cc64695 (diff) |
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@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3257>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/compiler/aco_insert_exec_mask.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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; |