For 1,1.5,2 Reviewed-by: Dave Airlie <airl...@redhat.com>
On 1 March 2018 at 14:24, Timothy Arceri <tarc...@itsqueeze.com> wrote: > 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. > --- > src/gallium/drivers/radeonsi/si_shader.c | 20 ++++++++++++++++++++ > src/gallium/drivers/radeonsi/si_shader_internal.h | 9 --------- > src/gallium/drivers/radeonsi/si_shader_nir.c | 20 -------------------- > 3 files changed, 20 insertions(+), 29 deletions(-) > > diff --git a/src/gallium/drivers/radeonsi/si_shader.c > b/src/gallium/drivers/radeonsi/si_shader.c > index 2a50b266f6..f3a37d71a0 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, > diff --git a/src/gallium/drivers/radeonsi/si_shader_internal.h > b/src/gallium/drivers/radeonsi/si_shader_internal.h > index dbe4f2e969..dc73517018 100644 > --- a/src/gallium/drivers/radeonsi/si_shader_internal.h > +++ b/src/gallium/drivers/radeonsi/si_shader_internal.h > @@ -337,13 +337,4 @@ void si_llvm_load_input_fs( > > bool si_nir_build_llvm(struct si_shader_context *ctx, struct nir_shader > *nir); > > -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); > - > #endif > diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c > b/src/gallium/drivers/radeonsi/si_shader_nir.c > index 2ca093e237..fc709d8546 100644 > --- a/src/gallium/drivers/radeonsi/si_shader_nir.c > +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c > @@ -771,26 +771,6 @@ static void declare_nir_input_fs(struct > si_shader_context *ctx, > si_llvm_load_input_fs(ctx, input_index, out); > } > > -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); > -} > - > LLVMValueRef > si_nir_lookup_interp_param(struct ac_shader_abi *abi, > enum glsl_interp_mode interp, unsigned location) > -- > 2.14.3 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev