From 486bc1e17ecc975f98fb495bd2f8ae580eebbf6e Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Fri, 31 May 2019 15:38:39 -0400 Subject: ac: use amdgpu-flat-work-group-size Reviewed-by: Bas Nieuwenhuizen --- src/amd/common/ac_llvm_util.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/amd/common/ac_llvm_util.c') diff --git a/src/amd/common/ac_llvm_util.c b/src/amd/common/ac_llvm_util.c index 5b701603ebb..c8a8bf146fe 100644 --- a/src/amd/common/ac_llvm_util.c +++ b/src/amd/common/ac_llvm_util.c @@ -269,6 +269,16 @@ ac_llvm_add_target_dep_function_attr(LLVMValueRef F, LLVMAddTargetDependentFunctionAttr(F, name, str); } +void ac_llvm_set_workgroup_size(LLVMValueRef F, unsigned size) +{ + if (!size) + return; + + char str[32]; + snprintf(str, sizeof(str), "%u,%u", size, size); + LLVMAddTargetDependentFunctionAttr(F, "amdgpu-flat-work-group-size", str); +} + unsigned ac_count_scratch_private_memory(LLVMValueRef function) { -- cgit v1.2.3