Mesa (master): aco: fix mbcnt_amd with wave32

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 14 20:46:19 UTC 2020


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

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Mon Dec 14 13:18:25 2020 +0000

aco: fix mbcnt_amd with wave32

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/8085>

---

 src/amd/compiler/aco_instruction_selection.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp
index bfb268a045f..f7a33054a41 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -8349,6 +8349,8 @@ void visit_intrinsic(isel_context *ctx, nir_intrinsic_instr *instr)
    case nir_intrinsic_mbcnt_amd: {
       Temp src = get_ssa_temp(ctx, instr->src[0].ssa);
       Temp dst = get_ssa_temp(ctx, &instr->dest.ssa);
+      /* Fit 64-bit mask for wave32 */
+      src = emit_extract_vector(ctx, src, 0, RegClass(src.type(), bld.lm.size()));
       Temp wqm_tmp = emit_mbcnt(ctx, bld.tmp(v1), Operand(src));
       emit_wqm(ctx, wqm_tmp, dst);
       break;



More information about the mesa-commit mailing list