i965: Add a function to emit the MI_REPORT_PERF_COUNT packet.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 3 Nov 2013 01:48:18 +0000 (18:48 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Nov 2013 23:01:14 +0000 (15:01 -0800)
commit093ecbfe3b8339ef846f46c2a04d32856273a2d7
tree7f11b831b1bc21c44f8902cc8211e935866a39b4
parentb05b1eff1c974c897d99f8ae1b3cb480ee39ef67
i965: Add a function to emit the MI_REPORT_PERF_COUNT packet.

MI_REPORT_PERF_COUNT writes a snapshot of the Observability Architecture
counters to a buffer.  Exactly how it works varies between generations:
Ironlake requires two packets, Sandybridge has to use GGTT, and Ivybridge
and later use PPGTT.

v2: Assert that we didn't use more space than we reserved (suggested
    by Eric Anholt).

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