[Mesa-dev] [PATCH v2 11/14] radeonsi: Enable dynamic HS.

Marek Olšák maraeo at gmail.com
Mon May 16 17:47:01 UTC 2016


On Fri, May 13, 2016 at 3:37 AM, Bas Nieuwenhuizen
<bas at basnieuwenhuizen.nl> wrote:
> This allows running the TES on different CU's than the
> TCS which results in performance improvements.
>
> Signed-off-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
> Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
> ---
>  src/gallium/drivers/radeonsi/si_shader.c        | 11 ++++++++---
>  src/gallium/drivers/radeonsi/si_state_shaders.c |  2 +-
>  2 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index d0f8318..087b5bb 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -2598,12 +2598,17 @@ static void si_write_tess_factors(struct lp_build_tgsi_context *bld_base,
>         byteoffset = LLVMBuildMul(gallivm->builder, rel_patch_id,
>                                   lp_build_const_int32(gallivm, 4 * stride), "");
>
> -       /* Store the outputs. */
> +       /* Store the dynamic HS control word. */
> +       build_tbuffer_store_dwords(ctx, buffer,
> +                                  lp_build_const_int32(gallivm, 0x80000000),
> +                                  1, lp_build_const_int32(gallivm, 0), tf_base, 0);
> +

Only one thread per wave needs to do this, e.g. if rel_patch_id and
invocation_id are 0.

Marek


More information about the mesa-dev mailing list