* when using nested loops */
int current_loop_depth;
+ /* Total number of loops for shader-db */
+ unsigned loop_count;
+
/* Constants which have been loaded, for later inlining */
struct hash_table_u64 *ssa_constants;
/* Now that we've finished emitting the loop, free up the depth again
* so we play nice with recursion amid nested loops */
--ctx->current_loop_depth;
+
+ /* Dump loop stats */
+ ++ctx->loop_count;
}
static midgard_block *
fprintf(stderr, "shader%d - %s shader: "
"%u inst, %u bundles, "
- "%u registers, %u threads, 0 loops\n",
+ "%u registers, %u threads, %u loops\n",
SHADER_DB_COUNT++,
gl_shader_stage_name(ctx->stage),
nr_ins, nr_bundles,
- nr_registers, nr_threads);
+ nr_registers, nr_threads,
+ ctx->loop_count);
}