Mesa (master): radeonsi: move si_insert_input_* functions

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 15 22:20:18 UTC 2020


Module: Mesa
Branch: master
Commit: d7c86b106ca5d2f2229f27e66d76cd24ccf81a82
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d7c86b106ca5d2f2229f27e66d76cd24ccf81a82

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Mon Dec 23 19:53:46 2019 -0500

radeonsi: move si_insert_input_* functions

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3399>

---

 src/gallium/drivers/radeonsi/si_shader.c           | 28 ----------------------
 .../drivers/radeonsi/si_shader_llvm_build.c        | 28 ++++++++++++++++++++++
 2 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
index c229eb967c8..35f1c017a9f 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -2172,34 +2172,6 @@ static void si_write_tess_factors(struct si_shader_context *ctx,
 	ac_build_endif(&ctx->ac, 6503);
 }
 
-LLVMValueRef si_insert_input_ret(struct si_shader_context *ctx, LLVMValueRef ret,
-				 struct ac_arg param, unsigned return_index)
-{
-	return LLVMBuildInsertValue(ctx->ac.builder, ret,
-				    ac_get_arg(&ctx->ac, param),
-				    return_index, "");
-}
-
-LLVMValueRef si_insert_input_ret_float(struct si_shader_context *ctx, LLVMValueRef ret,
-				       struct ac_arg param, unsigned return_index)
-{
-	LLVMBuilderRef builder = ctx->ac.builder;
-	LLVMValueRef p = ac_get_arg(&ctx->ac, param);
-
-	return LLVMBuildInsertValue(builder, ret,
-				    ac_to_float(&ctx->ac, p),
-				    return_index, "");
-}
-
-LLVMValueRef si_insert_input_ptr(struct si_shader_context *ctx, LLVMValueRef ret,
-				 struct ac_arg param, unsigned return_index)
-{
-	LLVMBuilderRef builder = ctx->ac.builder;
-	LLVMValueRef ptr = ac_get_arg(&ctx->ac, param);
-	ptr = LLVMBuildPtrToInt(builder, ptr, ctx->i32, "");
-	return LLVMBuildInsertValue(builder, ret, ptr, return_index, "");
-}
-
 /* This only writes the tessellation factor levels. */
 static void si_llvm_emit_tcs_epilogue(struct ac_shader_abi *abi,
 				      unsigned max_outputs,
diff --git a/src/gallium/drivers/radeonsi/si_shader_llvm_build.c b/src/gallium/drivers/radeonsi/si_shader_llvm_build.c
index ddf499998c0..a6522d30d75 100644
--- a/src/gallium/drivers/radeonsi/si_shader_llvm_build.c
+++ b/src/gallium/drivers/radeonsi/si_shader_llvm_build.c
@@ -177,6 +177,34 @@ void si_llvm_build_ret(struct si_shader_context *ctx, LLVMValueRef ret)
 		LLVMBuildRet(ctx->ac.builder, ret);
 }
 
+LLVMValueRef si_insert_input_ret(struct si_shader_context *ctx, LLVMValueRef ret,
+				 struct ac_arg param, unsigned return_index)
+{
+	return LLVMBuildInsertValue(ctx->ac.builder, ret,
+				    ac_get_arg(&ctx->ac, param),
+				    return_index, "");
+}
+
+LLVMValueRef si_insert_input_ret_float(struct si_shader_context *ctx, LLVMValueRef ret,
+				       struct ac_arg param, unsigned return_index)
+{
+	LLVMBuilderRef builder = ctx->ac.builder;
+	LLVMValueRef p = ac_get_arg(&ctx->ac, param);
+
+	return LLVMBuildInsertValue(builder, ret,
+				    ac_to_float(&ctx->ac, p),
+				    return_index, "");
+}
+
+LLVMValueRef si_insert_input_ptr(struct si_shader_context *ctx, LLVMValueRef ret,
+				 struct ac_arg param, unsigned return_index)
+{
+	LLVMBuilderRef builder = ctx->ac.builder;
+	LLVMValueRef ptr = ac_get_arg(&ctx->ac, param);
+	ptr = LLVMBuildPtrToInt(builder, ptr, ctx->i32, "");
+	return LLVMBuildInsertValue(builder, ret, ptr, return_index, "");
+}
+
 LLVMValueRef si_prolog_get_rw_buffers(struct si_shader_context *ctx)
 {
 	LLVMValueRef ptr[2], list;



More information about the mesa-commit mailing list