[Mesa-dev] [PATCH] radeonsi: don't use the real barrier instruction in tess ctrl shaders

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Thu Apr 7 00:25:47 UTC 2016


This patch is

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

On Thu, Apr 7, 2016 at 2:07 AM, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> ---
>  src/gallium/drivers/radeonsi/si_shader.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index bf3f008..08da3e3 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -4282,6 +4282,14 @@ static void si_llvm_emit_barrier(const struct lp_build_tgsi_action *action,
>         struct si_shader_context *ctx = si_shader_context(bld_base);
>         struct gallivm_state *gallivm = bld_base->base.gallivm;
>
> +       /* The real barrier instruction isn’t needed, because an entire patch
> +        * always fits into a single wave.
> +        */
> +       if (ctx->type == TGSI_PROCESSOR_TESS_CTRL) {
> +               emit_optimization_barrier(ctx);
> +               return;
> +       }
> +
>         lp_build_intrinsic(gallivm->builder,
>                            HAVE_LLVM >= 0x0309 ? "llvm.amdgcn.s.barrier"
>                                                : "llvm.AMDGPU.barrier.local",
> --
> 2.5.0
>
> _______________________________________________
> 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