From: Dave Airlie Date: Thu, 10 Nov 2016 04:12:32 +0000 (+1000) Subject: radv: fixup botched llvm API changes. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=19decd8ce43a7fad9b6a276d47296336f062ca23;p=mesa.git radv: fixup botched llvm API changes. Reported-by: Jan Vesely Signed-off-by: Dave Airlie --- diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index 5468483c486..35e669ad7e1 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -296,14 +296,13 @@ create_llvm_function(LLVMContextRef ctx, LLVMModuleRef module, LLVMSetFunctionCallConv(main_function, RADEON_LLVM_AMDGPU_CS); for (unsigned i = 0; i < sgpr_params; ++i) { - LLVMValueRef P = LLVMGetParam(main_function, i); - if (i < array_params) { - ac_add_function_attr(P, i + 1, AC_FUNC_ATTR_BYVAL); + LLVMValueRef P = LLVMGetParam(main_function, i); + ac_add_function_attr(main_function, i + 1, AC_FUNC_ATTR_BYVAL); ac_add_attr_dereferenceable(P, UINT64_MAX); } else { - ac_add_function_attr(P, i + 1, AC_FUNC_ATTR_INREG); + ac_add_function_attr(main_function, i + 1, AC_FUNC_ATTR_INREG); } }