From 97e0ff30c0c25cf0bfc857fd20b44a3ed95b99fc Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 30 Mar 2017 08:51:42 +0100 Subject: radv: handle clip dist in es outputs. Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Dave Airlie --- src/amd/common/ac_nir_to_llvm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c index a83d8562447..7e889e7d894 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -4568,8 +4568,7 @@ handle_es_outputs_post(struct nir_to_llvm_context *ctx, param_index = shader_io_get_unique_index(i); - if (param_index > max_output_written) - max_output_written = param_index; + max_output_written = MAX2(param_index + (length > 4), max_output_written); for (j = 0; j < length; j++) { LLVMValueRef out_val = LLVMBuildLoad(ctx->builder, out_ptr[j], ""); -- cgit v1.2.3