[Mesa-dev] [PATCH 02/25] radv: handle clip dist in es outputs.

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Fri Mar 31 06:51:13 UTC 2017


On Thu, Mar 30, 2017 at 10:00 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> Signed-off-by: Dave Airlie <airlied at 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list