On Thu, Mar 30, 2017 at 10:00 AM, Dave Airlie <airl...@gmail.com> wrote: > From: Dave Airlie <airl...@redhat.com> > > Signed-off-by: Dave Airlie <airl...@redhat.com> > --- > src/amd/common/ac_nir_to_llvm.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c > index 16c1eae..d3f6112 100644 > --- a/src/amd/common/ac_nir_to_llvm.c > +++ b/src/amd/common/ac_nir_to_llvm.c > @@ -4570,6 +4570,10 @@ handle_es_outputs_post(struct nir_to_llvm_context *ctx, > > if (param_index > max_output_written) > max_output_written = param_index; > + if (length > 4) { > + if (param_index + 1 > max_output_written) > + max_output_written = param_index + 1; > + }
can we use something like max_output_written = MAX2(max_output_written, param_index + (length - 1) / 4) instead of all these ifs? > > for (j = 0; j < length; j++) { > LLVMValueRef out_val = LLVMBuildLoad(ctx->builder, > out_ptr[j], ""); > -- > 2.9.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