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

Author: Rhys Perry <[email protected]>
Date:   Tue Jun 13 15:25:08 2023 +0100

aco: include helpers in emit_uniform_{reduce,scan}

Found by inspection.

Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Georg Lehmann <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23621>

---

 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 05a46963315..d34c955818d 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -7892,6 +7892,7 @@ emit_uniform_reduce(isel_context* ctx, 
nir_intrinsic_instr* instr)
 
       Temp thread_count =
          bld.sop1(Builder::s_bcnt1_i32, bld.def(s1), bld.def(s1, scc), 
Operand(exec, bld.lm));
+      thread_count = emit_wqm(bld, thread_count);
 
       emit_addition_uniform_reduce(ctx, op, dst, instr->src[0], thread_count);
    } else {
@@ -7921,6 +7922,7 @@ emit_uniform_scan(isel_context* ctx, nir_intrinsic_instr* 
instr)
          packed_tid = emit_mbcnt(ctx, bld.tmp(v1), Operand(exec, bld.lm), 
Operand::c32(1u));
       else
          packed_tid = emit_mbcnt(ctx, bld.tmp(v1), Operand(exec, bld.lm));
+      packed_tid = emit_wqm(bld, packed_tid);
 
       emit_addition_uniform_reduce(ctx, op, dst, instr->src[0], packed_tid);
       return true;

Reply via email to