[Mesa-stable] Fwd: Re: [Mesa-dev] [PATCH] radv/ac: Use base in push constant loads.

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Sat Jan 28 02:11:58 UTC 2017


I just realized that I've been committing with added cc: stable tags
when the original mail didn't have this tags and without resending, so
those haven't been mailed to the mesa-stable list yet.

I would like to nominate

commit f65b3641c3233f1697b96ea8126b578dae6de4f1
Author: Grazvydas Ignotas <notasas at gmail.com>
Date:   Mon Jan 23 23:16:42 2017 +0200

    radv: don't resubmit the same cs over and over while tracing

    Fixes: 97dfff54 ("radv: Dump command buffer on hang.")
    Signed-off-by: Grazvydas Ignotas <notasas at gmail.com>
    Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
    CC: <mesa-stable at lists.freedesktop.org>


commit 96c60b7f07e626d9ca0fc5789117f0c725ba1da2
Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Sat Jan 28 01:32:20 2017 +0100

    radv/ac: Use base in push constant loads.

    Apparently the source is not an address but an offset, so we
    actually
    need to use the base.

    Signed-off-by: Bas Nieuwenhuizen <basni at google.com>
    Reviewed-by: Dave Airlie <airlied at redhat.com>
    CC: <mesa-stable at lists.freedesktop.org>


Sorry for the inconvenience.

----- Original message -----
From: Dave Airlie <airlied at gmail.com>
To: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Cc: "mesa-dev at lists.freedesktop.org" <mesa-dev at lists.freedesktop.org>
Subject: Re: [Mesa-dev] [PATCH] radv/ac: Use base in push constant
loads.
Date: Sat, 28 Jan 2017 10:48:43 +1000

On 28 January 2017 at 10:35, Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
wrote:
> Apparently the source is not an address but an offset, so we actually
> need to use the base.
Nice find!

Reviewed-by: Dave Airlie <airlied at redhat.com>
>
> Signed-off-by: Bas Nieuwenhuizen <basni at google.com>
> ---
>  src/amd/common/ac_nir_to_llvm.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 26b87e8782b..72ae6eb0730 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -1745,9 +1745,12 @@ static LLVMValueRef visit_vulkan_resource_index(struct nir_to_llvm_context *ctx,
>  static LLVMValueRef visit_load_push_constant(struct nir_to_llvm_context *ctx,
>                                               nir_intrinsic_instr *instr)
>  {
> -       LLVMValueRef ptr;
> +       LLVMValueRef ptr, addr;
> +
> +       addr = LLVMConstInt(ctx->i32, nir_intrinsic_base(instr), 0);
> +       addr = LLVMBuildAdd(ctx->builder, addr, get_src(ctx, instr->src[0]), "");
>
> -       ptr = build_gep0(ctx, ctx->push_constants, get_src(ctx, instr->src[0]));
> +       ptr = build_gep0(ctx, ctx->push_constants, addr);
>         ptr = cast_ptr(ctx, ptr, get_def_type(ctx, &instr->dest.ssa));
>
>         return LLVMBuildLoad(ctx->builder, ptr, "");
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-stable mailing list