From d5d74fe2b528da8124193366c9c3ad739a3abd50 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 26 Feb 2017 19:00:44 +0100 Subject: [PATCH] radeonsi: set the convergent attribute where needed Reviewed-by: Dave Airlie --- src/amd/common/ac_llvm_build.c | 8 ++++++-- src/gallium/drivers/radeonsi/si_shader.c | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index 20c6eb80560..0039e63e840 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -861,13 +861,17 @@ ac_build_ddxy(struct ac_llvm_context *ctx, args[1] = val; tl = ac_build_intrinsic(ctx, "llvm.amdgcn.ds.bpermute", ctx->i32, - args, 2, AC_FUNC_ATTR_READNONE); + args, 2, + AC_FUNC_ATTR_READNONE | + AC_FUNC_ATTR_CONVERGENT); args[0] = LLVMBuildMul(ctx->builder, trbl_tid, LLVMConstInt(ctx->i32, 4, false), ""); trbl = ac_build_intrinsic(ctx, "llvm.amdgcn.ds.bpermute", ctx->i32, - args, 2, AC_FUNC_ATTR_READNONE); + args, 2, + AC_FUNC_ATTR_READNONE | + AC_FUNC_ATTR_CONVERGENT); } else { LLVMValueRef store_ptr, load_ptr0, load_ptr1; diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 4e133ecebf6..edfa2848535 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -5207,7 +5207,7 @@ static void si_llvm_emit_barrier(const struct lp_build_tgsi_action *action, lp_build_intrinsic(gallivm->builder, HAVE_LLVM >= 0x0309 ? "llvm.amdgcn.s.barrier" : "llvm.AMDGPU.barrier.local", - ctx->voidt, NULL, 0, 0); + ctx->voidt, NULL, 0, LP_FUNC_ATTR_CONVERGENT); } static const struct lp_build_tgsi_action tex_action = { -- 2.30.2