aco: fix emit_mbcnt() with a VGPR mask

Found by inspection. Should be possible with nir_intrinsic_mbcnt_amd.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11295>
This commit is contained in:
Rhys Perry
2021-06-10 11:07:31 +01:00
committed by Marge Bot
parent f884c2e3be
commit 9162963f0a
@@ -142,7 +142,8 @@ Temp emit_mbcnt(isel_context *ctx, Temp dst, Operand mask = Operand(), Operand b
Operand mask_hi(-1u);
if (mask.isTemp()) {
Builder::Result mask_split = bld.pseudo(aco_opcode::p_split_vector, bld.def(s1), bld.def(s1), mask);
RegClass rc = RegClass(mask.regClass().type(), 1);
Builder::Result mask_split = bld.pseudo(aco_opcode::p_split_vector, bld.def(rc), bld.def(rc), mask);
mask_lo = Operand(mask_split.def(0).getTemp());
mask_hi = Operand(mask_split.def(1).getTemp());
} else if (mask.physReg() == exec) {