[Mesa-dev] [PATCH 1/2] radv/ac: add const_index to fetch index for gs inputs

Edward O'Callaghan funfunctor at folklore1984.net
Wed Feb 1 01:53:01 UTC 2017


Patches 1&2 are,
Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>

On 02/01/2017 12:12 PM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> This fixes clip distance fetches as they are single item loads
> with a const_index like float[1].
> 
> Fixes:
> dEQP-VK.clipping.user_defined.*.vert_geom.[0-6]
> 
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/amd/common/ac_nir_to_llvm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index efa8cc1..d817aec 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -2315,7 +2315,7 @@ load_gs_input(struct nir_to_llvm_context *ctx,
>  		param = shader_io_get_unique_index(instr->variables[0]->var->data.location);
>  		args[0] = ctx->esgs_ring;
>  		args[1] = vtx_offset;
> -		args[2] = LLVMConstInt(ctx->i32, (param * 4 + i) * 256, false);
> +		args[2] = LLVMConstInt(ctx->i32, (param * 4 + i + const_index) * 256, false);
>  		args[3] = ctx->i32zero;
>  		args[4] = ctx->i32one; /* OFFEN */
>  		args[5] = ctx->i32zero; /* IDXEN */
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170201/51a00b7b/attachment-0001.sig>


More information about the mesa-dev mailing list