aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/freedreno/ir3/ir3.c4
-rw-r--r--src/freedreno/ir3/ir3.h2
-rw-r--r--src/gallium/drivers/freedreno/ir3/ir3_gallium.c3
3 files changed, 8 insertions, 1 deletions
diff --git a/src/freedreno/ir3/ir3.c b/src/freedreno/ir3/ir3.c
index b89e9b316a5..af3d5152724 100644
--- a/src/freedreno/ir3/ir3.c
+++ b/src/freedreno/ir3/ir3.c
@@ -915,6 +915,10 @@ void * ir3_assemble(struct ir3 *shader, struct ir3_info *info,
int ret = emit[opc_cat(instr->opc)](instr, dwords, info);
if (ret)
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->nops_count += instr->nop;
if (instr->opc == OPC_NOP)
diff --git a/src/freedreno/ir3/ir3.h b/src/freedreno/ir3/ir3.h
index aa89e765bef..888cf5fcbed 100644
--- a/src/freedreno/ir3/ir3.h
+++ b/src/freedreno/ir3/ir3.h
@@ -58,6 +58,8 @@ struct ir3_info {
/* number of sync bits: */
uint16_t ss, sy;
+
+ uint16_t last_baryf; /* instruction # of last varying fetch */
};
struct ir3_register {
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c
index e5c44521af6..5a47376c14e 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_gallium.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_gallium.c
@@ -52,13 +52,14 @@ dump_shader_info(struct ir3_shader_variant *v, bool binning_pass,
pipe_debug_message(debug, SHADER_INFO,
"%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",
ir3_shader_stage(v),
v->info.instrs_count,
v->info.nops_count,
v->info.instrs_count - v->info.nops_count,
v->info.sizedwords,
+ v->info.last_baryf,
v->info.max_half_reg + 1,
v->info.max_reg + 1,
v->constlen,