amd: fix ac_build_mbcnt_add in wave32 mode

add_src was ignored and i32_0 was always used.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: 1e49018ced ("amd: Add extra source to the mbcnt_amd NIR intrinsic.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16427>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2022-05-11 14:57:13 +02:00 committed by Marge Bot
parent 1f31564607
commit db2fd0ca83
1 changed files with 1 additions and 1 deletions

View File

@ -3207,7 +3207,7 @@ LLVMValueRef ac_build_mbcnt_add(struct ac_llvm_context *ctx, LLVMValueRef mask,
{
if (ctx->wave_size == 32) {
LLVMValueRef val = ac_build_intrinsic(ctx, "llvm.amdgcn.mbcnt.lo", ctx->i32,
(LLVMValueRef[]){mask, ctx->i32_0}, 2, AC_FUNC_ATTR_READNONE);
(LLVMValueRef[]){mask, add_src}, 2, AC_FUNC_ATTR_READNONE);
ac_set_range_metadata(ctx, val, 0, ctx->wave_size);
return val;
}