OSDN Git Service

i965: Enumerate Observability Architecture counters on Gen5+.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 3 Nov 2013 02:10:19 +0000 (19:10 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Nov 2013 23:01:14 +0000 (15:01 -0800)
commit7329f8dd10673a474554fd881eb09d6908496e0f
tree3ea48ed4c230b6f05b79e914346c17951760a229
parent9f41585eb5a42a680cdd167181eebda26a2bff8b
i965: Enumerate Observability Architecture counters on Gen5+.

In addition to listing the counter names, we include several "remap"
tables.  Confusingly, counters are documented with names like "A23",
are written to some buffer offset other than 23, and exposed by core
Mesa under a counter ID that is different still.

The first is inevitable; MI_REPORT_PERF_COUNT writes certain counters to
fixed locations in the buffer.  The latter could be avoided, but core
Mesa uses the "Counters" array index as the ID for a counter.  We could
do remapping there, but it would just complicate the core Mesa code.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_performance_monitor.c