Mesa (staging/22.0): amd: fix ac_build_mbcnt_add in wave32 mode
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri May 13 17:04:17 UTC 2022
Module: Mesa
Branch: staging/22.0
Commit: 7b9e180d20035bbcc57ccd94e7f47daf89826a95
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b9e180d20035bbcc57ccd94e7f47daf89826a95
Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date: Wed May 11 14:57:13 2022 +0200
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 at amd.com>
Reviewed-by: Timur Kristóf <timur.kristof at gmail.com>
Fixes: 1e49018cedf ("amd: Add extra source to the mbcnt_amd NIR intrinsic.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16427>
(cherry picked from commit db2fd0ca83f4f2000eae87f4e7915d775833393a)
---
.pick_status.json | 2 +-
src/amd/llvm/ac_llvm_build.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index fe14ae62fed..e5606427d97 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -852,7 +852,7 @@
"description": "amd: fix ac_build_mbcnt_add in wave32 mode",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"because_sha": "1e49018cedf700fd21fe1498d24742cecf4b5ff4"
},
{
diff --git a/src/amd/llvm/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c
index fc51dca73af..bd5d2af55d6 100644
--- a/src/amd/llvm/ac_llvm_build.c
+++ b/src/amd/llvm/ac_llvm_build.c
@@ -3466,7 +3466,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;
}
More information about the mesa-commit
mailing list