Mesa (master): ac/nir: move radeon_llvm_reg_index_soa() to ac_nir_to_llvm.h
Samuel Pitoiset
hakzsam at kemper.freedesktop.org
Tue Mar 13 13:05:26 UTC 2018
Module: Mesa
Branch: master
Commit: 4e3117b7189fd787fdcb9c9512216215b225d200
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4e3117b7189fd787fdcb9c9512216215b225d200
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Fri Mar 9 16:54:46 2018 +0100
ac/nir: move radeon_llvm_reg_index_soa() to ac_nir_to_llvm.h
Required in order to move all RADV specific code outside of ac/nir.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
---
src/amd/common/ac_nir_to_llvm.c | 5 -----
src/amd/common/ac_nir_to_llvm.h | 5 +++++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 93cf2bdafa..73bd172a78 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -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 */
diff --git a/src/amd/common/ac_nir_to_llvm.h b/src/amd/common/ac_nir_to_llvm.h
index 7b64ad54fc..ee73d1cbbc 100644
--- a/src/amd/common/ac_nir_to_llvm.h
+++ b/src/amd/common/ac_nir_to_llvm.h
@@ -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,
More information about the mesa-commit
mailing list