From 2a68c6c6c8785e3f844791475df8423a6968ddfd Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 1 Mar 2018 15:17:34 +1100 Subject: radeonsi: move si_nir_load_input_gs() to si_shader.c All the tess shader and tgsi equivalents are here and it allows use to use llvm_type_is_64bit() in the following patch without exposing it externally. Reviewed-by: Dave Airlie --- src/gallium/drivers/radeonsi/si_shader.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/gallium/drivers/radeonsi/si_shader.c') diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 2a50b266f64..f3a37d71a0a 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1682,6 +1682,26 @@ LLVMValueRef si_llvm_load_input_gs(struct ac_shader_abi *abi, return LLVMBuildBitCast(ctx->ac.builder, value, type, ""); } +static LLVMValueRef si_nir_load_input_gs(struct ac_shader_abi *abi, + unsigned location, + unsigned driver_location, + unsigned component, + unsigned num_components, + unsigned vertex_index, + unsigned const_index, + LLVMTypeRef type) +{ + struct si_shader_context *ctx = si_shader_context_from_abi(abi); + + LLVMValueRef value[8]; + for (unsigned i = component; i < num_components + component; i++) { + value[i] = si_llvm_load_input_gs(&ctx->abi, driver_location / 4, + vertex_index, type, i); + } + + return ac_build_varying_gather_values(&ctx->ac, value, num_components, component); +} + static LLVMValueRef fetch_input_gs( struct lp_build_tgsi_context *bld_base, const struct tgsi_full_src_register *reg, -- cgit v1.2.3