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

Nicolai Hähnle nicolai.haehnle at amd.com
Thu Jul 27 19:16:03 UTC 2017


On 27.07.2017 20:48, Emil Velikov wrote:
> 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?

I usually keep patches locally for a while for some "passive testing", 
and then got totally sidetracked today by a ridiculous bug. I'm going to 
push them now.

Cheers,
Nicolai


More information about the mesa-dev mailing list