[Mesa-dev] [PATCH 21/25] radv/ac: add support for TCS/TES inputs/outputs.

James Legg jlegg at feralinteractive.com
Thu Mar 30 15:02:37 UTC 2017


On Thu, 2017-03-30 at 18:01 +1000, Dave Airlie wrote:
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -2244,6 +2370,322 @@ radv_get_deref_offset(struct
> nir_to_llvm_context *ctx, nir_deref *tail,
>  }
>  
>  static LLVMValueRef
> +lds_load(struct nir_to_llvm_context *ctx,
> +	 LLVMValueRef dw_addr)
> +{
> +	LLVMValueRef value;
> +	value = ac_build_indexed_load(&ctx->ac, ctx->lds, dw_addr,
> false);
> +	return value;
> +}
> +
> +static void
> +lds_store(struct nir_to_llvm_context *ctx,
> +	  LLVMValueRef dw_addr, LLVMValueRef value)
> +{
> +	value = LLVMBuildBitCast(ctx->builder, value, ctx->i32, "");
> +	ac_build_indexed_store(&ctx->ac, ctx->lds,
> +			       dw_addr, value);
> +}

Is ctx->lds supposed to set to something other than NULL before using
these functions? I can only see it being zeroed in
ac_create_gs_copy_shader and assigned in emit_ddxy. I'm seeing a crash
in LLVM 3.9.1's LLVMBuildGEP when this is dereferenced.

James


More information about the mesa-dev mailing list