ac/nir: move radeon_llvm_reg_index_soa() to ac_nir_to_llvm.h
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 9 Mar 2018 15:54:46 +0000 (16:54 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 13 Mar 2018 13:05:06 +0000 (14:05 +0100)
Required in order to move all RADV specific code outside of ac/nir.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_nir_to_llvm.c
src/amd/common/ac_nir_to_llvm.h

index 93cf2bdafac2d7457f8eed22b0c4e8217614267f..73bd172a78451698f99480c0dad2ca7594bbd7d4 100644 (file)
@@ -143,11 +143,6 @@ static LLVMValueRef get_sampler_desc(struct ac_nir_context *ctx,
                                     const nir_tex_instr *instr,
                                     bool image, bool write);
 
-static unsigned radeon_llvm_reg_index_soa(unsigned index, unsigned chan)
-{
-       return (index * 4) + chan;
-}
-
 static unsigned shader_io_get_unique_index(gl_varying_slot slot)
 {
        /* handle patch indices separate */
index 7b64ad54fc536071a509a19b99be43810611108c..ee73d1cbbcd73595eb995b7c182e510c135a9f22 100644 (file)
@@ -214,6 +214,11 @@ struct ac_shader_variant_info {
        };
 };
 
+static inline unsigned radeon_llvm_reg_index_soa(unsigned index, unsigned chan)
+{
+       return (index * 4) + chan;
+}
+
 void ac_compile_nir_shader(LLVMTargetMachineRef tm,
                            struct ac_shader_binary *binary,
                            struct ac_shader_config *config,