Просмотр исходного кода

freedreno/ir3: add last-baryf shaderdb stat

Sometimes sched changes that are a win in terms of instruction count
and/or register pressure, are worse in real life, due to keeping varying
storage locked for too long.  Add a shader-db stat to give this more
visibility.

Signed-off-by: Rob Clark <robdclark@chromium.org>
master
Rob Clark 6 лет назад
Родитель
Сommit
dd34ccb2c5
3 измененных файлов: 8 добавлений и 1 удалений
  1. 4
    0
      src/freedreno/ir3/ir3.c
  2. 2
    0
      src/freedreno/ir3/ir3.h
  3. 2
    1
      src/gallium/drivers/freedreno/ir3/ir3_gallium.c

+ 4
- 0
src/freedreno/ir3/ir3.c Просмотреть файл

int ret = emit[opc_cat(instr->opc)](instr, dwords, info); int ret = emit[opc_cat(instr->opc)](instr, dwords, info);
if (ret) if (ret)
goto fail; goto fail;

if ((instr->opc == OPC_BARY_F) && (instr->regs[0]->flags & IR3_REG_EI))
info->last_baryf = info->instrs_count;

info->instrs_count += 1 + instr->repeat + instr->nop; info->instrs_count += 1 + instr->repeat + instr->nop;
info->nops_count += instr->nop; info->nops_count += instr->nop;
if (instr->opc == OPC_NOP) if (instr->opc == OPC_NOP)

+ 2
- 0
src/freedreno/ir3/ir3.h Просмотреть файл



/* number of sync bits: */ /* number of sync bits: */
uint16_t ss, sy; uint16_t ss, sy;

uint16_t last_baryf; /* instruction # of last varying fetch */
}; };


struct ir3_register { struct ir3_register {

+ 2
- 1
src/gallium/drivers/freedreno/ir3/ir3_gallium.c Просмотреть файл



pipe_debug_message(debug, SHADER_INFO, pipe_debug_message(debug, SHADER_INFO,
"%s shader: %u inst, %u nops, %u non-nops, %u dwords, " "%s shader: %u inst, %u nops, %u non-nops, %u dwords, "
"%u half, %u full, %u constlen, "
"%u last-baryf, %u half, %u full, %u constlen, "
"%u (ss), %u (sy), %d max_sun, %d loops\n", "%u (ss), %u (sy), %d max_sun, %d loops\n",
ir3_shader_stage(v), ir3_shader_stage(v),
v->info.instrs_count, v->info.instrs_count,
v->info.nops_count, v->info.nops_count,
v->info.instrs_count - v->info.nops_count, v->info.instrs_count - v->info.nops_count,
v->info.sizedwords, v->info.sizedwords,
v->info.last_baryf,
v->info.max_half_reg + 1, v->info.max_half_reg + 1,
v->info.max_reg + 1, v->info.max_reg + 1,
v->constlen, v->constlen,

Загрузка…
Отмена
Сохранить