[Mesa-dev] [Mesa-stable] [PATCH 1/5] radeonsi/gfx9: fix vertex idx in ES with multiple waves per threadgroup

Emil Velikov emil.l.velikov at gmail.com
Thu Jul 27 18:48:48 UTC 2017


Hi Nicolai,

On 17 July 2017 at 11:57, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> Cc: mesa-stable at lists.freedesktop.org
> ---
>  src/gallium/drivers/radeonsi/si_shader.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index 4c0cda5..7a44e61 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -2890,21 +2890,26 @@ static void si_llvm_emit_es_epilogue(struct lp_build_tgsi_context *bld_base)
>         struct si_shader *es = ctx->shader;
>         struct tgsi_shader_info *info = &es->selector->info;
>         LLVMValueRef soffset = LLVMGetParam(ctx->main_fn,
>                                             ctx->param_es2gs_offset);
>         LLVMValueRef lds_base = NULL;
>         unsigned chan;
>         int i;
>
>         if (ctx->screen->b.chip_class >= GFX9 && info->num_outputs) {
>                 unsigned itemsize_dw = es->selector->esgs_itemsize / 4;
> -               lds_base = LLVMBuildMul(gallivm->builder, ac_get_thread_id(&ctx->ac),
> +               LLVMValueRef vertex_idx = ac_get_thread_id(&ctx->ac);
> +               LLVMValueRef wave_idx = unpack_param(ctx, ctx->param_merged_wave_info, 24, 4);
> +               vertex_idx = LLVMBuildOr(gallivm->builder, vertex_idx,
> +                                        LLVMBuildMul(gallivm->builder, wave_idx,
> +                                                     LLVMConstInt(ctx->i32, 64, false), ""), "");
> +               lds_base = LLVMBuildMul(gallivm->builder, vertex_idx,

I have see that you're re-spinned the series addressing Marek's
feedback. Although it seems that even the reviewed patches have not
landed.
Did they land in different form or you forgot to push?

Thanks
Emil


More information about the mesa-dev mailing list