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
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to