From 26299c87f8c399be4a02db6da3d53e5d2bd08668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Sun, 13 Sep 2020 16:33:35 +0200 Subject: [PATCH] aco: Add base argument to emit_mbcnt. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Timur Kristóf Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 3d4ea35b5ef..9a9f742f155 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -149,14 +149,14 @@ Temp get_ssa_temp(struct isel_context *ctx, nir_ssa_def *def) return ctx->allocated[def->index]; } -Temp emit_mbcnt(isel_context *ctx, Temp dst, Temp mask = Temp()) +Temp emit_mbcnt(isel_context *ctx, Temp dst, Temp mask = Temp(), Operand base = Operand(0u)) { Builder bld(ctx->program, ctx->block); assert(mask.id() == 0 || mask.regClass() == bld.lm); if (ctx->program->wave_size == 32) { Operand mask_lo = mask.id() ? Operand(mask) : Operand(-1u); - return bld.vop3(aco_opcode::v_mbcnt_lo_u32_b32, Definition(dst), mask_lo, Operand(0u)); + return bld.vop3(aco_opcode::v_mbcnt_lo_u32_b32, Definition(dst), mask_lo, base); } Operand mask_lo(-1u); @@ -168,7 +168,7 @@ Temp emit_mbcnt(isel_context *ctx, Temp dst, Temp mask = Temp()) mask_hi = Operand(mask_split.def(1).getTemp()); } - Temp mbcnt_lo = bld.vop3(aco_opcode::v_mbcnt_lo_u32_b32, bld.def(v1), mask_lo, Operand(0u)); + Temp mbcnt_lo = bld.vop3(aco_opcode::v_mbcnt_lo_u32_b32, bld.def(v1), mask_lo, base); if (ctx->program->chip_class <= GFX7) return bld.vop2(aco_opcode::v_mbcnt_hi_u32_b32, Definition(dst), mask_hi, mbcnt_lo);