[Mesa-dev] [PATCH 21/18] ac: skip type for tcs input on RADV

Dieter Nützel Dieter at nuetzel-hh.de
Mon Dec 11 18:44:31 UTC 2017


Tim,

I'm somewhat baffled...
V1 do not have 20,21
V2 do not have 19,21
V3 do not have 19,20

Which one is right?

Thanks,
Dieter

Am 11.12.2017 10:56, schrieb Timothy Arceri:
> The type can be a struct on RADV and causes an assert() to be
> thrown, for radeonsi all structs should have been lowered away.
> ---
>  src/amd/common/ac_nir_to_llvm.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/amd/common/ac_nir_to_llvm.c 
> b/src/amd/common/ac_nir_to_llvm.c
> index 38a840bf813..1466c7f875f 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -2972,23 +2972,25 @@ static LLVMValueRef visit_load_var(struct
> ac_nir_context *ctx,
>  			unsigned const_index = 0;
>  			unsigned location = instr->variables[0]->var->data.location;
>  			unsigned driver_location = 
> instr->variables[0]->var->data.driver_location;
>  			const bool is_patch =  instr->variables[0]->var->data.patch;
>  			const bool is_compact = instr->variables[0]->var->data.compact;
> 
>  			get_deref_offset(ctx, instr->variables[0],
>  					 false, NULL, is_patch ? NULL : &vertex_index,
>  					 &const_index, &indir_index);
> 
> +			LLVMTypeRef type = ctx->nctx ? NULL :
> +				nir2llvmtype(ctx, instr->variables[0]->var->type);
> +
>  			result = ctx->abi->load_tess_inputs(ctx->abi, vertex_index, 
> indir_index,
> -							    const_index, location, driver_location,
> -							    nir2llvmtype(ctx, instr->variables[0]->var->type),
> +							    const_index, location, driver_location, type,
>  							    instr->variables[0]->var->data.location_frac,
>  							    instr->num_components,
>  							    is_patch, is_compact);
>  			return ctx->nctx ?
>  				LLVMBuildBitCast(ctx->nctx->builder, result, get_def_type(ctx,
> &instr->dest.ssa), "") :
>  				result;
>  		}
> 
>  		if (ctx->stage == MESA_SHADER_GEOMETRY) {
>  				LLVMValueRef indir_index;


More information about the mesa-dev mailing list