1 /* 2 * Copyright © 2016 Bas Nieuwenhuizen 3 * 4 * SPDX-License-Identifier: MIT 5 */ 6 7 #ifndef AC_NIR_TO_LLVM_H 8 #define AC_NIR_TO_LLVM_H 9 10 #include "amd_family.h" 11 #include "compiler/shader_enums.h" 12 #include <llvm-c/Core.h> 13 #include "llvm-c/TargetMachine.h" 14 15 #include <stdbool.h> 16 17 struct nir_shader; 18 struct ac_llvm_context; 19 struct ac_shader_abi; 20 struct ac_shader_args; 21 ac_llvm_reg_index_soa(unsigned index,unsigned chan)22static inline unsigned ac_llvm_reg_index_soa(unsigned index, unsigned chan) 23 { 24 return (index * 4) + chan; 25 } 26 27 bool ac_nir_translate(struct ac_llvm_context *ac, struct ac_shader_abi *abi, 28 const struct ac_shader_args *args, struct nir_shader *nir); 29 30 #endif /* AC_NIR_TO_LLVM_H */ 31