diff options
author | Kenneth Graunke <[email protected]> | 2013-11-02 19:10:19 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-11-21 15:01:14 -0800 |
commit | 7329f8dd10673a474554fd881eb09d6908496e0f (patch) | |
tree | 3ea48ed4c230b6f05b79e914346c17951760a229 /src/mesa/drivers/dri/i965/brw_context.h | |
parent | 9f41585eb5a42a680cdd167181eebda26a2bff8b (diff) |
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 <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.h')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index a2720d22c43..43d0bbf7a5e 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -1402,6 +1402,15 @@ struct brw_context struct { /** A map from pipeline statistics counter IDs to MMIO addresses. */ const int *statistics_registers; + + /** + * Mapping from a uint32_t offset within an OA snapshot to the ID of + * the counter which MI_REPORT_PERF_COUNT stores there. + */ + const int *oa_snapshot_layout; + + /** Number of 32-bit entries in a hardware counter snapshot. */ + int entries_per_oa_snapshot; } perfmon; int num_atoms; |