mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 15:30:14 +01:00
vc4: consolidate shader-db output
[Eric: update output string format for new shaderdb] Signed-off-by: Eric Engestrom <eric@igalia.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18599>
This commit is contained in:
parent
8ed00732cd
commit
cc22016d71
5 changed files with 11 additions and 35 deletions
|
|
@ -2350,13 +2350,6 @@ vc4_shader_ntq(struct vc4_context *vc4, enum qstage stage,
|
|||
|
||||
NIR_PASS_V(c->s, nir_convert_from_ssa, true);
|
||||
|
||||
if (VC4_DBG(SHADERDB)) {
|
||||
fprintf(stderr, "SHADER-DB: %s prog %d/%d: %d NIR instructions\n",
|
||||
qir_get_stage_name(c->stage),
|
||||
c->program_id, c->variant_id,
|
||||
count_nir_instrs(c->s));
|
||||
}
|
||||
|
||||
if (VC4_DBG(NIR)) {
|
||||
fprintf(stderr, "%s prog %d/%d NIR:\n",
|
||||
qir_get_stage_name(c->stage),
|
||||
|
|
@ -2416,17 +2409,6 @@ vc4_shader_ntq(struct vc4_context *vc4, enum qstage stage,
|
|||
qir_reorder_uniforms(c);
|
||||
vc4_generate_code(vc4, c);
|
||||
|
||||
if (VC4_DBG(SHADERDB)) {
|
||||
fprintf(stderr, "SHADER-DB: %s prog %d/%d: %d instructions\n",
|
||||
qir_get_stage_name(c->stage),
|
||||
c->program_id, c->variant_id,
|
||||
c->qpu_inst_count);
|
||||
fprintf(stderr, "SHADER-DB: %s prog %d/%d: %d uniforms\n",
|
||||
qir_get_stage_name(c->stage),
|
||||
c->program_id, c->variant_id,
|
||||
c->num_uniforms);
|
||||
}
|
||||
|
||||
ralloc_free(c->s);
|
||||
|
||||
return c;
|
||||
|
|
@ -2745,13 +2727,6 @@ vc4_get_compiled_shader(struct vc4_context *vc4, enum qstage stage,
|
|||
|
||||
shader->fs_threaded = c->fs_threaded;
|
||||
|
||||
if (VC4_DBG(SHADERDB) && stage == QSTAGE_FRAG) {
|
||||
fprintf(stderr, "SHADER-DB: %s prog %d/%d: %d FS threads\n",
|
||||
qir_get_stage_name(c->stage),
|
||||
c->program_id, c->variant_id,
|
||||
1 + shader->fs_threaded);
|
||||
}
|
||||
|
||||
qir_compile_destroy(c);
|
||||
|
||||
struct vc4_key *dup_key;
|
||||
|
|
|
|||
|
|
@ -753,9 +753,9 @@ const char *
|
|||
qir_get_stage_name(enum qstage stage)
|
||||
{
|
||||
static const char *names[] = {
|
||||
[QSTAGE_FRAG] = "FS",
|
||||
[QSTAGE_VERT] = "VS",
|
||||
[QSTAGE_COORD] = "CS",
|
||||
[QSTAGE_FRAG] = "MESA_SHADER_FRAGMENT",
|
||||
[QSTAGE_VERT] = "MESA_SHADER_VERTEX",
|
||||
[QSTAGE_COORD] = "MESA_SHADER_COORD",
|
||||
};
|
||||
|
||||
return names[stage];
|
||||
|
|
|
|||
|
|
@ -464,6 +464,7 @@ struct vc4_compile {
|
|||
struct qreg undef;
|
||||
enum qstage stage;
|
||||
uint32_t num_temps;
|
||||
uint32_t max_reg_pressure;
|
||||
|
||||
struct list_head blocks;
|
||||
int next_block_index;
|
||||
|
|
|
|||
|
|
@ -330,10 +330,6 @@ qir_calculate_live_intervals(struct vc4_compile *c)
|
|||
}
|
||||
max_reg_pressure = MAX2(max_reg_pressure, reg_pressure);
|
||||
}
|
||||
|
||||
fprintf(stderr, "SHADER-DB: %s prog %d/%d: %d max temps\n",
|
||||
qir_get_stage_name(c->stage),
|
||||
c->program_id, c->variant_id,
|
||||
max_reg_pressure);
|
||||
c->max_reg_pressure = max_reg_pressure;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -680,9 +680,13 @@ vc4_generate_code(struct vc4_context *vc4, struct vc4_compile *c)
|
|||
cycles += c->qpu_inst_count - inst_count_at_schedule_time;
|
||||
|
||||
if (VC4_DBG(SHADERDB)) {
|
||||
fprintf(stderr, "SHADER-DB: %s prog %d/%d: %d estimated cycles\n",
|
||||
fprintf(stderr, "SHADER-DB %s - %s shader: %d inst, %d threads, %d uniforms, %d max-temps, %d estimated-cycles\n",
|
||||
c->s->info.name,
|
||||
qir_get_stage_name(c->stage),
|
||||
c->program_id, c->variant_id,
|
||||
c->qpu_inst_count,
|
||||
1 + c->fs_threaded,
|
||||
c->num_uniforms,
|
||||
c->max_reg_pressure,
|
||||
cycles);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue