Commit ef88e23d authored by Eric Anholt's avatar Eric Anholt

freedreno: Log the number of loops in the shader for shader-db.

shader-db's will use this to see when we've changed loop
unrolling behavior on a shader and skip including other stats like
instruction count from being considered for that shader, since they won't
be useful as a proxy for real world performance in that case.
Reviewed-by: Rob Clark's avatarRob Clark <>
Tested-by: Eduardo Lima Mitev's avatarEduardo Lima Mitev <>
parent c2e68beb
Pipeline #37305 passed with stages
in 6 minutes and 44 seconds
......@@ -2168,6 +2168,7 @@ static void
emit_loop(struct ir3_context *ctx, nir_loop *nloop)
emit_cf_list(ctx, &nloop->body);
static void
......@@ -401,6 +401,7 @@ struct ir3_shader_variant {
unsigned branchstack;
unsigned max_sun;
unsigned loops;
/* the instructions length is in units of instruction groups
* (4 instructions for a3xx, 16 instructions for a4xx.. each
......@@ -52,7 +52,7 @@ dump_shader_info(struct ir3_shader_variant *v, struct pipe_debug_callback *debug
pipe_debug_message(debug, SHADER_INFO,
"%s shader: %u inst, %u dwords, "
"%u half, %u full, %u const, %u constlen, "
"%u (ss), %u (sy), %d max_sun\n",
"%u (ss), %u (sy), %d max_sun, %d loops\n",
......@@ -61,7 +61,7 @@ dump_shader_info(struct ir3_shader_variant *v, struct pipe_debug_callback *debug
v->info.max_const + 1,
v->, v->,
v->max_sun, v->loops);
struct ir3_shader_variant *
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment