[Mesa-dev] [PATCH 2/2] ac/nir: fix lds store for patch outputs.

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Mon Dec 18 09:55:12 UTC 2017


Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

for the series.

On Mon, Dec 18, 2017 at 7:55 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This wasn't calculating the correct value, this along with
> a nir patch fixes a regression in:
> dEQP-VK.tessellation.shader_input_output.barrier
>
> Fixes: 043d14db30a (ac/nir: don't write tcs outputs to LDS that aren't read back.)
> 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 69d7bea..bd5748d 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -2803,7 +2803,7 @@ store_tcs_output(struct nir_to_llvm_context *ctx,
>         bool store_lds = true;
>
>         if (instr->variables[0]->var->data.patch) {
> -               if (!(ctx->tcs_patch_outputs_read & (1U << instr->variables[0]->var->data.location)))
> +               if (!(ctx->tcs_patch_outputs_read & (1U << (instr->variables[0]->var->data.location - VARYING_SLOT_PATCH0))))
>                         store_lds = false;
>         } else {
>                 if (!(ctx->tcs_outputs_read & (1ULL << instr->variables[0]->var->data.location)))
> --
> 2.9.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list