On Thu, Oct 18, 2018 at 10:13 AM Connor Abbott <cwabbo...@gmail.com> wrote:
> And implement ac_bulid_expand_to_vec4() on top of it. > > Fixes: 7e7ee82698247d8f93fe37775b99f4838b0247dd ("ac: add support for > 16bit buffer loads") > --- > src/amd/common/ac_llvm_build.c | 40 ++++++++++++++++++++++------------ > src/amd/common/ac_llvm_build.h | 3 +++ > 2 files changed, 29 insertions(+), 14 deletions(-) > > diff --git a/src/amd/common/ac_llvm_build.c > b/src/amd/common/ac_llvm_build.c > index 2d78ca1b52a..c54a50dcd86 100644 > --- a/src/amd/common/ac_llvm_build.c > +++ b/src/amd/common/ac_llvm_build.c > @@ -523,39 +523,51 @@ ac_build_gather_values(struct ac_llvm_context *ctx, > return ac_build_gather_values_extended(ctx, values, value_count, > 1, false, false); > } > > -/* Expand a scalar or vector to <4 x type> by filling the remaining > channels > - * with undef. Extract at most num_channels components from the input. > +/* Expand a scalar or vector to <dst_channels x type> by filling the > remaining > + * channels with undef. Extract at most src_channels components from the > input. > */ > -LLVMValueRef ac_build_expand_to_vec4(struct ac_llvm_context *ctx, > - LLVMValueRef value, > - unsigned num_channels) > +LLVMValueRef ac_build_expand(struct ac_llvm_context *ctx, > + LLVMValueRef value, > + unsigned src_channels, > + unsigned dst_channels) > { > LLVMTypeRef elemtype; > - LLVMValueRef chan[4]; > + LLVMValueRef chan[dst_channels]; > That doesn't look like a valid syntax. dst_channel is not a compile-time constant. What was wrong with 4? Other than that, this patch is: Reviewed-by: Marek Olšák <marek.ol...@amd.com> Marek
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev