pan/bi: Disambiguate IDVS variants in shader-db

Label IDVS variants as being MESA_SHADER_{POSITION, VARYING} stages;
reserve the MESA_SHADER_VERTEX label for non-IDVS shaders. This reduces
confusion where a single shader compiles to two MESA_SHADER_VERTEX
shaders with different stats.

While we're at it, de-vendor the blend shader stage name; these stats
are internal anyway.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15086>
This commit is contained in:
Alyssa Rosenzweig 2022-01-02 13:13:10 -05:00 committed by Marge Bot
parent 01d1bf6228
commit 9168dcbbc1
1 changed files with 14 additions and 2 deletions

View File

@ -3156,6 +3156,19 @@ bi_count_tuple_stats(bi_clause *clause, bi_tuple *tuple, struct bi_stats *stats)
}
static const char *
bi_shader_stage_name(bi_context *ctx)
{
if (ctx->idvs == BI_IDVS_VARYING)
return "MESA_SHADER_VARYING";
else if (ctx->idvs == BI_IDVS_POSITION)
return "MESA_SHADER_POSITION";
else if (ctx->inputs->is_blend)
return "MESA_SHADER_BLEND";
else
return gl_shader_stage_name(ctx->stage);
}
static void
bi_print_stats(bi_context *ctx, unsigned size, FILE *fp)
{
@ -3203,8 +3216,7 @@ bi_print_stats(bi_context *ctx, unsigned size, FILE *fp)
"%u quadwords, %u threads, %u loops, "
"%u:%u spills:fills\n",
ctx->nir->info.label ?: "",
ctx->inputs->is_blend ? "PAN_SHADER_BLEND" :
gl_shader_stage_name(ctx->stage),
bi_shader_stage_name(ctx),
stats.nr_ins, stats.nr_tuples, stats.nr_clauses,
cycles_bound, cycles_arith, cycles_texture,
cycles_varying, cycles_ldst,