diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-08-30 13:08:16 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-08-30 15:50:22 -0700 |
commit | 67909c8ff288483106bea63e893752e6989eb3e3 (patch) | |
tree | c584da0d96f4d2451f5a4ab0b0aacaa5ab1e5d7e /src/panfrost | |
parent | 3f9dc97124d8a7ce28e208c2020048b97e4aa1db (diff) |
pan/midgard: Count shader-db stats by bundled instructions
This does not affect shaders in any way. Rather, it makes the shader-db
instruction count recorded in the compiler accurate with the in-order
scheduler, matching up with what we calculate from pandecode.
Though shaders are the same, instruction counts cannot be compared
across this commit for this reason.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-rw-r--r-- | src/panfrost/midgard/midgard_compile.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c index 74796b661df..69966854b11 100644 --- a/src/panfrost/midgard/midgard_compile.c +++ b/src/panfrost/midgard/midgard_compile.c @@ -2800,15 +2800,14 @@ midgard_compile_shader_nir(struct midgard_screen *screen, nir_shader *nir, midga /* Count instructions and bundles */ - mir_foreach_instr_global(ctx, ins) { - nr_ins++; - } - mir_foreach_block(ctx, block) { nr_bundles += util_dynarray_num_elements( &block->bundles, midgard_bundle); nr_quadwords += block->quadword_count; + + mir_foreach_bundle_in_block(block, bun) + nr_ins += bun->instruction_count; } /* Calculate thread count. There are certain cutoffs by |